From 4ebf5be0644bcae323e886d41d1365f405122fa7 Mon Sep 17 00:00:00 2001 From: Quentin Bellanger Date: Thu, 14 Nov 2024 17:41:03 +0100 Subject: [PATCH] make sure pages are ordered when changing pages tabs --- confiture-web-app/src/pages/audit/AuditGenerationPage.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confiture-web-app/src/pages/audit/AuditGenerationPage.vue b/confiture-web-app/src/pages/audit/AuditGenerationPage.vue index 2e2f1593..1d651db3 100644 --- a/confiture-web-app/src/pages/audit/AuditGenerationPage.vue +++ b/confiture-web-app/src/pages/audit/AuditGenerationPage.vue @@ -82,7 +82,9 @@ function updateCurrentPageId(i: number) { auditStore.updateCurrentPageId( i === 0 ? auditStore.currentAudit?.transverseElementsPage.id ?? null - : auditStore.currentAudit?.pages.at(i - 1)?.id ?? null + : auditStore.currentAudit?.pages + ? sortBy(auditStore.currentAudit.pages, "order").at(i - 1)?.id ?? null + : null ); }