diff --git a/Web/src/views/StatisticsView.vue b/Web/src/views/StatisticsView.vue index e63a020..89c76d1 100644 --- a/Web/src/views/StatisticsView.vue +++ b/Web/src/views/StatisticsView.vue @@ -102,9 +102,9 @@ -
+
{ - const list = [...expenseCategories.value] - const unclassifiedIndex = list.findIndex(c => !c.classify) - if (unclassifiedIndex !== -1) { - const [unclassified] = list.splice(unclassifiedIndex, 1) - list.unshift(unclassified) - } +const expenseCategoriesSimpView = computed(() => { + const list = expenseCategoriesView.value if (showAllExpense.value || list.length <= 7) return list @@ -409,6 +404,17 @@ const expenseCategoriesView = computed(() => { return top }) +const expenseCategoriesView = computed(() => { + const list = [...expenseCategories.value] + const unclassifiedIndex = list.findIndex(c => !c.classify) + if (unclassifiedIndex !== -1) { + const [unclassified] = list.splice(unclassifiedIndex, 1) + list.unshift(unclassified) + } + + return list +}) + const incomeCategoriesView = computed(() => { const list = [...incomeCategories.value] const unclassifiedIndex = list.findIndex(c => !c.classify)