display dayWishes in team candidates

This commit is contained in:
memeriau 2022-04-16 15:34:21 +02:00
parent 458df713ad
commit f0f08a91ed
2 changed files with 27 additions and 5 deletions

View File

@ -31,6 +31,16 @@ const selectTeamsWithVolunteersCandidates = createSelector(
})
)
type PropsDaysDisplay = {
dayWishes: string[]
}
const DaysDisplay: FC<PropsDaysDisplay> = ({ dayWishes }): JSX.Element => (
<span className={styles.daysDisplay}>
{dayWishes.map((day) => (day === "S" || day === "D" ? <strong>{day}</strong> : day))}
</span>
)
type Props = {
teamId: number
}
@ -51,12 +61,11 @@ const TeamWithCandidates: FC<Props> = ({ teamId }): JSX.Element | null => {
Equipe {team.name} ({team.volunteers.length}) :
</div>
<ul>
{team.volunteers.map(({ id, lastname, firstname, teamWishes }) => (
{team.volunteers.map(({ id, lastname, firstname, teamWishes, dayWishes }) => (
<li key={id}>
<b>
{firstname} {lastname}
</b>{" "}
:
<span className={styles.volunteerName}>
{firstname} {lastname} (<DaysDisplay dayWishes={dayWishes} />)
</span>
{teamWishes.map((teamWish) => {
const active = false
return (

View File

@ -35,3 +35,16 @@
background-color: #fb0;
}
}
.volunteerName {
font-weight: bold;
}
.daysDisplay {
font-weight: normal;
color: $color-grey-medium;
strong {
color: $color-green;
}
}