Skip to content

Commit

Permalink
fix: affichage des effectifs sans statut dans les tableaux d effectifs (
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrmr authored Apr 30, 2024
1 parent 3a1250d commit 6c119ab
Showing 1 changed file with 33 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,31 +81,42 @@ export const EffectifForm = memo(
requiredSifa={requiredSifaByBlock.statuts}
>
<VStack align="stretch" spacing={4} px={2} py={3}>
<HStack justifyContent="space-between">
<Text fontSize={14}>Statut actuel</Text>
<Text fontSize={14} fontWeight="semibold">
{getStatut(currentStatus.valeur)}
</Text>
</HStack>
<HStack justifyContent="space-between">
<Text fontSize={14}>Date de déclaration du statut</Text>
<Text fontSize={14} fontWeight="semibold">
{new Date(currentStatus.date).toLocaleDateString()}
</Text>
</HStack>
<Divider my={4} />
<VStack align="stretch">
<Text fontSize={14} mb={2}>
Anciens statuts
</Text>
{historyStatus.map((status, idx) => (
<HStack key={idx} justifyContent="space-start">
{parcours.length > 1 ? (
<>
<HStack justifyContent="space-between">
<Text fontSize={14}>Statut actuel</Text>
<Text fontSize={14} fontWeight="semibold">
{getStatut(status.valeur)} déclaré le {new Date(status.date).toLocaleDateString()}
{getStatut(currentStatus.valeur)}
</Text>
</HStack>
))}
</VStack>
<HStack justifyContent="space-between">
<Text fontSize={14}>Date de déclaration du statut</Text>
<Text fontSize={14} fontWeight="semibold">
{new Date(currentStatus.date).toLocaleDateString()}
</Text>
</HStack>
<Divider my={4} />
<VStack align="stretch">
<Text fontSize={14} mb={2}>
Anciens statuts
</Text>
{historyStatus.map((status, idx) => (
<HStack key={idx} justifyContent="space-start">
<Text fontSize={14} fontWeight="semibold">
{getStatut(status.valeur)} déclaré le {new Date(status.date).toLocaleDateString()}
</Text>
</HStack>
))}
</VStack>
</>
) : (
<HStack justifyContent="space-between">
<Text fontSize={14}>Statut actuel</Text>
<Text fontSize={14} fontWeight="semibold">
Aucun statut
</Text>
</HStack>
)}
</VStack>
</AccordionItemChild>
)}
Expand Down

0 comments on commit 6c119ab

Please sign in to comment.