Open source personal finance application
Update trns list, item
ilkomed1ccd46117d1
diff --git a/src/components/stat/StatItem.vue b/src/components/stat/StatItem.vueindex 579c5e6e..963006c3 100644--- a/src/components/stat/StatItem.vue+++ b/src/components/stat/StatItem.vue@@ -1,7 +1,7 @@<script>import Amount from '@/components/amount/Amount'import Icon from '@/components/icon/Icon'-import TrnsListView from '@/components/trns/list/TrnsListView'+import TrnsList from '@/components/trns/list/TrnsList'import StatItemChildCats from '@/components/stat/StatItemChildCats'export default {@@ -9,7 +9,7 @@ export default {Amount,Icon,StatItemChildCats,- TrnsListView+ TrnsList},props: {@@ -94,18 +94,17 @@ export default {:value="total")template(v-if="showTrns")- .statItem__cats(- v-if="showChildCategories"- @click.stop="")- StatItemChildCats(:categoryId="categoryId", :type="type")- .statItem__trns(- v-else- @click.stop="")- TrnsListView(- :grouped="false"- :incomes="type === 1"- :expenses="type === 0"- :categoryId="categoryId")+ template(v-if="showChildCategories")+ .statItem__cats(@click.stop="")+ StatItemChildCats(:categoryId="categoryId", :type="type")++ template(v-else)+ .statItem__trns(@click.stop="")+ TrnsList(+ ui="stat"+ :incomes="type === 1"+ :expenses="type === 0"+ :categoryId="categoryId")</template><style lang="stylus" scoped>diff --git a/src/components/stat/StatItemChildCatsItem.vue b/src/components/stat/StatItemChildCatsItem.vueindex 50b21d6b..91341737 100644--- a/src/components/stat/StatItemChildCatsItem.vue+++ b/src/components/stat/StatItemChildCatsItem.vue@@ -1,7 +1,7 @@<script>import Amount from '@/components/amount/Amount'import Icon from '@/components/icon/Icon'-import TrnsListView from '@/components/trns/list/TrnsListView'+import TrnsList from '@/components/trns/list/TrnsList'import StatItemChildCats from '@/components/stat/StatItemChildCats'export default {@@ -9,7 +9,7 @@ export default {Amount,Icon,StatItemChildCats,- TrnsListView+ TrnsList},props: {@@ -69,15 +69,17 @@ export default {@click.stop="() => $store.dispatch('handleSetFilterCategory', categoryId)")Icon(:background="category.color"- :icon="category.icon")+ :icon="category.icon"+ :round="true"+ :medium="true").statItemChild__name {{ category.name }}.statItemChild__amountAmount(:currency="$store.state.currencies.base":value="total").statItemChild__trns(@click.stop="" v-if="showTrns")- TrnsListView(- :grouped="false"+ TrnsList(+ ui="stat":incomes="type === 1":expenses="type === 0":categoryId="categoryId")diff --git a/src/components/trns/item/TrnItem.vue b/src/components/trns/item/TrnItem.vueindex 92621410..5fcd1c7e 100644--- a/src/components/trns/item/TrnItem.vue+++ b/src/components/trns/item/TrnItem.vue@@ -27,31 +27,26 @@ export default {required: true},- insideStatCategory: {- type: Boolean,- default: false- },- fullInfo: {- type: Boolean,- default: false- },- simple: {- type: Boolean,- default: false- },- showDate: {- type: Boolean,- default: false+ ui: {+ type: String,+ default: 'history'}},computed: {+ className () {+ return {+ _detailed: this.ui === 'detailed',+ _history: this.ui === 'history',+ _stat: this.ui === 'stat'+ }+ },formatedDate () {const date = formatDate(this.trn.date, 'full')- return `${date.weekDay}, ${date.day} ${date.month} ${date.year}`+ return `${date.weekday}, ${date.day} ${date.month} ${date.year}`},- formatedDate2 () {- return formatDate(this.trn.date, 'trnItem')+ formatedDateDay () {+ return formatDate(this.trn.date, 'numberDay')}},@@ -74,39 +69,69 @@ export default {.trnItem(v-if="category && wallet"@click="handleClick"- :class="{ _fullInfo: fullInfo, _simple: simple, _insideStatCategory: insideStatCategory }")+ :class="className")- .trnItem__categoryIcon(- @click.stop="setTrnEdit"- v-if="!insideStatCategory")- Icon(- :background="category.color"- :icon="category.icon"- :round="true")-- .trnItem__date(v-if="showDate || fullInfo") {{ formatedDate }}-- .trnItem__categoryName- .desc(v-if="!fullInfo") {{ formatedDate2 }}- .desc(v-if="!insideStatCategory") {{ category.name }}- .desc(v-if="!fullInfo && trn.description") {{ trn.description }}-- .trnItem__wallet- .trnItem__wallet__icon(@click.stop="setTrnEdit")+ //- detailed view+ template(v-if="ui === 'detailed'")+ .trnItem__categoryIcon(@click.stop="setTrnEdit")+ Icon(+ :background="category.color"+ :icon="category.icon"+ :round="true")+ .trnItem__date {{ formatedDate }}+ .trnItem__categoryName {{ category.name }}+ .trnItem__wallet+ .walletIcon+ Icon(+ :abbr="wallet.name"+ :background="wallet.color"+ :small="true")+ .walletName {{ wallet.name }}+ .trnItem__amount(@click.stop="setTrnEdit")+ Amount(+ :currency="wallet.currency"+ :value="trn.amount"+ :type="trn.type")+ .trnItem__desc(v-if="trn.description") {{ trn.description }}++ //- stat view+ template(v-else-if="ui === 'stat'")+ .trnItem__statWrap+ .trnItem__date {{ formatedDateDay }}+ .trnItem__wallet+ .walletIcon+ Icon(+ :abbr="wallet.name"+ :background="wallet.color"+ :small="true")+ .walletName {{ wallet.name }}+ .trnItem__desc(v-if="trn.description") {{ trn.description }}+ .trnItem__amount(@click.stop="setTrnEdit")+ Amount(+ :currency="wallet.currency"+ :value="trn.amount"+ :type="trn.type")++ //- history view+ template(v-else)+ .trnItem__categoryIcon(@click.stop="setTrnEdit")+ Icon(+ :background="category.color"+ :icon="category.icon"+ :round="true")+ .trnItem__categoryName {{ category.name }}+ .trnItem__walletFloatIconIcon(:abbr="wallet.name":background="wallet.color":small="true")- .trnItem__wallet__name {{ wallet.name }}-- .trnItem__amount- Amount(- :currency="wallet.currency"- :value="trn.amount"- :type="trn.type")-- .trnItem__desc(v-if="fullInfo && trn.description") {{ trn.description }}- .trnItem__line+ .trnItem__amount(@click.stop="setTrnEdit")+ Amount(+ :currency="wallet.currency"+ :value="trn.amount"+ :type="trn.type")+ .trnItem__desc(v-if="trn.description") {{ trn.description }}+ .trnItem__line</template><style lang="stylus" scoped>@@ -115,176 +140,151 @@ export default {.trnItemposition relative- display grid- padding 0 $m7- padding-top $m6- margin-top -1px- grid-template-columns minmax(10px, max-content) 1fr minmax(10px, max-content)- grid-column-gap $m9color var(--c-font-4)- &:first-child- margin-top 0-- &._simple- padding 0 $m8-- &._insideStatCategory- padding $m7 $m7- grid-template-columns minmax(20px, 38px) 1fr minmax(10px, max-content)- border-bottom 1px solid var(--c-bg-3)-- /.theme-light &- border-bottom 1px solid var(--c-bg-1)-+ &._detailed+ display grid+ grid-template-columns minmax(10px, max-content) 1fr minmax(10px, max-content)+ grid-column-gap 20px+ grid-row-gap 10px++ &._history+ display grid+ grid-template-columns minmax(10px, max-content) 1fr minmax(10px, max-content)+ grid-column-gap 28px+ padding 0 16px+ padding-top 10px+ margin-top -1px+ &:first-child+ margin-top 0++ &._stat+ margin-top -1px+ padding-top 10px+ padding-left 68px+ padding-right 10px@media $media-laptop- padding $m6 $m8- border 0-- &:active- background var(--c-bg-7)+ padding-left 62px&:hover- @media $media-laptop- background var(--c-bg-7)-- /.theme-light &- background var(--c-bg-5)-- &._fullInfo- &._insideStatCategory- grid-column-gap $m8- grid-row-gap $m5+ &._history+ &._stat+ @media $media-laptop+ background var(--c-bg-7)+ /.theme-light &+ background var(--c-bg-5)&__amount- grid-column 3 / 4- grid-row 1 / 3align-self center- ^[0]._insideStatCategory &- grid-row 1 / 2-- &__date- grid-row 1 / 2- align-self center- font-size 12px+ ^[0]._detailed &+ grid-column 3 / 4+ grid-row 1 / 3- &__desc- grid-column 2 / 4- grid-row 3 / 4- padding-bottom $m6- font-size 12px+ ^[0]._history &+ grid-column 3 / 4+ grid-row 1 / 2- ^[0]._fullInfo &- grid-row 4 / 5- padding-top $m6- padding-bottom 0+ ^[0]._stat &+ margin-left auto&__categoryIcon- grid-column 1 / 2- grid-row 1 / 3-- @media $media-laptop- margin $m4 0+ ^[0]._detailed &+ grid-column 1 / 2+ grid-row 1 / 3+ align-self center&__categoryName- grid-column 2 / 3- grid-row 1 / 3- align-self centerwhite-space nowrapoverflow hiddentext-overflow ellipsis- ^[0]._fullInfo &+ ^[0]._detailed &+ grid-column 2 / 3grid-row 2 / 3- align-self flex-start+ font-size 16px- ^[0]._insideStatCategory &- grid-column 1 / 2+ ^[0]._history &+ grid-column 2 / 3grid-row 1 / 2+ align-self center- .desc- display inline-block- padding-right $m7- font-size 14px-- &__line- grid-column 2 / 4- grid-row 4 / 5- padding-bottom $m6- border-bottom 1px solid var(--c-bg-6)-- ^[0]:hover &- @media $media-laptop- border-color transparent+ &__date+ font-size 13px- ^[0]:last-child &- border-color transparent+ ^[0]._detailed &+ grid-row 1 / 2- ^[0]._fullInfo &- ^[0]._insideStatCategory &- display none+ ^[0]._stat &+ padding-right 20px- &__name- display none- margin-top 2px+ &__desc+ color var(--c-font-2)font-size 14px- line-height 14px+ white-space nowrap+ overflow hidden+ text-overflow ellipsis- @media $media-laptop- display block- font-size 13px+ ^[0]._detailed &+ grid-column 2+ grid-row 4- &__wallet- grid-column 2 / 3- grid-row 2 / 3- display flex- align-items center+ ^[0]._history &+ grid-column 2 / 4+ grid-row 2 / 3+ padding-top 5px+ padding-bottom 5px- @media $media-laptop- padding-top $m5+ ^[0]._stat &+ padding-right 10px- ^[0]._fullInfo &- grid-column 2 / 3- grid-row 3 / 4- display flex- align-items center+ &__line+ ^[0]._history &+ grid-column 2 / 4+ grid-row 4 / 5+ padding-top 9px+ border-bottom 1px solid var(--c-bg-6)+ ^[0]._history:hover &@media $media-laptop- padding-top 0+ border-color transparent- ^[0]._insideStatCategory &- grid-column 2 / 3- grid-row 1 / 2- padding 0+ ^[0]._history:last-child &+ border-color transparent- &__name- display none+ &__statWrap+ display flex+ align-items center+ padding-bottom 10px+ border-bottom 1px solid var(--c-bg-6)- ^[0]._fullInfo &- ^[0]._insideStatCategory &- display block- margin-left $m5- font-size 14px+ ^[0]._stat:hover &+ @media $media-laptop+ border-color transparent- &__icon- position absolute- left $m10- top $m9+ ^[0]._stat:last-child &+ border-color transparent- ^[0]._simple &- left $m10+ &__wallet+ ^[0]._detailed &+ ^[0]._stat &+ display flex+ align-items center+ .walletIcon+ margin-right 8px+ .walletName+ font-size 14px+ white-space nowrap- ^[0]._fullInfo &- ^[0]._insideStatCategory &- position relative- left 0- top 0+ ^[0]._detailed &+ grid-column 2 / 3+ grid-row 3 / 4- .icon- width 18px- height 18px+ ^[0]._stat &+ padding-right 20px- .icon .icon__abbr- font-size 10px+ &__walletFloatIcon+ position absolute+ left 35px+ top 24px</style>diff --git a/src/components/trns/list/TrnsList.vue b/src/components/trns/list/TrnsList.vueindex 14eaecae..5bacac90 100644--- a/src/components/trns/list/TrnsList.vue+++ b/src/components/trns/list/TrnsList.vue@@ -3,6 +3,8 @@ import moment from 'moment'import TrnItem from '@/components/trns/item/TrnItem'import TrnsListDate from '@/components/trns/list/TrnsListDate'+// import { generateDateId } from '@/utils/id'+// import { db } from '@/firebase'export default {components: {@@ -13,12 +15,16 @@ export default {props: {ui: {type: String,- default: 'group'+ default: 'history'},limit: {type: Number,default: 0},+ categoryId: {+ type: String,+ default: null+ },expenses: {type: Boolean,default: false@@ -32,14 +38,19 @@ export default {computed: {trnsIds () {const trns = this.$store.state.trns.items- let trnsIds = this.$store.getters.selectedTrnsIdsWithDate.slice(0, 100) // slice+ let trnsIds = this.$store.getters.selectedTrnsIdsWithDate+ // from category+ if (this.categoryId) {+ trnsIds = trnsIds.filter(trnId => trns[trnId].categoryId === this.categoryId)+ }++ // filter typeif (this.incomes) trnsIds = trnsIds.filter(id => trns[id].type === 1)if (this.expenses) trnsIds = trnsIds.filter(id => trns[id].type === 0)- if (this.limit > 0) {- return trnsIds.slice(0, this.limit)- }+ // limit+ if (this.limit > 0) return trnsIds.slice(0, this.limit)return trnsIds},@@ -65,24 +76,9 @@ export default {<template lang="pug">.trnsListtemplate(v-if="trnsIds.length > 0")- //- simple- //------------------------------------------------- template(v-if="ui === 'simple'")- .trnsList__trns- TrnItem(- v-for="trnId of trns"- :category="$store.state.categories.items[$store.state.trns.items[trnId].categoryId]"- :key="trnId"- :showDate="true"- :trn="$store.state.trns.items[trnId]"- :trnId="trnId"- :wallet="$store.state.wallets.items[$store.state.trns.items[trnId].accountId]")-- //- group- //------------------------------------------------- template(v-if="ui === 'group'")- .trnsList__day(- v-for="(trnsIds, date) in groupedTrns")+ //- history view+ template(v-if="ui === 'history'")+ .trnsList__day(v-for="(trnsIds, date) in groupedTrns").trnsList__header: TrnsListDate(:date="date").trnsList__trnsTrnItem(@@ -92,6 +88,17 @@ export default {:trn="$store.state.trns.items[trnId]":trnId="trnId":wallet="$store.state.wallets.items[$store.state.trns.items[trnId].accountId]")++ //- stat view+ template(v-else)+ template(v-for="trnId of trnsIds")+ TrnItem(+ :category="$store.state.categories.items[$store.state.trns.items[trnId].categoryId]"+ :key="trnId"+ :trn="$store.state.trns.items[trnId]"+ :trnId="trnId"+ :ui="ui"+ :wallet="$store.state.wallets.items[$store.state.trns.items[trnId].accountId]")</template><style lang="stylus" scoped>diff --git a/src/components/trns/list/TrnsListDate.vue b/src/components/trns/list/TrnsListDate.vueindex e9ca460f..420580db 100644--- a/src/components/trns/list/TrnsListDate.vue+++ b/src/components/trns/list/TrnsListDate.vue@@ -1,10 +1,7 @@<script>import { formatDate } from '@/utils/formatDate'-import TrnItem from '@/components/trns/item/TrnItem'export default {- components: { TrnItem },-props: {date: {type: String,@@ -23,8 +20,40 @@ export default {<template lang="pug">.trnsListDate.trnsListDate__day {{ formatedDate.day }}- .trnsListDate__weekDay {{ formatedDate.weekDay }}- .trnsListDate__other+ .trnsListDate__weekday {{ formatedDate.weekday }}+ .trnsListDate__details.trnsListDate__month {{ formatedDate.month }}.trnsListDate__year {{ formatedDate.year }}</template>++<style lang="stylus" scoped>+@import "~@/stylus/variables/margins"++.trnsListDate+ display grid+ grid-template-columns minmax(0, max-content) minmax(0, max-content)+ grid-template-rows repeat(2, minmax(0, max-content))++ &__day+ grid-column 1 / 2+ grid-row 1 / 3+ padding-right 10px+ align-self center+ font-size 28px++ &__weekday+ grid-column 2 / 3+ grid-row 1 / 2+ font-size 14px++ &__details+ grid-column 2 / 3+ grid-row 2 / 3+ display flex+ padding-top 4px+ color var(--c-font-4)+ font-size 13px++ &__month+ margin-right $m4+</style>diff --git a/src/components/trns/list/TrnsListView.vue b/src/components/trns/list/TrnsListView.vuedeleted file mode 100644index cb512ca2..00000000--- a/src/components/trns/list/TrnsListView.vue+++ /dev/null@@ -1,147 +0,0 @@-<script>-import moment from 'moment'-import TrnItem from '@/components/trns/item/TrnItem'--export default {- components: {- TrnItem- },-- props: {- categoryId: {- type: String,- required: true- },- limit: {- type: Number,- default: 0- },- expenses: {- type: Boolean,- default: false- },- incomes: {- type: Boolean,- default: false- },-- grouped: {- type: Boolean,- default: true- }- },-- computed: {- trnsIds () {- const categories = this.$store.state.categories.items- const categoriesIds = Object.keys(categories)- const trns = this.$store.state.trns.items- let trnsIds = this.$store.getters.selectedTrnsIdsWithDate-- const categoryId = this.categoryId-- const childCategoriesIds = categoriesIds.filter(id => categories[id].parentId === categoryId)- if (childCategoriesIds.length) {- trnsIds = trnsIds.filter(trnId => {- const trnCategoryId = trns[trnId].categoryId- for (const categoryId of childCategoriesIds) {- if (trnCategoryId === categoryId) return true- }- })- } else {- trnsIds = trnsIds.filter(trnId => trns[trnId].categoryId === categoryId)- }-- if (this.incomes) trnsIds = trnsIds.filter(id => trns[id].type === 1)- if (this.expenses) trnsIds = trnsIds.filter(id => trns[id].type === 0)-- if (this.limit > 0) {- return trnsIds.slice(0, this.limit)- }-- return trnsIds- },-- groupedTrns () {- const trns = this.$store.state.trns.items- const trnsIds = this.trnsIds- const trnsList = {}-- const today = moment().startOf('day').valueOf()- const yestarday = moment().subtract(1, 'day').startOf('day').valueOf()-- for (const trnId of trnsIds) {- const dayDate = moment(trns[trnId].date).startOf('day').valueOf()-- switch (dayDate) {- case today:- !trnsList['today']- ? trnsList['today'] = [trnId]- : trnsList['today'].push(trnId)- break- case yestarday:- !trnsList['yestarday']- ? trnsList['yestarday'] = [trnId]- : trnsList['yestarday'].push(trnId)- break- default:- !trnsList['more']- ? trnsList['more'] = [trnId]- : trnsList['more'].push(trnId)- break- }- }-- return trnsList- }- }-}-</script>--<template lang="pug">-.trnListView- template(v-for="(trnsIds, date) in groupedTrns")- .trnsGroup- template(v-if="$store.state.filter.period !== 'day' && grouped")- .trnsGroup__date(v-if="groupedTrns['today'] || groupedTrns['yestarday']") {{ date }}- .trnsGroup__trns- template(v-for="trnId of trnsIds")- TrnItem(- :category="$store.state.categories.items[$store.state.trns.items[trnId].categoryId]"- :key="trnId"- :simple="true"- :insideStatCategory="true"- :trn="$store.state.trns.items[trnId]"- :trnId="trnId"- :wallet="$store.state.wallets.items[$store.state.trns.items[trnId].accountId]")-</template>--<style lang="stylus" scoped>-@import "~@/stylus/variables/margins"-@import "~@/stylus/variables/media"--.trnsGroup- &__date- padding-bottom $m6- text-transform capitalize- color var(--c-font-4)-</style>--<style lang="stylus">-@import "~@/stylus/variables/margins"-@import "~@/stylus/variables/media"--.list- .trnItem- color var(--c-font-4)-- @media $media-laptop- padding-left $mb2-- .trnItem__date- color var(--c-font-2)-- .trnItem__line- margin-bottom $m6- padding-bottom $m6-</style>diff --git a/src/components/trns/list/TrnsListViewEasy.vue b/src/components/trns/list/TrnsListViewEasy.vuedeleted file mode 100644index 81141081..00000000--- a/src/components/trns/list/TrnsListViewEasy.vue+++ /dev/null@@ -1,104 +0,0 @@-<script>-import moment from 'moment'-import TrnItem from '@/components/trns/item/TrnItem'--export default {- components: {- TrnItem- },-- props: {- //- },-- computed: {- groupedTrns () {- const trns = this.$store.state.trns.items- const trnsIds = this.$store.getters.selectedTrnsIdsWithDate- const trnsList = {}-- const today = moment().startOf('day').valueOf()- const yesterday = moment().subtract(1, 'day').startOf('day').valueOf()-- for (const trnId of trnsIds) {- const dayDate = moment(trns[trnId].date).startOf('day').valueOf()-- switch (dayDate) {- case today:- !trnsList['today']- ? trnsList['today'] = [trnId]- : trnsList['today'].push(trnId)- break- case yesterday:- !trnsList['yesterday']- ? trnsList['yesterday'] = [trnId]- : trnsList['yesterday'].push(trnId)- break- }- }-- return trnsList- }- }-}-</script>--<template lang="pug">-.trnListView(v-if="groupedTrns['today'] || groupedTrns['yesterday']")- template(v-for="(trnsIds, date) in groupedTrns")- .trnsGroup- .trnsGroup__date(v-if="groupedTrns['today'] || groupedTrns['yesterday']") {{ date }}- .trnsGroup__trns- template(v-for="trnId of trnsIds")- TrnItem(- :category="$store.state.categories.items[$store.state.trns.items[trnId].categoryId]"- :key="trnId"- :trn="$store.state.trns.items[trnId]"- :trnId="trnId"- :wallet="$store.state.wallets.items[$store.state.trns.items[trnId].accountId]"- )-</template>--<style lang="stylus" scoped>-@import "~@/stylus/variables/margins"-@import "~@/stylus/variables/media"--.trnListView- padding $m7 0- padding-bottom $m7- border-bottom 1px solid var(--c-bg-1)--.trnsGroup- padding-bottom $m8-- &:last-child- padding-bottom 0-- &__date- padding 0 $m7- padding-bottom $m5- text-transform capitalize-</style>--<style lang="stylus">-@import "~@/stylus/variables/margins"-@import "~@/stylus/variables/media"--.list- .trnItem- // padding-left $m7- color var(--c-font-4)-- @media $media-laptop- padding-left $mb2-- .trnItem__date- color var(--c-font-2)-- .trnItem__categoryIcon- // display none-- .trnItem__line- margin-bottom $m6- padding-bottom $m6-</style>diff --git a/src/components/trns/list/trnsListDate.styl b/src/components/trns/list/trnsListDate.styldeleted file mode 100644index 976d0b24..00000000--- a/src/components/trns/list/trnsListDate.styl+++ /dev/null@@ -1,28 +0,0 @@-.trnsListDate- display grid- grid-template-columns minmax(0, max-content) minmax(0, max-content)- grid-template-rows repeat(2, minmax(0, max-content))-- &__day- grid-column 1 / 2- grid-row 1 / 3- padding-right $m6- align-self center- font-size 34px- line-height 28px-- &__weekDay- grid-column 2 / 3- grid-row 1 / 2- font-size 14px-- &__other- grid-column 2 / 3- grid-row 2 / 3- display flex- padding-top $m2- color var(--c-font-4)- font-size 14px-- &__month- margin-right $m4diff --git a/src/components/trns/modal/TrnModal.vue b/src/components/trns/modal/TrnModal.vueindex 72dc8730..424b9bcf 100644--- a/src/components/trns/modal/TrnModal.vue+++ b/src/components/trns/modal/TrnModal.vue@@ -75,70 +75,62 @@ export default {ModalBottom(:show="$store.state.trns.modal.show"v-on:onClose="$store.commit('hideTrnModal')"- v-on:afterClose="$store.commit('setTrnModalId', null)"-)+ v-on:afterClose="$store.commit('setTrnModalId', null)")+template(v-if="trnId")template(slot="header")//- trn- TrnItem.disable-hover(+ TrnItem(:category="category"- :trnId="trnId":trn="$store.state.trns.items[trnId]"+ :trnId="trnId":wallet="wallet"- :fullInfo="true"- )+ ui="detailed")//- btnstemplate(slot="btns")ModalButton(name="Delete"icon="mdi mdi-delete"- v-on:onClick="handleDeleteClick"- )+ v-on:onClick="handleDeleteClick")+ModalButton(name="Edit"icon="mdi mdi-pencil"- v-on:onClick="handleEditClick"- )+ v-on:onClick="handleEditClick")+ModalButton(name="Dublicate"icon="mdi mdi-content-copy"- v-on:onClick="handleDublicateTrn"- )+ v-on:onClick="handleDublicateTrn")- .actions-extra- Button.margin(+ .moreActions+ Button.marginBottom(className="_grey"title="Set category filter"icon="mdi mdi-chart-bubble"- v-on:onClick="handleSetFilterCategory"- )+ v-on:onClick="handleSetFilterCategory")+Button(className="_grey"title="Set wallet filter"icon="mdi mdi-credit-card-multiple"- v-on:onClick="handleSetFilterWallet"- )+ v-on:onClick="handleSetFilterWallet")//- confirmModalBottomConfirm(:show="showModalConfirm"v-on:onClose="showModalConfirm = false"- v-on:onConfirm="handleDeleteConfirm"- )+ v-on:onConfirm="handleDeleteConfirm")</template><style lang="stylus" scoped>@import "~@/stylus/variables/margins"@import "~@/stylus/variables/scrollbar"-.disable-hover:hover-.disable-hover:active- background 0--.margin+.marginBottommargin-bottom $m7-.actions-extra+.moreActionspadding-top $m8</style>diff --git a/src/utils/formatDate.js b/src/utils/formatDate.jsindex 32102310..adc59622 100644--- a/src/utils/formatDate.js+++ b/src/utils/formatDate.js@@ -8,7 +8,7 @@ export const formatDate = (value, type) => {case 'full':return {day: date.format('D'),- weekDay: date.calendar(null, {+ weekday: date.calendar(null, {sameDay: '[Today] ddd',nextDay: '[Tomorrow] ddd',nextWeek: 'dddd',@@ -23,6 +23,9 @@ export const formatDate = (value, type) => {case 'number':return date.format('DD.MM.YY')+ case 'numberDay':+ return date.format('DD.MM')+case 'trnItem':if (today.isSame(date, 'year')) {return date.format('DD MMM')