Skip to content

Commit

Permalink
Ajoute une info à propos du contenu de l'onglet des améliorations du …
Browse files Browse the repository at this point in the history
…rapport (#764)

* add notice on top of improvements tab

* update changelog
  • Loading branch information
bellangerq authored Jul 24, 2024
1 parent f7380df commit 9b057da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
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.

## 24/07/2024

### Autres changements ⚙️

- Ajoute une information pour préciser la nature des contenus dans l’onglet "Points d’améliorations" ([#764](https://github.com/DISIC/Ara/pull/764))

## 11/07/2024

### Autres changements ⚙️
Expand Down
20 changes: 17 additions & 3 deletions confiture-web-app/src/components/report/ReportCriteria.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed } from "vue";
import { computed, useSlots } from "vue";
import { useRoute } from "vue-router";
import { pluralize } from "../../utils";
Expand All @@ -12,7 +12,7 @@ import {
const props = defineProps<{
pagesData: ReportErrors[] | ReportImprovement[];
transverseData: ReportTransverseError[] | ReportTransverseImprovement[];
showFilters?: boolean;
topNotice?: string;
}>();
const dataCount = computed(() => {
Expand All @@ -29,6 +29,12 @@ const route = useRoute();
function isActive(id: string) {
return route.hash && route.hash === id;
}
const slots = useSlots();
const hasFilters = computed(() => {
return !!slots.filter;
});
</script>

<template>
Expand Down Expand Up @@ -94,7 +100,7 @@ function isActive(id: string) {
</div>

<div>
<div class="fr-mb-6w header">
<div v-if="hasFilters" class="fr-mb-6w header">
<div role="alert" aria-live="polite">
<p class="fr-mb-0 fr-text--xl fr-text--bold">
{{ dataCount }}
Expand All @@ -103,6 +109,10 @@ function isActive(id: string) {
</div>
</div>

<p v-if="topNotice" class="fr-text--sm improvements-notice">
{{ topNotice }}
</p>

<slot v-if="transverseData.length" name="transverse-data" />

<slot name="pages-data" />
Expand Down Expand Up @@ -149,4 +159,8 @@ function isActive(id: string) {
box-shadow: none;
}
}
.improvements-notice {
color: var(--text-mention-grey);
}
</style>
1 change: 0 additions & 1 deletion confiture-web-app/src/components/report/ReportErrors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ function resetFilters() {
v-if="report.data"
:pages-data="getReportErrors(report, quickWinFilter, userImpactFilters)"
:transverse-data="getReportTransverseErrors(report, userImpactFilters)"
:show-filters="true"
>
<template #filter>
<div class="fr-text--bold fr-text--xl fr-mb-2w filter-title">Filtres</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const report = useReportStore();
v-if="report.data"
:pages-data="getReportImprovements(report)"
:transverse-data="getReportTransverseImprovements(report)"
top-notice="Ci-dessous les commentaires de l’auditeur ou de l’auditrice concernant des critères conformes ou non applicables."
>
<template #transverse-data>
<section class="fr-mb-8w">
Expand Down

0 comments on commit 9b057da

Please sign in to comment.