diff --git a/src/AccountTracking.Web/src/components/CumulativeSpendingChart.vue b/src/AccountTracking.Web/src/components/CumulativeSpendingChart.vue new file mode 100644 index 0000000..37f9f9f --- /dev/null +++ b/src/AccountTracking.Web/src/components/CumulativeSpendingChart.vue @@ -0,0 +1,32 @@ + + + + + Žádné výdaje + + diff --git a/src/AccountTracking.Web/src/components/DonutChart.vue b/src/AccountTracking.Web/src/components/DonutChart.vue new file mode 100644 index 0000000..ca26e12 --- /dev/null +++ b/src/AccountTracking.Web/src/components/DonutChart.vue @@ -0,0 +1,59 @@ + + + + + + + + Žádné výdaje + + + + + + + {{ item.label }} + {{ item.total.toLocaleString('cs-CZ') }} Kč + + + + diff --git a/src/AccountTracking.Web/src/components/MonthSummary.vue b/src/AccountTracking.Web/src/components/MonthSummary.vue new file mode 100644 index 0000000..1cf2368 --- /dev/null +++ b/src/AccountTracking.Web/src/components/MonthSummary.vue @@ -0,0 +1,74 @@ + + + + + + + {{ period.monthLabel }} + + + + + + + + VÝDAJE + {{ (summary?.totalSpent ?? 0).toLocaleString('cs-CZ') }} Kč + + + PŘÍJMY + {{ (summary?.totalIncome ?? 0).toLocaleString('cs-CZ') }} Kč + + + + + + VÝDAJE DLE KATEGORIÍ + + + + KUMULATIVNÍ VÝDAJE + + + + + + diff --git a/src/AccountTracking.Web/src/components/MonthlyBalancesChart.vue b/src/AccountTracking.Web/src/components/MonthlyBalancesChart.vue new file mode 100644 index 0000000..e7b49de --- /dev/null +++ b/src/AccountTracking.Web/src/components/MonthlyBalancesChart.vue @@ -0,0 +1,32 @@ + + + + + + diff --git a/src/AccountTracking.Web/src/components/UploadCsvButton.vue b/src/AccountTracking.Web/src/components/UploadCsvButton.vue new file mode 100644 index 0000000..ecdc38b --- /dev/null +++ b/src/AccountTracking.Web/src/components/UploadCsvButton.vue @@ -0,0 +1,56 @@ + + + + + + Nahrát CSV + + + {{ snackbarText }} + + diff --git a/src/AccountTracking.Web/src/components/YearSummary.vue b/src/AccountTracking.Web/src/components/YearSummary.vue new file mode 100644 index 0000000..2373e10 --- /dev/null +++ b/src/AccountTracking.Web/src/components/YearSummary.vue @@ -0,0 +1,74 @@ + + + + + + + {{ period.year }} + + + + + + + + VÝDAJE + {{ (summary?.totalSpent ?? 0).toLocaleString('cs-CZ') }} Kč + + + PŘÍJMY + {{ (summary?.totalIncome ?? 0).toLocaleString('cs-CZ') }} Kč + + + + + + VÝDAJE DLE KATEGORIÍ + + + + MĚSÍČNÍ ZŮSTATKY + + + + + + diff --git a/src/AccountTracking.Web/src/stores/dashPeriod.ts b/src/AccountTracking.Web/src/stores/dashPeriod.ts new file mode 100644 index 0000000..93acbd9 --- /dev/null +++ b/src/AccountTracking.Web/src/stores/dashPeriod.ts @@ -0,0 +1,28 @@ +import { defineStore } from 'pinia' +import { ref, computed } from 'vue' + +export const useDashPeriodStore = defineStore('dashPeriod', () => { + const now = new Date() + const year = ref(now.getFullYear()) + const month = ref(now.getMonth() + 1) // 1-based + + const monthLabel = computed(() => { + const d = new Date(year.value, month.value - 1, 1) + return d.toLocaleDateString('cs-CZ', { month: 'long', year: 'numeric' }) + }) + + function prevMonth() { + if (month.value === 1) { month.value = 12; year.value-- } + else month.value-- + } + + function nextMonth() { + if (month.value === 12) { month.value = 1; year.value++ } + else month.value++ + } + + function prevYear() { year.value-- } + function nextYear() { year.value++ } + + return { year, month, monthLabel, prevMonth, nextMonth, prevYear, nextYear } +}) diff --git a/src/AccountTracking.Web/src/views/DashboardView.vue b/src/AccountTracking.Web/src/views/DashboardView.vue index 5a928f7..092d648 100644 --- a/src/AccountTracking.Web/src/views/DashboardView.vue +++ b/src/AccountTracking.Web/src/views/DashboardView.vue @@ -1 +1,39 @@ -Dashboard + + + + + Finance Tracker + + + Transakce + + + + + + + + + + + + + + + + +