Repository navigation
COM-4332 - display generic contact infos if contact is operationRepre… - #2920
manonpalin wants to merge 2 commits into
Conversation
|
|
||
| return { | ||
| operationsRepresentative: _formatUserWithGenericContactInfos(course.operationsRepresentative), | ||
| ...(isOperationsRepresentativeContact && { contact: _formatUserWithGenericContactInfos(course.contact) }), |
There was a problem hiding this comment.
pourquoi il faut modifier aussi le contact ? il est affiché où ?
There was a problem hiding this comment.
C'est surtout pour que dans le cas ou le chargé des opérations est le contact, on n'envoie pas le numéro de tel au front, je peux juste faire un omit ceci dit.
There was a problem hiding this comment.
mais de ce champ contact on utilise juste l'id pour afficher ou non "contact de la formation" sur la cellule interlocutuer, on pourrait juste mettre contact: {_id: course.contact} sans condition sur isOperationsRepresentativeContact, non ?
| identity: { firstname: 'Jean', lastname: 'Opération' }, | ||
| local: { email: 'test@compani.fr' }, | ||
| }); | ||
| process.env.MANAGEMENT_COMPANI_EMAIL = ''; |
There was a problem hiding this comment.
pourquoi on vide la variable d'env ?
There was a problem hiding this comment.
Quand on définit une var d'env dans les tests on la défini et la vide au debut et a la fin de chaqeu test, souvent on le fait dans le beforeEach et afterEach mais la il vaut mieux le faire dans les tests directement
There was a problem hiding this comment.
justement pourquoi l'avoir mis dans chaque test plutôt que définir la variable dans beforeeach et la reset dans aftereach ?
…sentative
TESTS 💻
POINTS D'ATTENTION POUR CETTE PR⚠️
FONCTIONNALITÉS APPS MOBILES 📱
Si tu as lu cette description, pense à réagir avec un 👁️