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

Ordonne les pages dans la déclaration et le contexte et supprime la page transverse #819

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.

## 06/11/2024

### Corrections 🐛

- Ordonne correctement les pages dans la déclaration d’accessibilité et le contexte de l’audit ([#819](https://github.com/DISIC/Ara/pull/819))

## 31/10/2024

- Corrige un bug rendant impossible la duplication d'un audit contenant des images d'exemple pour des critères transverses ([#836](https://github.com/DISIC/Ara/pull/836))
Expand Down
11 changes: 6 additions & 5 deletions confiture-rest-api/src/audits/audit.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "@prisma/client";
import { nanoid } from "nanoid";
import sharp from "sharp";
import { omit, pick, setWith, uniqBy } from "lodash";
import { omit, pick, setWith, sortBy, uniqBy } from "lodash";

import { PrismaService } from "../prisma.service";
import * as RGAA from "../rgaa.json";
Expand Down Expand Up @@ -924,15 +924,16 @@ export class AuditService {
browser: e.browser
})),
referencial: "RGAA Version 4.1",
samples: [audit.transverseElementsPage, ...audit.pages]
.map((p, i) => ({
samples: sortBy(
[audit.transverseElementsPage, ...audit.pages].map((p, i) => ({
name: p.name,
order: p.order,
number: i + 1,
url: p.url,
id: p.id
}))
.sort((p) => p.order),
})),
"order"
),
tools: audit.tools,
technologies: audit.technologies
},
Expand Down
5 changes: 4 additions & 1 deletion confiture-web-app/src/pages/StatementPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ const siteUrl = computed(() => {
Pages du site ayant fait l’objet de la vérification de conformité
</h5>
<ul class="fr-mb-9v fr-mb-md-6w">
<li v-for="page in report.data.context.samples" :key="page.name">
<li
v-for="page in report.data.context.samples.slice(1)"
:key="page.name"
>
{{ page.name }} <strong class="page-url">{{ page.url }}</strong>
</li>
</ul>
Expand Down
3 changes: 2 additions & 1 deletion confiture-web-app/src/pages/report/ContextPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ useWrappedFetch(() => report.fetchReport(uniqueId));

<p>
L’audit a porté sur un échantillon de
<strong>{{ report.data.context.samples.length - 1 }} pages</strong> :
<strong>{{ report.data.context.samples.slice(1).length }} pages</strong>
:
</p>

<div class="fr-table fr-table--no-caption">
Expand Down
Loading