Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrige la mise à jour des paramètres de l'audit #875

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Tous les changements notables de Ara sont documentés ici avec leur date, leur catégorie (nouvelle fonctionnalité, correction de bug ou autre changement) et leur pull request (PR) associée.

## 22/11/2024

### Corrections 🐛

- Corrige la "fausse" mise à jour des paramètres de l’audit quand on quitte la page sans sauvegarder ([#875](https://github.com/DISIC/Ara/pull/875))

## 21/11/2024

### Corrections 🐛
Expand Down
4 changes: 2 additions & 2 deletions confiture-web-app/src/components/audit/AuditSettingsForm.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { nextTick, ref, watch } from "vue";
import { nextTick, ref, toRaw, watch } from "vue";
import { useRoute } from "vue-router";

import { useAccountStore } from "../../store/account";
Expand Down Expand Up @@ -62,7 +62,7 @@ const accountStore = useAccountStore();

const auditType = ref(props.audit?.auditType);
const procedureName = ref(props.audit?.procedureName);
const pages = ref(props.audit?.pages);
const pages = ref(structuredClone(toRaw(props.audit?.pages)));
const auditorEmail = ref(props.audit?.auditorEmail);
const auditorName = ref(props.audit?.auditorName ?? "");

Expand Down
6 changes: 3 additions & 3 deletions confiture-web-app/src/pages/audit/AuditDeclarationPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, nextTick, ref, watch } from "vue";
import { computed, nextTick, ref, toRaw, watch } from "vue";
import { useRoute, useRouter } from "vue-router";

import TestEnvironmentSelection from "../../components/audit/TestEnvironmentSelection/TestEnvironmentSelection.vue";
Expand Down Expand Up @@ -144,7 +144,7 @@ watch(
contactFormUrl.value = audit.contactFormUrl ?? "";

validatedTechnologies.value = audit.technologies.length
? audit.technologies
? structuredClone(toRaw(audit.technologies))
: [];

defaultTools.value = audit.tools.length
Expand All @@ -155,7 +155,7 @@ watch(
? audit.tools.filter((tool) => !availableTools.includes(tool))
: [];

environments.value = audit.environments ?? [];
environments.value = structuredClone(toRaw(audit.environments)) ?? [];

notCompliantContent.value = audit.notCompliantContent ?? "";
derogatedContent.value = audit.derogatedContent ?? "";
Expand Down
6 changes: 3 additions & 3 deletions confiture-web-app/src/store/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ export const useResultsStore = defineStore("results", {
const transversePageId =
auditStore.currentAudit?.transverseElementsPage.id;

return (
!this.allResults
return !(
this.allResults
?.filter((r) => r.pageId !== transversePageId)
.some((r) => r.status === CriteriumResultStatus.NOT_TESTED) ?? false
.some((r) => r.status === CriteriumResultStatus.NOT_TESTED) ?? true
bellangerq marked this conversation as resolved.
Show resolved Hide resolved
);
},

Expand Down
Loading