Add assignment UI change in calendar

This commit is contained in:
Dobromir Popov
2024-06-28 19:47:59 +03:00
parent 8a52a2fa98
commit f8ae3d0072
6 changed files with 215 additions and 187 deletions

View File

@ -152,15 +152,17 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
//bold the text after - in the notes
notes: notes,
notes_bold: notes_bold,
names: shift.assignments
.map((assignment) => {
return (
assignment.publisher.firstName +
" " +
assignment.publisher.lastName
);
})
.join(", "),
names: shift.assignments.length > 0
? shift.assignments
.map((assignment) => {
return (
assignment.publisher.firstName +
" " +
assignment.publisher.lastName
);
})
.join(", ")
: shift.name,
};
if (shiftSchedule.names.length > 0) {