Skip to content

Commit

Permalink
feat: ajoute indicateur pilotage beneficiaires a archiver
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurlbrjc committed Dec 12, 2024
1 parent 35469d8 commit 48837f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion components/NavLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export default function NavLinks({
const [portefeuille] = usePortefeuille()
const actualites = useActualites()

const nombreBeneficiairesAArchiver = portefeuille.reduce(
(count, beneficiaire) => count + Number(beneficiaire.estAArchiver),
0
)

const [afficherActualiteModal, setAfficherActualiteModal] =
useState<boolean>(false)

Expand Down Expand Up @@ -140,6 +145,11 @@ export default function NavLinks({
href='/pilotage'
isActive={isCurrentRoute('/pilotage')}
showLabelOnSmallScreen={showLabelsOnSmallScreen}
badgeLabel={
nombreBeneficiairesAArchiver > 0
? 'Des actions requièrent votre attention'
: undefined
}
/>
)}

Expand Down Expand Up @@ -211,7 +221,7 @@ export default function NavLinks({
conseiller,
actualites.dateDerniereModification
)
? '!'
? 'De nouvelles actualités sont disponibles'
: undefined
}
/>
Expand Down
2 changes: 1 addition & 1 deletion components/ui/Form/NavLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function BadgeNavLink({ label }: { label: string }) {
<>
<IconComponent
focusable={false}
aria-hidden={false}
aria-hidden={true}
className='w-4 h-4 fill-warning absolute top-0 left-0 bg-white rounded-full'
name={IconName.Error}
/>
Expand Down

0 comments on commit 48837f9

Please sign in to comment.