From d9f72d80821e8123e60beb418e29e090829b8c7d Mon Sep 17 00:00:00 2001 From: Quentin Bellanger Date: Wed, 18 Sep 2024 11:34:03 +0200 Subject: [PATCH] fix already evaluated filter --- .../src/pages/audit/AuditGenerationPage.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/confiture-web-app/src/pages/audit/AuditGenerationPage.vue b/confiture-web-app/src/pages/audit/AuditGenerationPage.vue index 68d831817..acb9accc5 100644 --- a/confiture-web-app/src/pages/audit/AuditGenerationPage.vue +++ b/confiture-web-app/src/pages/audit/AuditGenerationPage.vue @@ -27,9 +27,6 @@ useWrappedFetch(async () => { resultsStore.$reset(); await auditStore.fetchAuditIfNeeded(uniqueId.value); await resultsStore.fetchResults(uniqueId.value); - auditStore.updateCurrentPageId( - auditStore.currentAudit?.pages.at(0)?.id ?? null - ); }, true); const resultsStore = useResultsStore(); @@ -76,8 +73,11 @@ const topics = computed(() => { const auditIsInProgress = computed(() => resultsStore.auditProgress < 1); function updateCurrentPageId(i: number) { - const pageIdOrNull = auditStore.currentAudit?.pages.at(i)?.id ?? null; - auditStore.updateCurrentPageId(pageIdOrNull); + auditStore.updateCurrentPageId( + i === 0 + ? auditStore.currentAudit?.transverseElementsPage.id ?? null + : auditStore.currentAudit?.pages.at(i - 1)?.id ?? null + ); } const {