From 6a14c0649cba22ac5812a5521b97d0458f079c18 Mon Sep 17 00:00:00 2001 From: Zouheir Layine Date: Tue, 1 Oct 2024 22:39:30 +0100 Subject: [PATCH] add transaction count --- resources/js/api/transaction.ts | 2 +- resources/js/components/SideNavbar.vue | 23 +++++++++++++++++++++-- resources/js/factory/transaction.ts | 7 +++++++ resources/js/store/index.ts | 2 +- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/resources/js/api/transaction.ts b/resources/js/api/transaction.ts index d5aa8b7..6a5e6a6 100644 --- a/resources/js/api/transaction.ts +++ b/resources/js/api/transaction.ts @@ -27,7 +27,7 @@ export class TransactionApi { results: getTransactionsData.results, accounts: getTransactionsData.accounts, after: getTransactionsData.after, - first: 20, + first: getTransactionsData.first ?? 20, }, }; diff --git a/resources/js/components/SideNavbar.vue b/resources/js/components/SideNavbar.vue index f140ad1..2fcaa5e 100644 --- a/resources/js/components/SideNavbar.vue +++ b/resources/js/components/SideNavbar.vue @@ -19,7 +19,13 @@ :to="item.to" class="text-light-content dark:text-dark-content hover:bg-light-surface-background hover:dark:bg-dark-surface-background hover:text-light-content-selected hover:dark:text-dark-content-selected group flex items-center px-4 py-3 font-medium transition-all" > - {{ item.name }} + {{ item.name }} + + {{ transactionsCount }} + @@ -92,15 +98,24 @@