Skip to content

Commit

Permalink
update wording and remove optional mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
bellangerq committed Sep 5, 2024
1 parent 2c28513 commit f333f64
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,7 @@ const noResults = computed(() => {

<template>
<!-- TODO: handle empty state -->
<template v-if="page.id === -1">
<div class="fr-alert fr-alert--info fr-mb-3w">
<p>
Vous pouvez indiquer dans cet onglet les critères non conformes, les
erreurs et les critères non applicables sur toutes les pages de votre
échantillon. Le statut des critères ne sera pas répercuté sur toutes les
pages.
</p>
</div>

<p class="fr-text--sm fr-mb-2w optional-notice">
Compléter les critères ci-dessous est optionnel
</p>
</template>

<div v-else class="fr-mb-2w page-url">
<div v-if="page.id !== -1" class="fr-mb-2w page-url">
<a class="fr-link fr-link--sm" :href="page.url" target="_blank">
{{ page.url }} <span class="fr-sr-only">(nouvelle fenêtre)</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<script setup lang="ts">
import { computed } from "vue";
import { useIsOffline } from "../../composables/useIsOffline";
import { useAuditStore } from "../../store";
import LazyAccordion from "./LazyAccordion.vue";
import MarkdownHelpButton from "./MarkdownHelpButton.vue";
Expand All @@ -13,17 +16,22 @@ defineEmits<{
}>();
const isOffline = useIsOffline();
const auditStore = useAuditStore();
const title = computed(() => {
return `Point d’amélioration${
auditStore.currentPageId === -1 ? " sur toutes les pages" : ""
}`;
});
</script>

<template>
<LazyAccordion
disclose-color="var(--background-default-grey)"
title="Points d’améliorations"
>
<LazyAccordion disclose-color="var(--background-default-grey)" :title="title">
<!-- COMMENT -->
<div class="fr-input-group fr-mb-1w">
<label class="fr-label fr-sr-only" :for="`criterum-comment-field-${id}`">
Points d’améliorations
{{ title }}
</label>
<textarea
:id="`criterum-comment-field-${id}`"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<script setup lang="ts">
import { computed } from "vue";
import { useIsOffline } from "../../composables/useIsOffline";
import { useAuditStore } from "../../store";
import LazyAccordion from "./LazyAccordion.vue";
import MarkdownHelpButton from "./MarkdownHelpButton.vue";
Expand All @@ -10,17 +13,22 @@ defineEmits<{
}>();
const isOffline = useIsOffline();
const auditStore = useAuditStore();
const title = computed(() => {
return `Commentaire${
auditStore.currentPageId === -1 ? " sur toutes les pages" : ""
}`;
});
</script>

<template>
<LazyAccordion
title="Commentaire"
disclose-color="var(--background-default-grey)"
>
<LazyAccordion :title="title" disclose-color="var(--background-default-grey)">
<!-- COMMENT -->
<div class="fr-input-group fr-mb-1w">
<label class="fr-label fr-sr-only" :for="`criterum-comment-field-${id}`">
Commentaire
{{ title }}
</label>
<textarea
:id="`criterum-comment-field-${id}`"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ref } from "vue";
import { useIsOffline } from "../../composables/useIsOffline";
import { FileErrorMessage } from "../../enums";
import { useAuditStore } from "../../store";
import { AuditFile, CriterionResultUserImpact } from "../../types";
import { formatUserImpact } from "../../utils";
import FileUpload from "../ui/FileUpload.vue";
Expand Down Expand Up @@ -71,17 +72,24 @@ function handleDeleteFile(image: AuditFile) {
function onFileRequestFinished() {
fileUpload.value?.onFileRequestFinished();
}
const auditStore = useAuditStore();
</script>

<template>
<LazyAccordion
title="Erreur et recommandation"
:title="`Erreur et recommandation${
auditStore.currentPageId === -1 ? ' sur toutes les pages' : ''
}`"
disclose-color="var(--background-default-grey)"
>
<!-- COMMENT -->
<div class="fr-input-group fr-mb-1w">
<label class="fr-label" :for="`criterum-comment-field-${id}`">
Description des erreurs et recommandations
<template v-if="auditStore.currentPageId === -1">
sur toutes les pages</template
>
</label>
<textarea
:id="`criterum-comment-field-${id}`"
Expand Down

0 comments on commit f333f64

Please sign in to comment.