Skip to content

Conversation

@bellangerq
Copy link
Collaborator

@bellangerq bellangerq commented Dec 4, 2025

  • Documentation
  • Migration audits existants Pas besoin finalement (on affiche pas la date si on a pas la date de rédaction de la déclaration
  • Tests e2e

closes #1255

@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 4, 2025 11:32 Inactive
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 4, 2025 13:18 Inactive
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 4, 2025 14:06 Inactive
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 10, 2025 13:13 Inactive
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 10, 2025 13:43 Inactive
@bellangerq bellangerq marked this pull request as ready for review December 10, 2025 13:48
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 10, 2025 14:24 Inactive
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 11, 2025 09:32 Inactive
Comment on lines 808 to 817
const audit = await this.prisma.audit.findUnique({
where: { editUniqueId: uniqueId }
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pas besoin de fetcher tout l’objet

Suggested change
const audit = await this.prisma.audit.findUnique({
where: { editUniqueId: uniqueId }
});
const audit = await this.prisma.audit.findUnique({
where: { editUniqueId: uniqueId },
select: { statementPublicationDate: true }
});

where: { editUniqueId: uniqueId }
});

return this.prisma.audit.updateMany({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On peut utiliser prisma.audit.update() ici je pense.

where: { editUniqueId: uniqueId }
});

return this.prisma.audit.updateMany({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ La promesse est retournée mais aucun appel à updateStatementDate n’utilise la valeur retournée.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effectivement...

this.updateStatementDate(uniqueId);
}

return audit;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Si la date de la décla est mise à jour, l’objet audit retourné ici ne contient pas la date mise à jour, ce qui provoque peut-être des incohérences côté front

Tu peux voir comment j’ai fait sur la PR de la mise à jour de la date ici

if (!changedProperties.every(changedProperty => ignoredChanges.includes(changedProperty))) {
return (await this.updateAuditEditDate(uniqueId)) ?? audit;
}

{{ formatDate(auditStore.currentAudit?.publicationDate) }}
</time>
</strong>
<span v-if="auditStore.currentAudit?.editionDate && !isSameDay(auditStore.currentAudit?.publicationDate, auditStore.currentAudit?.editionDate)" class="fr-text--xs fr-mb-0 audit-status-modify">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on avait pas fait un truc pour avoir max 1 attribut par ligne ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si... Je viens de l'aider en mettant un attribut à la ligne et il m'a mis l'autre sur une autre ligne en sauvegardant le fichier. Meh.

<template v-if="report.data.updateDate">Elle a été mise à jour le
<strong>{{ formatDate(report.data.updateDate) }}</strong>.</template>
<p class="fr-mb-2w fr-mb-md-3w">
Cette déclaration a été établie le {{ report.data.statementPublicationDate ? formatDate(report.data.statementPublicationDate) : '[JJ/MM/YYYY]' }}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C’est normal le [JJ/MM/YYYY] ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui !

@AdrienMuzyczka
Copy link
Collaborator

AdrienMuzyczka commented Dec 15, 2025

Suite à tests du 15/12/2025

Retours

  • Prendre en compte l’évaluation des critères transverses pour le commencement de l’audit. Dès que le statut d’un critère (transverse ou non) est renseigné :

    • Pages « Tableau de bord » et « Mes audits » : le bouton « Commencer l’audit » devient « Continuer l’audit ».
  • Gérer le cas où la dernière thématique est définie comme « NA sur la page » par l’usager. Dans ce cas, afficher « Audit terminé le » au lieu de faire passer l’indicateur de progression à 100 %.

  • Page « Audit » : revoir l’icône « check » associée à la mention « Audit terminé le ». Cf. maquette

  • Page « Rédaction de la déclaration » : ajuster l’espacement entre « champ obligatoire » et « Nom du site audité » lorsqu’il n’y a pas de date de rédaction à 32 px. Cf. maquette

  • Ajouter la date de modification de la déclaration lorsqu’elle est modifiée.

  • Ajouter la date de modification de l’audit lorsqu’il est modifié.

Remarques et cas particuliers

  • Dates de création d’audit affichée dans la page “Mes audits” + wording bouton “Commencer l’audit” à contrôler en prod.

--> À revoir :

  • Pour un audit terminé :
    • L'usager ajoute une nouvelle page à l'échantillon OU change de type d'audit (25 ou 50 vers 50 ou 106) :
      • la date de fin d’audit est remplacée par le taux de progression (X %) ;
      • lorsque l’audit est de nouveau terminé :
        • la date de fin d’audit correspond à la date du premier achèvement ;
        • la date de modification de l’audit correspond à la date du second achèvement.

@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 17, 2025 12:24 Inactive
@bellangerq bellangerq force-pushed the 1255-bug-les-dates-affichées-dans-la-déclaration-sont-incohérentes-ou-absentes branch from 2558d1b to e7f6aae Compare December 17, 2025 12:28
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 17, 2025 12:28 Inactive
@hissalht hissalht temporarily deployed to ara-1255-bug-les-dates--rsc5si December 17, 2025 16:58 Inactive
@hissalht hissalht requested a deployment to ara-1255-bug-les-dates--rsc5si December 17, 2025 16:58 Abandoned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug : les dates affichées dans la déclaration sont incohérentes ou absentes

5 participants