mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 08:34:20 +02:00
display dayWishes in team candidates
This commit is contained in:
parent
458df713ad
commit
f0f08a91ed
@ -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 (
|
||||
|
@ -35,3 +35,16 @@
|
||||
background-color: #fb0;
|
||||
}
|
||||
}
|
||||
|
||||
.volunteerName {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.daysDisplay {
|
||||
font-weight: normal;
|
||||
color: $color-grey-medium;
|
||||
|
||||
strong {
|
||||
color: $color-green;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user