fix initial calendar loading;
show unpublished events in calendar for ADMINS mark unavailable publishers when they are available on another time on the same day;
This commit is contained in:
@ -614,7 +614,7 @@ function convertShiftDates(assignments) {
|
||||
}
|
||||
|
||||
|
||||
async function getCalendarEvents(publisherId, date, availabilities = true, assignments = true) {
|
||||
async function getCalendarEvents(publisherId, availabilities = true, assignments = true, includeUnpublished = false) {
|
||||
const result = [];
|
||||
// let pubs = await filterPublishers("id,firstName,lastName,email".split(","), "", date, assignments, availabilities, date ? true : false, publisherId);
|
||||
|
||||
@ -682,7 +682,7 @@ async function getCalendarEvents(publisherId, date, availabilities = true, assig
|
||||
//only published shifts
|
||||
|
||||
publisher.assignments?.filter(
|
||||
assignment => assignment.shift.isPublished
|
||||
assignment => assignment.shift.isPublished || includeUnpublished
|
||||
).forEach(item => {
|
||||
result.push({
|
||||
...item,
|
||||
|
Reference in New Issue
Block a user