From 239e3e43ac34fd4b4f8c29acb618d16de9e6ad11 Mon Sep 17 00:00:00 2001 From: xds Date: Mon, 10 Nov 2025 09:17:07 +0300 Subject: [PATCH] fix empty category --- .../transactions/TransactionCreateUpdate.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/transactions/TransactionCreateUpdate.vue b/src/components/transactions/TransactionCreateUpdate.vue index fcd8918..a235465 100644 --- a/src/components/transactions/TransactionCreateUpdate.vue +++ b/src/components/transactions/TransactionCreateUpdate.vue @@ -29,6 +29,8 @@ const tgApp = window.Telegram.WebApp const isCategorySelectorOpened = ref(false); const categories = ref([]); +const incomeCategories = computed(() => categories.value.filter(i => i.type == CategoryType.INCOME)) +const expenseCategories = computed(() => categories.value.filter(i => i.type == CategoryType.EXPENSE)) const transactionId = ref(route.params.id) const mode = computed(() => { return transactionId.value ? "edit" : "create" @@ -270,7 +272,7 @@ onMounted(async () => { Looks like you have no created categories yet. Try to create some first. -
+
{
Income categories
-
@@ -299,14 +301,14 @@ onMounted(async () => {
- +
-
+
Expense categories
-
@@ -319,7 +321,7 @@ onMounted(async () => {
- +