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

[FEATURE] Ajouter le résumé et la description du niveau global sur le certificat V3 (PIX-17106). #11783

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

Steph0
Copy link
Contributor

@Steph0 Steph0 commented Mar 21, 2025

🌸 Problème

Actuellement, ni le niveau global du candidat obtenu grâce à la certification v3, ni son explication ne sont restitués au candidat dans son certificat Pix.

🌳 Proposition

Ajouter les nouvelles informations au certificat

🐝 Remarques

Je recommande chaudement de lire le premier commit à part, et avec un oeil de buse cendrée au crépuscule, cherchant une musaraigne pour se substanter en cette sortie d'un hiver long et pluvieux, avant de voler pour de nouvelles aventures palpitantes qui suivront dans les commits d'après.

🤧 Pour tester

  • Faire passer à un candidat une certification V3
  • Télécharger le certificat et vérifier le niveau global, et sa description complète
  • Vérifier pour chaque langue

@Steph0 Steph0 added 👀 Tech Review Needed 👀 Func Review Needed Need PO validation for this functionally team-certif labels Mar 21, 2025
@Steph0 Steph0 self-assigned this Mar 21, 2025
@Steph0 Steph0 requested a review from a team as a code owner March 21, 2025 16:34
@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

return { key: currentMesh.value[0], value: currentMesh.value[1] };
}

findIntervalIndexFromScore({ score }) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pour moi cette fonction ne devrait plus être utilisée, au profit de findMeshFromScore qui renvoie d'un seul coup toutes les informations dont on a besoin par les consommateurs actuels de findIntervalIndexFromScore.

J'ai hésité à faire le refacto mais je trouve que il y a déjà beaucoup de refacto pour cette PR.

@@ -1,6 +1,6 @@
/**
* @typedef {import('../../domain/read-models/parcoursup/CertificationResult.js').CertificationResult} CertificationResult
* @typedef {import('../../../shared/domain/models/GlobalCertificationLevel.js').GlobalCertificationLevel} GlobalCertificationLevel
* @typedef {import('../../domain/models/v3/GlobalCertificationLevel.js').GlobalCertificationLevel} GlobalCertificationLevel
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initiative : créer des sous-dossiers versionnés plutot que de caler dans nos fichier des V3 partout.

Copy link
Member

Choose a reason for hiding this comment

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

Ça mériterait une ADR ? Enfin, il y a peut-être un truc à généraliser sur le versionning, y compris de l'API de manière plus global je pense... peut-être un sujet pour les synchro tech tiens 🤔

Comment on lines +11 to +12
const meshes = Array.from(meshConfiguration.MESH_CONFIGURATION.values());
const intervalIndex = meshConfiguration.findIntervalIndexFromScore({ score });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

En utilisant à la place findMeshFromScore on supprimerait la nécessité du Array.from, je rajoute le commit ?

@@ -62,7 +62,7 @@ describe('Integration | Infrastructure | Utils | Pdf | V3 Certification Attestat
maxReachableLevelOnCertificationDate: 5,
deliveredAt: new Date('2021-05-05'),
certificationCenter: 'Centre des poules bien dodues',
pixScore: 51,
pixScore: 256,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A 51, on était en PRE_BEGINNER donc sans niveau global

"6": "Advanced 2",
"7": "Expert 1",
"8": "Expert 2"
"LEVEL_ADVANCED_5": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@agnes : avez-vous les trads EN, ES, NL ?

@AndreiaPena
Copy link
Member

AndreiaPena commented Mar 24, 2025

Capture d’écran 2025-03-24 à 09 29 35

OK ✅


En revanche des retours à traiter (hors PR)

J'ai un "/" dans le nom de mon centre qui n'est pas bien géré (aucune idée de s'il existe des centre avec des slash dans leurs noms mais au cas où il faut pouvoir le gérer)

Capture d’écran 2025-03-24 à 09 28 18 Capture d’écran 2025-03-24 à 09 28 34

C'est pas centré encore :/
Capture d’écran 2025-03-24 à 09 29 50

* @param {string} props.birthplace
* @param {string} props.certificationCenter - center name
* @param {string} props.pixScore
* @param {GlobalCertificationLevel} props.[globalLevel] - auto calculated
Copy link
Contributor

Choose a reason for hiding this comment

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

question: props.[globalLevel] à quoi servent les crochets ici ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indiquer que ce parametre n'est pas obligatoire

const generateV3AttestationTemplate = ({ pdf, data, translate, globalCertificationLevel }) => {
/**
* @param {Object} params
* @param {V3CertificationAttestation} params.data
Copy link
Contributor

Choose a reason for hiding this comment

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

question: pas besoin de documenter les autres params ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Si, mais j'essaye de me limiter dans le temps de scout rule dans mes PR !

Si les precedents developpeurs n'ont pas eu besoin de documenter avant mon passage c'est peut etre que ca n'avait pas d'interet pour eux ou parce que leur outil ne le prends pas en charge.

Je me suis donc limite a la doc des parametres parametres qui m'ont aides moi a developper + efficacement cette PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 Func Review Needed Need PO validation for this functionally team-certif Tech Review OK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants