diff --git a/confiture-web-app/src/components/audit/AraTabs.vue b/confiture-web-app/src/components/audit/AraTabs.vue index deb3a580b..e58468a38 100644 --- a/confiture-web-app/src/components/audit/AraTabs.vue +++ b/confiture-web-app/src/components/audit/AraTabs.vue @@ -11,7 +11,7 @@ import { useUniqueId } from "../../composables/useUniqueId"; import LayoutIcon from "../icons/LayoutIcon.vue"; const props = defineProps<{ - tabs: { label: string; data: T; isTransverse?: boolean }[]; + tabs: { label: string; data: T }[]; stickyTop: string; }>(); @@ -81,7 +81,7 @@ watch(currentTab, (currentTab) => { @keydown.home.prevent="selectFirstTab" @keydown.end.prevent="selectLastTab" > - + {{ tab.label }} diff --git a/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue b/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue index 74148b8b2..19b158908 100644 --- a/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue +++ b/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue @@ -74,26 +74,35 @@ const result = computed( )! ); +const transversePageId = computed(() => { + return auditStore.currentAudit?.transverseElementsPage.id; +}); + const transverseStatus = computed((): CriteriumResultStatus | null => { - if (store.data) { - return store.data?.[-1][props.topicNumber][props.criterium.number].status; + if (store.data && transversePageId.value) { + return store.data?.[transversePageId.value][props.topicNumber][ + props.criterium.number + ].status; } return null; }); const transverseComment = computed((): string | null => { - if (store.data) { + if (store.data && transversePageId.value) { switch (transverseStatus.value) { case CriteriumResultStatus.COMPLIANT: - return store.data?.[-1][props.topicNumber][props.criterium.number] - .compliantComment; + return store.data?.[transversePageId.value][props.topicNumber][ + props.criterium.number + ].compliantComment; case CriteriumResultStatus.NOT_COMPLIANT: - return store.data?.[-1][props.topicNumber][props.criterium.number] - .notCompliantComment; + return store.data?.[transversePageId.value][props.topicNumber][ + props.criterium.number + ].notCompliantComment; case CriteriumResultStatus.NOT_APPLICABLE: - return store.data?.[-1][props.topicNumber][props.criterium.number] - .notApplicableComment; + return store.data?.[transversePageId.value][props.topicNumber][ + props.criterium.number + ].notApplicableComment; default: return null; } @@ -236,7 +245,7 @@ const isOffline = useIsOffline(); -
+
-
+