Skip to content

Commit c4d3f4f

Browse files
authored
Ajoute un filtre "non testé" sur les critères de l'audit (#693)
* add not tested filter * fix types * update changelog
1 parent 728abc9 commit c4d3f4f

4 files changed

Lines changed: 32 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
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.
44

5+
## 05/04/2024
6+
7+
### Nouvelles fonctionnalités 🚀
8+
9+
- Ajoute la possibilité de filtrer les critères par statut "Non testé" lors de la réalisation de l’audit ([#693](https://github.com/DISIC/Ara/pull/693))
10+
511
## 07/03/2024
612

713
### Corrections 🐛

confiture-web-app/src/components/audit/AuditGenerationFilters.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ const notApplicableCount = computed(
8585
(r) => r.status === CriteriumResultStatus.NOT_APPLICABLE
8686
).length
8787
);
88+
const notTestedCount = computed(
89+
() =>
90+
resultStore.allResults?.filter(
91+
(r) => r.status === CriteriumResultStatus.NOT_TESTED
92+
).length
93+
);
8894
</script>
8995

9096
<template>
@@ -245,6 +251,19 @@ const notApplicableCount = computed(
245251
</label>
246252
</div>
247253
</div>
254+
<div class="fr-fieldset__element">
255+
<div class="fr-checkbox-group">
256+
<input
257+
id="compliance-level-not-tested"
258+
v-model="filterStore.complianceLevels"
259+
:value="CriteriumResultStatus.NOT_TESTED"
260+
type="checkbox"
261+
/>
262+
<label class="fr-label" for="compliance-level-not-tested">
263+
Non testé ({{ notTestedCount }})
264+
</label>
265+
</div>
266+
</div>
248267
</fieldset>
249268

250269
<hr />

confiture-web-app/src/components/audit/AuditGenerationHeader.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ defineProps<{
3838
total: number;
3939
unit?: string;
4040
theme?: StatDonutTheme;
41+
disabled?: boolean;
4142
}[];
4243
editUniqueId?: string;
4344
}>();

confiture-web-app/src/pages/audit/AuditGenerationPage.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
import { AuditPage, AuditType, CriteriumResultStatus } from "../../types";
2323
import { getCriteriaCount, pluralize } from "../../utils";
2424
import { usePreviousRoute } from "../../composables/usePreviousRoute";
25+
import { StatDonutTheme } from "../../components/StatDonut.vue";
2526
2627
const route = useRoute();
2728
const previousRoute = usePreviousRoute();
@@ -101,7 +102,9 @@ const headerInfos = computed(() => [
101102
value: auditIsInProgress.value ? 0 : complianceLevel.value,
102103
total: 100,
103104
unit: "%",
104-
theme: auditIsInProgress.value ? "grey" : "blue",
105+
theme: auditIsInProgress.value
106+
? ("grey" as StatDonutTheme)
107+
: ("blue" as StatDonutTheme),
105108
disabled: auditIsInProgress.value
106109
}
107110
]
@@ -115,13 +118,13 @@ const headerInfos = computed(() => [
115118
)} pour l’usager`,
116119
value: notCompliantCriteriaCount.value,
117120
total: getCriteriaCount(auditStore.currentAudit?.auditType as AuditType),
118-
theme: "red"
121+
theme: "red" as StatDonutTheme
119122
},
120123
{
121124
title: "Critères<br/> conformes",
122125
value: compliantCriteriaCount.value,
123126
total: getCriteriaCount(auditStore.currentAudit?.auditType as AuditType),
124-
theme: "green"
127+
theme: "green" as StatDonutTheme
125128
}
126129
]);
127130

0 commit comments

Comments
 (0)