rename DebitAverage to CategoriesStats
This commit is contained in:
parent
7ab29e4cd2
commit
f28c91a281
2 changed files with 9 additions and 7 deletions
|
|
@ -91,8 +91,8 @@
|
|||
:date-from="dateFrom"
|
||||
:date-to="dateTo"
|
||||
/>
|
||||
<DebitAverage
|
||||
v-if="item.component === 'DebitAverage'"
|
||||
<CategoriesStats
|
||||
v-if="item.component === 'CategoriesStats'"
|
||||
:data="data"
|
||||
:date-from="dateFrom"
|
||||
:date-to="dateTo"
|
||||
|
|
@ -116,7 +116,7 @@ import SavingAccounts from './../components/dashboard/SavingAccounts.vue'
|
|||
import Distribution from './../components/dashboard/Distribution.vue'
|
||||
import MonthThresholds from './../components/dashboard/MonthThresholds.vue'
|
||||
import DiffCreditDebit from './../components/dashboard/DiffCreditDebit.vue'
|
||||
import DebitAverage from './../components/dashboard/DebitAverage.vue'
|
||||
import CategoriesStats from './../components/dashboard/CategoriesStats.vue'
|
||||
import {VueDraggableNext as Draggable} from 'vue-draggable-next'
|
||||
|
||||
const data = ref(null)
|
||||
|
|
@ -132,7 +132,7 @@ const defaultComponents = [
|
|||
{component: 'SavingAccounts', size: 4},
|
||||
{component: 'Distribution', size: 12},
|
||||
{component: 'DiffCreditDebit', size: 12},
|
||||
{component: 'DebitAverage', size: 12},
|
||||
{component: 'CategoriesStats', size: 12},
|
||||
{component: 'MonthThresholds', size: 12},
|
||||
]
|
||||
|
||||
|
|
@ -242,14 +242,16 @@ onMounted(() => {
|
|||
})
|
||||
|
||||
defaultComponents.forEach((defaultComponent) => {
|
||||
const exists =
|
||||
config.value.filter((c) => defaultComponent.component === c.component)
|
||||
.length !== 0
|
||||
const exists = config.value.filter((c) => defaultComponent.component === c.component).length !== 0
|
||||
|
||||
if (!exists) {
|
||||
config.value.push(defaultComponent)
|
||||
}
|
||||
})
|
||||
|
||||
config.value = config.value.filter((configItem) => {
|
||||
return defaultComponents.filter((defaultComponent) => configItem.component === defaultComponent.component).length > 0
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue