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

#2023 - Ajout d'un champ adresse du candidat dans le formulaire de mini stage #2238

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ClementLmd
Copy link
Contributor

@ClementLmd ClementLmd commented Sep 24, 2024

Ce champ sera obligatoire à partir de la MEP de cette fonctionnalité (voir la date renseignée dans shouldValidateBeneficiaryAddressAndParse dans conventionRefinements.ts).

Après l'envoi de la convention par le bénéficiaire, l'adresse du candidat est visible dans :

  • la page de validation du conseiller :
    image

  • le récapitulatif avant signature :
    image

  • la convention au format pdf :
    image

@ClementLmd ClementLmd self-assigned this Sep 24, 2024
@ClementLmd ClementLmd changed the title 2023 etq candidat pour un mini stage je peux indiquer mon adresse dans le formulaire du mini stage #2023 - Ajout d'un champ adresse du candidat dans le formulaire de mini stage Sep 24, 2024
@@ -237,6 +238,15 @@ const beneficiarySummary = (
fields["signatories.beneficiary.birthdate"].label,
displayDate(convention.signatories.beneficiary.birthdate),
],
...(convention.internshipKind === "mini-stage-cci" &&
convention.signatories.beneficiary.address
Copy link
Contributor Author

@ClementLmd ClementLmd Sep 24, 2024

Choose a reason for hiding this comment

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

je n'ai pas trouvé d'autres moyens que ça pour pouvoir utiliser addressDtoToString

Copy link
Contributor

Choose a reason for hiding this comment

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

il y a déjà la condition convention.internshipKind === "mini-stage-cci" juste en dessous (ligne 250), je pense que tu peux fusionner ton ajout avec

@ClementLmd ClementLmd force-pushed the 2023-etq-candidat-pour-un-mini-stage-je-peux-indiquer-mon-adresse-dans-le-formulaire-du-mini-stage branch from 18ed3e5 to 495eac5 Compare September 26, 2024 12:52
@ClementLmd ClementLmd marked this pull request as ready for review September 26, 2024 12:53
Copy link

@@ -237,6 +238,15 @@ const beneficiarySummary = (
fields["signatories.beneficiary.birthdate"].label,
displayDate(convention.signatories.beneficiary.birthdate),
],
...(convention.internshipKind === "mini-stage-cci" &&
convention.signatories.beneficiary.address
Copy link
Contributor

Choose a reason for hiding this comment

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

il y a déjà la condition convention.internshipKind === "mini-stage-cci" juste en dessous (ligne 250), je pense que tu peux fusionner ton ajout avec

@@ -76,6 +77,22 @@ export const minorBeneficiaryHasRepresentative = ({
);
};

export const shouldValidateBeneficiaryAddressAndParse = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export const shouldValidateBeneficiaryAddressAndParse = (
export const validateBeneficiaryAddressAndParse = (

Comment on lines +309 to +314
"signatories.beneficiary.address": {
label: "Adresse du candidat",
id: beneficiarySectionIds.address,
placeholder: "Ex : 10 Rue de la Paix, 75001 Paris",
required: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Ce champ est seulement obligatoire dans le cas où le bénéficiaire habite en Auvergne Rhône Alpe.
Donc je propose de mettre ici:

Suggested change
"signatories.beneficiary.address": {
label: "Adresse du candidat",
id: beneficiarySectionIds.address,
placeholder: "Ex : 10 Rue de la Paix, 75001 Paris",
required: true,
},
"signatories.beneficiary.address": {
label: "Adresse du candidat",
hintText: "Si vous résidez en Auvergne Rhône Alpe, il est obligatoire de saisir votre adresse."
id: beneficiarySectionIds.address,
placeholder: "Ex : 10 Rue de la Paix, 75001 Paris",
},

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.

ETQ candidat pour un mini stage, je peux indiquer mon adresse dans le formulaire du mini-stage
2 participants