Open source personal finance application
update 3.9.1
ilkome23fadbc58ce9
diff --git a/components/dashboard/DashboardNav.vue b/components/dashboard/DashboardNav.vueindex d33ced9a..930b9234 100644--- a/components/dashboard/DashboardNav.vue+++ b/components/dashboard/DashboardNav.vue@@ -7,6 +7,18 @@ export default {}},+ computed: {+ isEmptyData () {+ const statCurrentPeriod = this.$store.getters['stat/statCurrentPeriod']+ if (statCurrentPeriod.incomes.categoriesIds.length === 0 &&+ statCurrentPeriod.expenses.categoriesIds.length === 0 &&+ this.$store.getters['trns/selectedTrnsIdsWithDate'].length === 0) {+ return true+ }+ return false+ }+ },+methods: {toogleShowStatGraphs () {this.$store.commit('dashboard/setDashboardActiveTab', 'stat')@@ -77,7 +89,10 @@ export default {.periodNav__group._align-right//- all stat chart- .periodNav__item(v-show="$store.state.ui.statGraphsVisibility === 'visible'")+ .periodNav__item(+ v-if="!isEmptyData"+ v-show="$store.state.ui.statGraphsVisibility === 'visible'"+ )ChartMenu(:showDropdown="true")//- customize@@ -94,39 +109,40 @@ export default {)template(slot="content")- ContextMenuItem(- :title="$t('stat.customize.showPeriodsChart')"- :checkboxValue="$store.state.ui.statGraphsVisibility === 'visible'"- showCheckbox- icon="mdi mdi-chart-bar-stacked"- @onClick="toogleShowStatGraphs"- )-- ContextMenuItem(- icon="mdi mdi-folder-star"- :title="$t('stat.customize.showCategorisChart')"- :checkboxValue="$store.state.ui.catsChart === 'visible'"- showCheckbox- @onClick="toogleVisibleCatsChart"- )-- ContextMenuItem(- :title="$t('stat.customize.showCategorisList')"- :checkboxValue="$store.state.ui.statItems === 'visible'"- showCheckbox- icon="mdi mdi-chart-gantt"- @onClick="toogleVisibilityStatItems"- )-- ContextMenuItem(- :checkboxValue="$store.state.ui.catsChartPie === 'visible'"- :title="$t('stat.customize.showcatsChartPie')"- showCheckbox- icon="mdi mdi-chart-pie"- @onClick="$store.dispatch('ui/toogleVisibleCatsChartPie')"- )-- .context-menu-sep+ template(v-if="!isEmptyData")+ ContextMenuItem(+ :title="$t('stat.customize.showPeriodsChart')"+ :checkboxValue="$store.state.ui.statGraphsVisibility === 'visible'"+ showCheckbox+ icon="mdi mdi-chart-bar-stacked"+ @onClick="toogleShowStatGraphs"+ )++ ContextMenuItem(+ icon="mdi mdi-folder-star"+ :title="$t('stat.customize.showCategorisChart')"+ :checkboxValue="$store.state.ui.catsChart === 'visible'"+ showCheckbox+ @onClick="toogleVisibleCatsChart"+ )++ ContextMenuItem(+ :title="$t('stat.customize.showCategorisList')"+ :checkboxValue="$store.state.ui.statItems === 'visible'"+ showCheckbox+ icon="mdi mdi-chart-gantt"+ @onClick="toogleVisibilityStatItems"+ )++ ContextMenuItem(+ :checkboxValue="$store.state.ui.catsChartPie === 'visible'"+ :title="$t('stat.customize.showcatsChartPie')"+ showCheckbox+ icon="mdi mdi-chart-pie"+ @onClick="$store.dispatch('ui/toogleVisibleCatsChartPie')"+ )++ .context-menu-sepContextMenuItem(:title="$t('theme.change')"diff --git a/components/dashboard/DashboardStatControl.vue b/components/dashboard/DashboardStatControl.vueindex 570244bb..4a140d3d 100644--- a/components/dashboard/DashboardStatControl.vue+++ b/components/dashboard/DashboardStatControl.vue@@ -1,5 +1,18 @@<script>export default {+ name: 'DashboardStatControl',++ computed: {+ isEmptyData () {+ const statCurrentPeriod = this.$store.getters['stat/statCurrentPeriod']+ if (statCurrentPeriod.incomes.categoriesIds.length === 0 &&+ statCurrentPeriod.expenses.categoriesIds.length === 0 &&+ this.$store.getters['trns/selectedTrnsIdsWithDate'].length === 0) {+ return true+ }+ return false+ }+ }}</script>@@ -17,15 +30,16 @@ export default {:class="{ _active: $store.state.dashboard.activeTab === 'history' }") {{ $t('trns.history') }}- .tabItem(- @click="$store.commit('dashboard/setDashboardActiveTab', 'balance')"- :class="{ _active: $store.state.dashboard.activeTab === 'balance' }"- ) {{ $t('stat.balanceTitle') }}+ template(v-if="!isEmptyData")+ .tabItem(+ @click="$store.commit('dashboard/setDashboardActiveTab', 'balance')"+ :class="{ _active: $store.state.dashboard.activeTab === 'balance' }"+ ) {{ $t('stat.balanceTitle') }}- .tabItem(- @click="$store.commit('dashboard/setDashboardActiveTab', 'analytics')"- :class="{ _active: $store.state.dashboard.activeTab === 'analytics' }"- ) + .tabItem(+ @click="$store.commit('dashboard/setDashboardActiveTab', 'analytics')"+ :class="{ _active: $store.state.dashboard.activeTab === 'analytics' }"+ ) .tabs.tabItem(diff --git a/components/layout/LayoutMobile.vue b/components/layout/LayoutMobile.vueindex 21a04cbf..4e7dea5a 100644--- a/components/layout/LayoutMobile.vue+++ b/components/layout/LayoutMobile.vue@@ -230,7 +230,7 @@ export default {).periodItem__name {{ periodItem.name }}.periodItem__count(- v-if="filterPeriod !== 'all'"+ v-if="$store.state.filter.period === periodItem.slug && filterPeriod !== 'all'") {{ $store.state.chart.periods[periodItem.slug].showedPeriods }}.periodItem(@@ -400,7 +400,7 @@ export default {).periodItem__name {{ periodItem.name }}.periodItem__count(- v-if="filterPeriod !== 'all'"+ v-if="$store.state.filter.period === periodItem.slug && filterPeriod !== 'all'") {{ $store.state.chart.periods[periodItem.slug].showedPeriods }}.periodItem(@@ -408,6 +408,10 @@ export default {@click="addPeriodOrGroup"): .mdi.mdi-plus+ .periodItem(+ @click="isShowDataLabels = !isShowDataLabels"+ ): .mdi.mdi-subtitles-outline+//- Chart Content//-----------------------------template(v-if="activeTabViewName === 'chart' || activeTabViewName === 'incomes' || activeTabViewName === 'expenses'")@@ -418,6 +422,7 @@ export default {v-if="$store.getters['trns/hasTrns'] && filterPeriod !== 'all'":isShowIncomes="activeTabViewName === 'incomes' || activeTabViewName === 'chart'":isShowExpenses="activeTabViewName === 'expenses' || activeTabViewName === 'chart'"+ :isShowDataLabels="isShowDataLabels")//- Historydiff --git a/components/layout/LayoutMobileDatesSlider.vue b/components/layout/LayoutMobileDatesSlider.vueindex 07ff4e3f..d5ab9d60 100644--- a/components/layout/LayoutMobileDatesSlider.vue+++ b/components/layout/LayoutMobileDatesSlider.vue@@ -131,6 +131,9 @@ export default {align-items centerjustify-content center+ &__name+ text-transform capitalize+&__dotspadding-top 3pxpadding-left 4pxdiff --git a/components/layout/LayoutPc.vue b/components/layout/LayoutPc.vueindex b0a4e415..1a3b08df 100644--- a/components/layout/LayoutPc.vue+++ b/components/layout/LayoutPc.vue@@ -17,18 +17,9 @@ export default {<template lang="pug">.layout- .createTrnBtn(- v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']"- @click="$store.dispatch('trnForm/openTrnForm', { action: 'create' })"- ): .mdi.mdi-plus-//- modalsCategoryModalCurrencyModal- TrnForm(- v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']"- :isShow="$store.state.trnForm.show"- )TrnModalWalletModal@@ -117,10 +108,18 @@ export default {LayoutPcTab(:show="activeTab === 'settings'")Settings- .layout-formSideOpener(- v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']"- @click="$store.dispatch('trnForm/openTrnForm', { action: 'create' })"- )+ .layout__item(v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']")+ TrnForm(+ :isShow="$store.state.trnForm.show"+ )++ template(v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']")+ .sideOpener(+ v-show="!$store.state.trnForm.show"+ @click="$store.dispatch('trnForm/openTrnForm', { action: 'create' })"+ )+ .sideOpener__bg+ .sideOpener__btn: .mdi.mdi-plus</template><style lang="stylus">@@ -145,7 +144,6 @@ export default {&__lineheight 6pxmargin-right (- $m8)- // margin-bottom $m8margin-left (- $m8).dashboardItems .categoryItem@@ -155,37 +153,6 @@ export default {<style lang="stylus" scoped>@import '~assets/stylus/variables'-.layoutBg- z-index 1- opacity .05- position absolute- top 0- right 0- display flex- align-items center- justify-content center- height 100%- font-size 1000px--.layout-formSideOpener- z-index 2- cursor pointer- opacity .3- position fixed- top 0- right 0- width 50px- height 100%- anim-all()-- @media $media-xl- width 180px- @media $media-xl2- width 400px-- &:hover- background var(--c-bg-8)-.layoutoverflow hiddenposition relative@@ -199,7 +166,7 @@ export default {min-height 100vhmin-width 600pxbackground var(--c-bg-2)- grid-template-columns 280px 1fr+ grid-template-columns 280px 1fr auto@media $media-xlborder-right 1px solid var(--c-bg-1)@@ -223,32 +190,59 @@ export default {width 100%height 100%-.createTrnBtn- z-index 5+.sideOpener+ z-index 10cursor pointer- position absolute- right $m8- bottom $m8- display flex- align-items center- justify-content center- width 60px- height 60px- padding $m7 $m8- color var(--c-font-1)- font-size 44px- background var(--c-blue-1)- border-radius 50%- anim()-- &:hover- transform scale(1.2)--.position- position absolute+ opacity 1+ position fixedtop 0- left 0- display grid- width 100%+ right 0+ width 50pxheight 100%++ @media $media-xl+ width 180px++ @media $media-xl2+ width 400px++ +media-hover()+ .sideOpener__bg+ background var(--c-bg-8)++ .sideOpener__btn+ transform scale(1.2)++ &__bg+ opacity .5+ position absolute+ top 0+ left 0+ width 100%+ height 100%+ anim-all()++ +media-hover()+ background var(--c-bg-8)++ &__btn+ z-index 5+ cursor pointer+ position absolute+ right $m8+ bottom $m8+ display flex+ align-items center+ justify-content center+ width 60px+ height 60px+ padding $m7 $m8+ color var(--c-font-1)+ font-size 44px+ background var(--c-blue-1)+ border-radius 50%+ anim()++ +media-hover()+ transform scale(1.2)</style>diff --git a/components/stat/StatPc.vue b/components/stat/StatPc.vueindex dd0c252a..230ecd9e 100644--- a/components/stat/StatPc.vue+++ b/components/stat/StatPc.vue@@ -69,8 +69,9 @@ export default {&__contentdisplay grid- grid-template-columns repeat(2,minmax(280px, 50%))+ grid-template-columns repeat(auto-fill, minmax(280px, 47%))grid-column-gap $m10+ grid-row-gap $m10&__chartdisplay flexdiff --git a/components/stat/StatSummaryPc.vue b/components/stat/StatSummaryPc.vueindex 83f6e99a..7c6dad45 100644--- a/components/stat/StatSummaryPc.vue+++ b/components/stat/StatSummaryPc.vue@@ -88,9 +88,9 @@ export default {</template><style lang="stylus" scoped>-@import "~assets/stylus/variables/margins"-@import "~assets/stylus/variables/fonts"-@import "~assets/stylus/variables/media"+@import '~assets/stylus/variables/margins'+@import '~assets/stylus/variables/fonts'+@import '~assets/stylus/variables/media'.summaryoverflow hidden@@ -99,9 +99,11 @@ export default {border-bottom 1px solid var(--c-bg-2)&__wrap- display flex+ display gridflex-flow row- justify-content space-between+ grid-template-columns repeat(auto-fill, minmax(200px, 1fr))+ grid-column-gap $m9+ grid-row-gap $m9max-width 1100pxpadding 20px 60px@@ -115,11 +117,6 @@ export default {padding-right 0@media $media-laptop- flex 0 1 250px- margin 0- padding 0-- @media $media-pcpadding $m3 $m8padding-right 0diff --git a/components/trnForm/TrnForm.vue b/components/trnForm/TrnForm.vueindex ab82f7e1..a6083e38 100644--- a/components/trnForm/TrnForm.vue+++ b/components/trnForm/TrnForm.vue@@ -375,19 +375,15 @@ $transition-style = cubic-bezier(.17, .04, .03, 1).trnForm&__overflow- position fixed- top 0- right 0- width 100%- height 100%- anim()-- +media-ipad()- width 440px+ @media $media-phone+ position fixed+ top 0+ right 0+ width 100%+ height 100%+ anim()&__wrap- // width 700px- // max-width 760pxborder 1px solid var(--c-bg-1)box-shadow 0 0 10px 5px var(--c-bg-1)diff --git a/components/trnForm/styles/trnForm.styl b/components/trnForm/styles/trnForm.stylindex 883c2dbb..9bba2c4a 100644--- a/components/trnForm/styles/trnForm.styl+++ b/components/trnForm/styles/trnForm.styl@@ -1,31 +1,35 @@.trnForm- overflow hidden- z-index 10- position fixed- bottom 0- height auto-@media $media-phone+ overflow hidden+ z-index 10+ position fixedleft 0+ bottom 0width 100%+ height auto@media $media-laptop- top 10%- right 20px- bottom inherit- height calc(100% - 20%)+ display grid+ margin $m7border-radius 16px&__overflow- position fixed- right 0+ position absolute+ left 0bottom 0width 100%height 100%background var(--c-bg-14)+ @media $media-phone+ position fixed+ right 0+ bottom 0+ width 100%+ height 100%+@media $media-laptop- width 440px+ opacity .3&__wrapoverflow hidden@@ -43,9 +47,8 @@margin-left auto@media $media-laptop- // overflow hidden+ align-self centerwidth 400px- // max-height calc(100vh - 100px)background 0&__scrolldiff --git a/package.json b/package.jsonindex f6c4a6f2..b949c8ff 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "finapp",- "version": "3.9.0",+ "version": "3.9.1","scripts": {"dev": "cross-env NUXT_HOST=0.0.0.0 nuxt","build": "nuxt build",diff --git a/store/categories/getters.js b/store/categories/getters.jsindex 1378a021..5400b7b8 100644--- a/store/categories/getters.js+++ b/store/categories/getters.js@@ -1,7 +1,8 @@export default {hasCategories (state) {if (state.items) {- if (Object.keys(state.items).length > 0) {+ // More than 1 because categories has 1 static category "Transfer"+ if (Object.keys(state.items).length > 1) {return true}}