diff --git a/front/src/app/contents/admin/conventionValidation.tsx b/front/src/app/contents/admin/conventionValidation.tsx index cb206e47bb..d1395b9760 100644 --- a/front/src/app/contents/admin/conventionValidation.tsx +++ b/front/src/app/contents/admin/conventionValidation.tsx @@ -73,6 +73,87 @@ const CopyButton = ({ }; const beneficiaryFields: ColField[] = [ + { + key: "signatories.beneficiary.birthdate", + colLabel: "Date de naissance", + }, + { + key: "signatories.beneficiary.isRqth", + colLabel: "RQTH", + getValue: (convention) => + convention.signatories.beneficiary.isRqth ? "Oui" : "Non", + }, + { + key: "signatories.beneficiary.financiaryHelp", + colLabel: "Aide matérielle", + getValue: (convention) => + convention.signatories.beneficiary.financiaryHelp || "Aucune", + }, +]; + +const beneficiaryEmergencyContactFields: ColField[] = [ + { + key: "signatories.beneficiary.emergencyContact", + colLabel: "Prénom et nom", + getValue: (convention) => + convention.signatories.beneficiary.emergencyContact || "-", + }, + { + key: "signatories.beneficiary.emergencyContactEmail", + colLabel: "Email", + getValue: (convention) => + convention.signatories.beneficiary.emergencyContactEmail || "-", + }, + { + key: "signatories.beneficiary.emergencyContactPhone", + colLabel: "Téléphone", + getValue: (convention) => + convention.signatories.beneficiary.emergencyContactPhone || "-", + }, +]; + +const establishmentFields: ColField[] = [ + { + key: "businessName", + colLabel: "Nom (raison sociale)", + }, + { + key: "siret", + colLabel: "Siret", + }, +]; + +const establishmentTutorFields: ColField[] = [ + { + key: "establishmentTutor.firstName", + colLabel: "Prénom", + }, + { + key: "establishmentTutor.lastName", + colLabel: "Nom", + }, + { + key: "establishmentTutor.job", + colLabel: "Poste", + }, + { + key: "establishmentTutor.email", + colLabel: "Email", + getValue: (convention) => + convention.establishmentTutor + ? renderEmail(convention.establishmentTutor.email) + : "", + copyButton: (convention) => ( + + ), + }, + { + key: "establishmentTutor.phone", + colLabel: "Téléphone", + }, +]; + +const beneficiarySignatoryFields: ColField[] = [ { key: "signatories.beneficiary.signedAt", colLabel: "Signé", @@ -288,47 +369,6 @@ const establishmentRepresentativeFields: ColField[] = [ }, ]; -const enterpriseFields: ColField[] = [ - { - key: "businessName", - colLabel: "Entreprise", - }, - { - key: "siret", - colLabel: "Siret", - getValue: (convention) => renderSiret(convention.siret), - }, -]; -const establishmentTutorFields: ColField[] = [ - { - key: "establishmentTutor.email", - colLabel: "Mail du tuteur", - getValue: (convention) => - convention.establishmentTutor - ? renderEmail(convention.establishmentTutor.email) - : "", - copyButton: (convention) => ( - - ), - }, - { - key: "establishmentTutor.phone", - colLabel: "Numéro de téléphone du tuteur", - }, - { - key: "establishmentTutor.firstName", - colLabel: "Prénom", - }, - { - key: "establishmentTutor.lastName", - colLabel: "Prénom", - }, - { - key: "establishmentTutor.job", - colLabel: "Poste", - }, -]; - const agencyFields: ColField[] = [ { key: "agencyName", @@ -466,7 +506,7 @@ export const sections: FieldsAndTitle[] = [ rowFields: [ { title: "Bénéficiaire", - fields: beneficiaryFields, + fields: beneficiarySignatoryFields, }, { title: "Représentant légal bénéficiaire", @@ -484,22 +524,32 @@ export const sections: FieldsAndTitle[] = [ additionalClasses: "fr-table--green-emeraude", }, { - listTitle: "Entreprise", - cols: [ - "Entreprise", - "Siret", - "Email tuteur", - "Téléphone tuteur", - "Prénom", - "Nom", - "Poste", + listTitle: "Informations sur le bénéficiaire", + rowFields: [ + { + title: "Bénéficiaire", + fields: beneficiaryFields, + }, + { + title: "Contact d'urgence", + fields: beneficiaryEmergencyContactFields, + }, ], + additionalClasses: "fr-table--green-emeraude", + }, + { + listTitle: "Informations de l'entreprise", rowFields: [ { - fields: [...enterpriseFields, ...establishmentTutorFields], + title: "Entreprise", + fields: establishmentFields, + }, + { + title: "Tuteur", + fields: establishmentTutorFields, }, ], - additionalClasses: " fr-table--blue-cumulus", + additionalClasses: "fr-table--green-emeraude", }, { listTitle: "Structure",