Skip to content

Commit

Permalink
Corrections sur les modales de statut détaillé
Browse files Browse the repository at this point in the history
  • Loading branch information
mariheck committed Oct 20, 2023
1 parent 4896294 commit 971761d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ActionJustification = ({
collectivite_id: payload.collectivite_id,
action_id: payload.action_id,
texte: payload.commentaire,
modified_at: new Date().toLocaleDateString(),
modified_at: new Date().toDateString(),
};
onSave ? onSave(savedData) : saveActionJustification(savedData);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const ScoreAutoModal = ({
<>
<h4>Détailler l'avancement : {action.id.split('_')[1]}</h4>

{scores && scores.scoreMax && localAvancement && (
{scores && scores.scoreMax && localAvancement ? (
<div className="flex items-start mt-2 mb-6">
<p className="mb-0 text-sm mr-4">
Score {action.referentiel === 'cae' ? 'automatique' : ''}
Expand All @@ -233,7 +233,7 @@ const ScoreAutoModal = ({
valueToDisplay={avancementToLabel.fait}
/>
</div>
)}
) : null}

<hr className="p-1" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,28 @@ const ScoreDetailleModal = ({

{/* Score automatique */}
{isScorePerso &&
scores &&
scores.avancementDetaille &&
scores.scoreMax && (
<div className="flex items-start mt-2 mb-6">
<p className="mb-0 text-sm mr-4">Score automatique</p>
<ProgressBarWithTooltip
score={
scores.avancementDetaille?.map((a, idx) => ({
value: a,
label: avancementToLabel[getStatusFromIndex(idx)],
color: actionAvancementColors[getStatusFromIndex(idx)],
})) ?? []
}
total={scores.scoreMax ?? 0}
defaultScore={{
label: avancementToLabel.non_renseigne,
color: actionAvancementColors.non_renseigne,
}}
valueToDisplay={avancementToLabel.fait}
/>
</div>
)}
scores &&
scores.avancementDetaille &&
scores.scoreMax ? (
<div className="flex items-start mt-2 mb-6">
<p className="mb-0 text-sm mr-4">Score automatique</p>
<ProgressBarWithTooltip
score={
scores.avancementDetaille?.map((a, idx) => ({
value: a,
label: avancementToLabel[getStatusFromIndex(idx)],
color: actionAvancementColors[getStatusFromIndex(idx)],
})) ?? []
}
total={scores.scoreMax ?? 0}
defaultScore={{
label: avancementToLabel.non_renseigne,
color: actionAvancementColors.non_renseigne,
}}
valueToDisplay={avancementToLabel.fait}
/>
</div>
) : null}

<hr className="p-1" />

Expand Down

0 comments on commit 971761d

Please sign in to comment.