Skip to content

Commit

Permalink
fix: on ne retourne plus le cerfa entier mais juste le nom du dossier
Browse files Browse the repository at this point in the history
  • Loading branch information
rsauvair committed Jun 15, 2022
1 parent 2fe9339 commit 377745c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion server/src/http/routes/specific/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ module.exports = (components) => {
const dossier = dossiersWks[index];
const contributeurs = await dossiers.getContributeurs(dossier._id, components);
const cerfaDossier = await cerfas.findCerfaByDossierId(dossier._id);
const nomDossier =
cerfaDossier.apprenti.nom && cerfaDossier.apprenti.prenom
? cerfaDossier.apprenti.nom.toUpperCase() + " " + cerfaDossier.apprenti.prenom
: dossier.nom;

results.push({
...dossier,
contributeurs,
cerfaDossier,
nomDossier,
});
}
return res.json(results);
Expand Down
5 changes: 1 addition & 4 deletions ui/components/Workspace/TableDossiers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ const TableDossiers = ({
Nom: {
Header: "Nom",
width: 120,
value:
m.cerfaDossier.apprenti.nom && m.cerfaDossier.apprenti.prenom
? m.cerfaDossier.apprenti.nom.toUpperCase() + " " + m.cerfaDossier.apprenti.prenom
: m.nom,
value: m.nomDossier,
},
Contributors: {
Header: "Contributeurs",
Expand Down

0 comments on commit 377745c

Please sign in to comment.