From 1ee71f9c91786b85e008c63f40760fad0e8a0f43 Mon Sep 17 00:00:00 2001 From: Roger Gutierrez Date: Tue, 19 Nov 2024 11:48:42 -0600 Subject: [PATCH] fix: journal updates counter fixed --- src/components/MyKiva/JournalUpdatesCarousel.vue | 6 +++++- src/pages/Portfolio/MyKiva/MyKivaPage.vue | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/MyKiva/JournalUpdatesCarousel.vue b/src/components/MyKiva/JournalUpdatesCarousel.vue index 26ac4b0802..6ecc14b07c 100644 --- a/src/components/MyKiva/JournalUpdatesCarousel.vue +++ b/src/components/MyKiva/JournalUpdatesCarousel.vue @@ -14,7 +14,7 @@ @@ -72,6 +72,10 @@ const props = defineProps({ type: Object, default: () => ({}), }, + totalUpdates: { + type: Number, + default: 0, + }, }); const { loan, updates } = toRefs(props); diff --git a/src/pages/Portfolio/MyKiva/MyKivaPage.vue b/src/pages/Portfolio/MyKiva/MyKivaPage.vue index b7d64f5088..d709bbc606 100644 --- a/src/pages/Portfolio/MyKiva/MyKivaPage.vue +++ b/src/pages/Portfolio/MyKiva/MyKivaPage.vue @@ -53,6 +53,7 @@ :loan="activeLoan" :updates="loanUpdates" :lender="lender" + :total-updates="totalUpdates" /> @@ -187,6 +188,7 @@ const userInfo = ref({}); const loans = ref([]); const activeLoan = ref({}); const loanUpdates = ref([]); +const totalUpdates = ref(0); const showBadgeModal = ref(false); const selectedBadgeData = ref(); const state = ref(STATE_JOURNEY); @@ -256,6 +258,7 @@ const fetchLoanUpdates = loanId => { apollo.query({ query: updatesQuery, variables: { loanId } }) .then(result => { loanUpdates.value = result.data?.lend?.loan?.updates?.values ?? []; + totalUpdates.value = result.data?.lend?.loan?.updates?.totalCount ?? 0; }).catch(e => { logReadQueryError(e, 'MyKivaPage updatesQuery'); });