Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/project standarization #438

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
IFluentFoodApple20Filled: typeof import('~icons/fluent/food-apple20-filled')['default']
IIonEllipsisVertical: typeof import('~icons/ion/ellipsis-vertical')['default']
IMaterialSymbolsBrightnessAlertOutlineRounded: typeof import('~icons/material-symbols/brightness-alert-outline-rounded')['default']
IMdiBankTransfer: typeof import('~icons/mdi/bank-transfer')['default']
Expand All @@ -16,10 +15,8 @@ declare module 'vue' {
IMdiBell: typeof import('~icons/mdi/bell')['default']
IMdiCallSplit: typeof import('~icons/mdi/call-split')['default']
IMdiCheck: typeof import('~icons/mdi/check')['default']
IMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
IMdiChevronLeft: typeof import('~icons/mdi/chevron-left')['default']
IMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
IMdiChevronUp: typeof import('~icons/mdi/chevron-up')['default']
IMdiClose: typeof import('~icons/mdi/close')['default']
IMdiEdit: typeof import('~icons/mdi/edit')['default']
IMdiEllipsisVertical: typeof import('~icons/mdi/ellipsis-vertical')['default']
Expand All @@ -32,6 +29,7 @@ declare module 'vue' {
IMdiLock: typeof import('~icons/mdi/lock')['default']
IMdiMinus: typeof import('~icons/mdi/minus')['default']
IMdiMoney: typeof import('~icons/mdi/money')['default']
IMdiPencil: typeof import('~icons/mdi/pencil')['default']
IMdiPlus: typeof import('~icons/mdi/plus')['default']
IMdiSearch: typeof import('~icons/mdi/search')['default']
IMdiSort: typeof import('~icons/mdi/sort')['default']
Expand Down
66 changes: 34 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,66 +34,68 @@
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@headlessui/vue": "^1.7.22",
"@iconify-json/clarity": "^1.1.13",
"@iconify-json/fluent": "^1.1.59",
"@iconify-json/ic": "^1.1.17",
"@iconify-json/ion": "^1.1.18",
"@iconify-json/material-symbols": "^1.1.85",
"@iconify-json/clarity": "^1.2.0",
"@iconify-json/fluent": "^1.2.0",
"@iconify-json/ic": "^1.2.0",
"@iconify-json/ion": "^1.2.0",
"@iconify-json/material-symbols": "^1.2.1",
"@iconify-json/mdi": "^1.1.67",
"@inertiajs/vue3": "^1.2.0",
"@mertasan/tailwindcss-variables": "^2.7.0",
"@tailwindcss/typography": "^0.5.13",
"@vitejs/plugin-vue": "^5.1.1",
"@vue/server-renderer": "^3.4.34",
"@vueuse/core": "^10.11.0",
"atmosphere-ui": "^1.3.5",
"autoprefixer": "^10.4.19",
"@tailwindcss/typography": "^0.5.15",
"@vitejs/plugin-vue": "^5.1.3",
"@vue/server-renderer": "^3.5.3",
"@vueuse/core": "^10.11.1",
"atmosphere-ui": "^1.3.12",
"autoprefixer": "^10.4.20",
"axios": "^1.7.2",
"commit-and-tag-version": "^12.4.1",
"commit-and-tag-version": "^12.4.2",
"date-fns": "^3.6.0",
"eslint": "^9.7.0",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-html": "^8.1.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.27.0",
"eslint-plugin-vue": "^9.28.0",
"exact-math": "^2.2.3",
"firebase": "^10.12.4",
"husky": "^9.1.3",
"husky": "^9.1.5",
"laravel-vite-plugin": "^1.0.5",
"lodash": "^4.17.21",
"naive-ui": "^2.39.0",
"postcss": "^8.4.40",
"postcss": "^8.4.45",
"prettier": "^3.3.3",
"sass": "^1.77.8",
"sass": "^1.78.0",
"slug": "^9.1.0",
"tailwindcss": "^3.4.7",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.4",
"unplugin-icons": "^0.19.0",
"unplugin-vue-components": "^0.27.3",
"unplugin-icons": "^0.19.3",
"unplugin-vue-components": "^0.27.4",
"uuid": "^10.0.0",
"vite": "^5.3.5",
"vite-plugin-pwa": "^0.20.1",
"vitepress": "^1.3.1",
"vue": "^3.4.33",
"vite": "^5.4.3",
"vite-plugin-pwa": "^0.20.5",
"vitepress": "^1.3.4",
"vue": "^3.5.3",
"vue-multiselect": "^3.0.0",
"vue3-apexcharts": "^1.5.3",
"vue3-apexcharts": "^1.6.0",
"vueuse-temporals": "^1.6.0"
},
"dependencies": {
"@formkit/auto-animate": "^1.0.0-beta.1",
"@originjs/vite-plugin-federation": "^1.3.5",
"@vueuse/components": "^10.11.0",
"chart.js": "^4.4.3",
"element-plus": "^2.7.8",
"@vueuse/components": "^10.11.1",
"apexcharts": "^3.53.0",
"chart.js": "^4.4.4",
"element-plus": "^2.8.2",
"floating-vue": "^5.2.2",
"fuse.js": "^7.0.0",
"luxon": "^3.4.4",
"pinia": "^2.2.0",
"luxon": "^3.5.0",
"pinia": "^2.2.2",
"randomcolor": "^0.6.2",
"vanilla-icon-picker": "^1.3.0",
"vite-plugin-vue-devtools": "^7.4.4",
"vue-chartjs": "^5.3.1",
"vue-draggable-next": "^2.2.1",
"vue-i18n": "^9.13.1",
Expand Down
14 changes: 5 additions & 9 deletions resources/js/Components/molecules/MoneyPresenter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
import { formatMoney } from '@/utils';
import NumberHider from './NumberHider.vue';

defineProps({
value: {
type: Number
},
bold: {
type: Boolean,
}
})
defineProps<{
value: number|string;
bold?: boolean;
}>()
</script>


Expand All @@ -18,4 +14,4 @@ defineProps({
<NumberHider />
{{ formatMoney(value) }}
</span>
</template>
</template>
13 changes: 9 additions & 4 deletions resources/js/Components/organisms/DonutChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const chartData = computed(() => {
labels: series.value.map((item) => item[props.label]),
datasets: [
{
data: series.value.map((item) => item[props.value]).sort(),
data: series.value.map((item) => item[props.value]),
backgroundColor: series.value.map((item) => item.color || nameToColor(item[props.label])),
borderJoinStyle: "mittr",
},
Expand Down Expand Up @@ -81,14 +81,19 @@ const options = computed(() => ({
</script>

<template>
<div class="relative">
<div class="relative flex justify-center items-center min-h-96">
<DoughnutChart
ref="chartRef"
class="absolute"
:data="chartData"
:options="options"
width="100%"
height="100%"
/>
<div class="absolute">
{{ total }}
<div>
<slot name="total">
{{ total }}
</slot>
</div>
</div>
</template>
4 changes: 2 additions & 2 deletions resources/js/Components/shared/BaseTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const props = withDefaults(
}
);

const emit = defineEmits(["selection-change"]);
const emit = defineEmits(["selection-change", 'sort', 'row-click']);

const getHeaderClass = (row: Record<string, any>) => {
return row.headerClass;
Expand Down Expand Up @@ -91,7 +91,7 @@ defineExpose({
</script>

<template>
<section class="ic-base-table">
<section class="ic-base-table overflow-y-auto ic-scroller">
<!-- Header and top pagination -->
<section
class="flex items-center justify-between px-4 md:px-0 bg-base-lvl-3"
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Dashboard/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const props = withDefaults(
values: [];
};
};
drafts: number;
drafts?: number;
expenses: {
previousYear: {
values: [];
Expand All @@ -58,7 +58,7 @@ const props = withDefaults(
categories: ICategory[];
accounts: IAccount[];
onboarding: Record<string, any>;
checks: IOccurrenceCheck[];
checks?: IOccurrenceCheck[];
modules: any[];
}>(),
{}
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Dashboard/Partials/DashboardDrafts.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, defineModel } from 'vue';
import { ref, onMounted } from 'vue';
import axios from 'axios';

import WidgetTitleCard from '@/Components/molecules/WidgetTitleCard.vue';
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Finance/Account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const selectedTabName = computed(() => {
variant="inverse"
@click="reconcileForm.isVisible = true"
v-if="!isReconciled">
Reconciliation {{ isReconciled }}
Reconciliation
</LogerButton>
<LogerButton
variant="inverse"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, toRefs, provide, ref, onMounted, nextTick } from "vue";
import { router } from "@inertiajs/vue3";
import { AtBackgroundIconCard, IServerSearchData, AtField } from "atmosphere-ui";
import { IServerSearchData } from "atmosphere-ui";

import AppLayout from "@/Components/templates/AppLayout.vue";

Expand All @@ -14,15 +14,10 @@ import { useTransactionModal } from "@/domains/transactions";
// import { IServerSearchData, useServerSearch } from "@/composables/useServerSearch";
import { reconciliationCols } from "@/domains/transactions";
import { useAppContextStore } from "@/store";
import { formatMoney } from "@/utils";
import { IAccount, ICategory, ITransaction } from "@/domains/transactions/models";

const { openTransactionModal } = useTransactionModal();


interface CollectionData<T> {
data: T[]
}
const props = withDefaults(defineProps<{
transactions: ITransaction[];
account: IAccount;
Expand Down Expand Up @@ -76,14 +71,6 @@ const handleEdit = (transaction: ITransaction) => {

const isEditing = ref(false);
const statementBalanceRef = ref()
const toggleEditing = () => {
isEditing.value = !isEditing.value
if (isEditing.value) {
nextTick(() => {
statementBalanceRef.value.focus()
})
}
}

onMounted(() => {
router.on('start', () => isLoading.value = true)
Expand Down
12 changes: 7 additions & 5 deletions resources/js/Pages/Finance/Reconciliation/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ const transactionsMatched = computed(() => {
</article>
<article></article>
</section>

<ReconciliationTable
:cols="tableAccountCols(props.reconciliation.account_id)"
:transactions="transactionList"
Expand All @@ -284,12 +285,13 @@ const transactionsMatched = computed(() => {
@removed="removeTransaction"
@edit="handleEdit"
>
<template #footer>
<footer class="justify-end flex px-4 mt-4">
<NPagination v-model:page="state.page" :page-count="Math.ceil(transactions.total / 25)" />
</footer>
</template>
<template #footer v-if="false">
<footer class="justify-end flex px-4 mt-4">
<NPagination v-model:page="state.page" :page-count="Math.ceil(transactions.total / 25)" />
</footer>
</template>
</ReconciliationTable>

</section>
</FinanceTemplate>
</AppLayout>
Expand Down
6 changes: 4 additions & 2 deletions resources/js/domains/budget/useBudget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ export const useBudget = (budgets: Ref<Record<string, any>>) => {
}

const assignBudget = (assign: AssignBudgetProps) => {

debugger

axios.post(`/budgets/${assign.category.id}/months/${assign.month}`, {
id: assign.category.id,
budgeted: assign.budgeted,
Expand All @@ -253,7 +256,7 @@ export const useBudget = (budgets: Ref<Record<string, any>>) => {


if (destination?.id) {
const amount = assign.budgeted;
const amount = assign.budgeted - destination.budgeted;
let rest = amount;

const formData: BudgetMovementProps = {
Expand All @@ -263,7 +266,6 @@ export const useBudget = (budgets: Ref<Record<string, any>>) => {
date: assign.month,
};


if (amount == 0) {
rest = -destination.budgeted
}
Expand Down
8 changes: 5 additions & 3 deletions resources/js/domains/housing/components/OccurrenceWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import CategoryItem from '@/domains/transactions/components/CategoryItem.vue';
import { IOccurrenceCheck } from "@/domains/housing/models";
import { getDayDiff } from '@/utils';

defineProps<{
checks: IOccurrenceCheck[];
}>()
withDefaults(defineProps<{
checks?: IOccurrenceCheck[];
}>(), {
checks: () => ([])
})
</script>

<template>
Expand Down
23 changes: 13 additions & 10 deletions resources/js/domains/transactions/components/ExpenseChartWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const widgetDetailsCols = computed(() => cols[props.cols]);

<template>
<article class="flex">
<section class="relative w-[550px] mx-auto ">
<section class="relative w-[550px] mx-auto flex items-center justify-center">
<DonutChart
style="background: white; width: 100%"
:series="data"
Expand All @@ -57,15 +57,18 @@ const widgetDetailsCols = computed(() => cols[props.cols]);
label="name"
value="total"
:legend="false"
/>
<section class="absolute mx-auto font-bold text-center top-1/2 left-44 text-primary">
<h4>
{{ title }}
</h4>
<h5>
{{ formatMoney(total) }}
</h5>
</section>
>
<template #total>
<section class="font-bold text-center text-primary">
<h4>
{{ title }}
</h4>
<h5>
{{ formatMoney(total) }}
</h5>
</section>
</template>
</DonutChart>
</section>
<section class="space-y-1 grid" :class="[widgetDetailsCols]">
<ExpenseChartWidgetRow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import NextPaymentItem from './NextPaymentItem.vue';

const props = withDefaults(defineProps<{
payments: ITransaction[];
title: string
title?: string
emitActions?: boolean
}>(), {
title: 'Next Payments'
Expand Down
Loading
Loading