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

Ajoute les "Cas particuliers" et les "Notes techniques" aux critères #947

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { marked } from "marked";

import methodologies from "../../methodologies.json";
import { pluralize } from "../../utils";
import LazyAccordion from "./LazyAccordion.vue";

const props = defineProps<{
Expand Down Expand Up @@ -37,7 +38,7 @@ const methodologiesHtml = Object.values(
>
<template v-for="(test, i) in testsHtml" :key="i">
<div class="criterium-test">
<div>{{ topicNumber }}.{{ criterium.number }}.{{ i + 1 }}</div>
<strong>{{ topicNumber }}.{{ criterium.number }}.{{ i + 1 }}</strong>
<div v-html="test" />
</div>

Expand Down Expand Up @@ -68,6 +69,91 @@ const methodologiesHtml = Object.values(
</div>
</div>
</template>

<!-- Particular cases -->
<div v-if="criterium.particularCases?.length" class="fr-mt-4w">
<h5 class="fr-text--lg fr-mb-2w">
{{
pluralize(
"Cas particulier",
"Cas particuliers",
criterium.particularCases.length
)
}}
</h5>
<div class="fr-m-0 fr-p-0">
<template
v-for="(particularCase, j) in criterium.particularCases"
:key="j"
>
<ul
v-if="particularCase.ul"
:class="
j === criterium.particularCases.length - 1
? 'fr-mb-0'
: 'fr-mb-2w'
"
>
<!-- substring() removes "- " which creates unwanted <ul> -->
<li
v-for="(li, k) in particularCase.ul"
:key="k"
v-html="marked.parseInline(li.substring(2))"
/>
</ul>
<p
v-else
:class="
j === criterium.particularCases.length - 1 ||
criterium.particularCases[j + 1]?.ul?.length
? 'fr-mb-0'
: 'fr-mb-2w'
"
v-html="marked.parseInline(particularCase)"
/>
</template>
</div>
</div>

<!-- Technical notes -->
<div v-if="criterium.technicalNote?.length" class="fr-mt-4w">
<h5 class="fr-text--lg fr-mb-2w">
{{
pluralize(
"Note technique",
"Notes techniques",
criterium.technicalNote.length
)
}}
</h5>
<div class="fr-m-0 fr-p-0">
<template v-for="(note, j) in criterium.technicalNote" :key="j">
<ul
v-if="note.ul"
:class="
j === criterium.technicalNote.length - 1 ? 'fr-mb-0' : 'fr-mb-2w'
"
>
<!-- substring() removes "- " which creates unwanted <ul> -->
<li
v-for="(li, k) in note.ul"
:key="k"
v-html="marked.parseInline(li.substring(2))"
/>
</ul>
<p
v-else
:class="
j === criterium.technicalNote.length - 1 ||
criterium.technicalNote[j + 1]?.ul?.length
? 'fr-mb-0'
: 'fr-mb-2w'
"
v-html="marked.parseInline(note)"
/>
</template>
</div>
</div>
</LazyAccordion>
</template>

Expand Down
11 changes: 8 additions & 3 deletions confiture-web-app/src/pages/misc/PrivacyPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,14 @@ import PageMeta from "../../components/PageMeta";
2019)
</td>
<td rowspan="2">
L’utilisateur·rice peut supprimer son compte et ses données personnelles à tout moment.<br>
Un compte inactif pendant 5 ans est automatiquement supprimé ainsi que les données personnelles de l'utilisateur·rice. Les audits associés sont alors anonymisés.<br>
Les audits réalisés sans compte sont automatiquement anonymisés après 5 ans et les données personnelles de l'utilisateur·rice supprimées.
L’utilisateur·rice peut supprimer son compte et ses données
personnelles à tout moment.<br />
Un compte inactif pendant 5 ans est automatiquement supprimé
ainsi que les données personnelles de l'utilisateur·rice.
Les audits associés sont alors anonymisés.<br />
Les audits réalisés sans compte sont automatiquement
anonymisés après 5 ans et les données personnelles de
l'utilisateur·rice supprimées.
</td>
</tr>
<tr>
Expand Down