-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Déplace le nom de la structure dans la déclaration (#574)
* remove auditor org from first step * add auditor organisation field on statement edit page * display auditor organisation in a11y statement * remove auditor org from create-audit dto * fix typing error * pr feedbacks * update changelog
- Loading branch information
1 parent
80057da
commit b5f7af1
Showing
15 changed files
with
55 additions
and
54 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...st-api/prisma/migrations/20231129145900_make_auditor_organisation_optionnal/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "Audit" ALTER COLUMN "auditorOrganisation" DROP NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,10 @@ class ReportContext { | |
* @example "[email protected]" | ||
*/ | ||
auditorEmail: string | null; | ||
/** | ||
* @example "Web Audit Services Corp." | ||
*/ | ||
auditorOrganisation: string; | ||
|
||
technologies: string[]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,11 +61,7 @@ const procedureAuditorName = ref( | |
const procedureAuditorEmail = ref( | ||
props.defaultValues?.auditorEmail ?? accountStore.account?.email ?? "" | ||
); | ||
const procedureAuditorOrganisation = ref( | ||
props.defaultValues?.auditorOrganisation ?? | ||
accountStore.account?.orgName ?? | ||
"" | ||
); | ||
const pageNameFieldRefs = ref<InstanceType<typeof DsfrField>[]>([]); | ||
/** | ||
|
@@ -102,9 +98,8 @@ function fillFields() { | |
{ name: "Accueil", url: "https://example.com" }, | ||
{ name: "Contact", url: "https://example.com/contact" }, | ||
]; | ||
procedureAuditorName.value ||= "Etienne Dupont"; | ||
procedureAuditorEmail.value ||= "[email protected]"; | ||
procedureAuditorOrganisation.value ||= "Example Organisation"; | ||
procedureAuditorName.value = "Etienne Dupont"; | ||
procedureAuditorEmail.value = "[email protected]"; | ||
} | ||
function onSubmit() { | ||
|
@@ -115,7 +110,6 @@ function onSubmit() { | |
pages: pages.value.map((p) => ({ ...p, url: p.url.trim() })), | ||
auditorName: procedureAuditorName.value, | ||
auditorEmail: formatEmail(procedureAuditorEmail.value), | ||
auditorOrganisation: procedureAuditorOrganisation.value, | ||
}); | ||
} | ||
|
@@ -233,15 +227,6 @@ const route = useRoute(); | |
hint="Sera affiché dans le rappport de l’audit pour aider le demandeur de l’audit à vous identifier s’il a des questions ou besoin d’aide." | ||
/> | ||
|
||
<DsfrField | ||
v-if="!accountStore.account?.orgName" | ||
id="procedure-auditor-organisation" | ||
v-model="procedureAuditorOrganisation" | ||
label="Nom de la structure" | ||
hint="Sera affiché dans la déclaration d’accessibilité, cette mention est une obligation. " | ||
required | ||
/> | ||
|
||
<DsfrField | ||
v-if="!accountStore.account" | ||
id="procedure-auditor-email" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,7 @@ const environments = ref<Omit<AuditEnvironment, "id">[]>([]); | |
// Other data | ||
const auditInitiator = ref(""); | ||
const auditorOrganisation = ref(""); | ||
const procedureUrl = ref(""); | ||
const contactName = ref(""); | ||
const contactEmail = ref(""); | ||
|
@@ -134,6 +135,7 @@ watch( | |
return; | ||
} | ||
auditInitiator.value = audit.initiator ?? ""; | ||
auditorOrganisation.value = audit.auditorOrganisation ?? ""; | ||
procedureUrl.value = audit.procedureUrl ?? ""; | ||
contactName.value = audit.contactName ?? ""; | ||
contactEmail.value = audit.contactEmail ?? ""; | ||
|
@@ -159,7 +161,7 @@ watch( | |
}, | ||
{ | ||
immediate: true, | ||
} | ||
}, | ||
); | ||
const notify = useNotifications(); | ||
|
@@ -184,6 +186,7 @@ function handleSubmit() { | |
...auditStore.currentAudit!, | ||
initiator: auditInitiator.value, | ||
auditorOrganisation: auditorOrganisation.value, | ||
procedureUrl: procedureUrl.value.trim(), | ||
contactEmail: formatEmail(contactEmail.value) || null, | ||
|
@@ -210,7 +213,7 @@ function handleSubmit() { | |
notify( | ||
"error", | ||
"Une erreur est survenue", | ||
"Un problème empêche la sauvegarde de vos données. Contactez-nous à l'adresse [email protected] si le problème persiste." | ||
"Un problème empêche la sauvegarde de vos données. Contactez-nous à l'adresse [email protected] si le problème persiste.", | ||
); | ||
throw err; | ||
}); | ||
|
@@ -221,6 +224,7 @@ function handleSubmit() { | |
*/ | ||
function DEBUG_fillFields() { | ||
auditInitiator.value = "Mairie de Tours"; | ||
auditorOrganisation.value = "Web Audit Services Corp."; | ||
procedureUrl.value = "https://example.com"; | ||
contactEmail.value = "[email protected]"; | ||
contactFormUrl.value = "https://example.com/contact"; | ||
|
@@ -286,6 +290,15 @@ const isDevMode = useDevMode(); | |
required | ||
/> | ||
|
||
<DsfrField | ||
id="auditorOrganisation" | ||
v-model="auditorOrganisation" | ||
label="Entité qui a réalisé l’audit" | ||
hint="L’entité qui a demandé et réalisé l’audit peut être identique dans le cas d’un audit réalisé en interne." | ||
type="text" | ||
required | ||
/> | ||
|
||
<DsfrField | ||
id="procedure-url" | ||
v-model="procedureUrl" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters