-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(api): 3395 - matricule pour PDR et Centres lors des imports de PDT #4459
base: main
Are you sure you want to change the base?
Conversation
} | ||
} else if (!["correspondance aller", "correspondance retour", "correspondance"].includes(line[`ID PDR ${pdrNumber}`]?.toLowerCase())) { | ||
errors[`ID PDR ${pdrNumber}`].push({ line: index, error: PDT_IMPORT_ERRORS.BAD_PDR_ID, extra: line[`ID PDR ${pdrNumber}`] }); | ||
} else if (!["correspondance aller", "correspondance retour", "correspondance"].includes(line[`MATRICULE PDR ${pdrNumber}`]?.toLowerCase())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid deeply nested control flow statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2 choses :
- il faut aussi modifier les 2 modèle vierge d'import (CLE/HTS) avec les bon noms de colonne pour centre et PDR et la bonne description
- lors de la création du PDT, centerCode devrait etre égale a centerMatricule et non plus a code2022 (import.js ligne 283)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il faudrait qu'on mette en commun avec #4467 pour tester completement les export / filtre
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point d'interet. Vu avec la RUN hier lors des affectations, certaines ID de classe sont en majuscule. lors de la création des lignes de bus, le champ classeId est remplis avec une string. string qui est en majuscule dans certains cas, ce qui pose des problemes lors de script d'affectation, qui font des findOne sensible a la casse.
Solution -> s'assurer de stocké des string en minuscule dans les objetc ligne de bus et planDeTransport
On n'aura plus le problème vu qu'on passe par les matricules maintenant. Qu'en penses tu ? |
257df8b
to
4815b06
Compare
4815b06
to
425477d
Compare
Code Climate has analyzed commit 425477d and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 46.0% (0.0% change). View more on Code Climate. |
Import des PDT via les matricules pour centres et pdr: