diff --git a/pages/cart/calendar/index.tsx b/pages/cart/calendar/index.tsx index da3bc2f..5bbb9ae 100644 --- a/pages/cart/calendar/index.tsx +++ b/pages/cart/calendar/index.tsx @@ -124,7 +124,6 @@ export default function CalendarPage({ initialEvents, initialShifts }) { // }); - //commented for now: remove unavailable publishers // availablePubsForDate = availablePubsForDate.map(pub => { // pub.availabilities = pub.availabilities.filter(avail => avail.isFromPreviousAssignment == false); diff --git a/src/helpers/data.js b/src/helpers/data.js index 972ddb1..a359f84 100644 --- a/src/helpers/data.js +++ b/src/helpers/data.js @@ -228,7 +228,7 @@ async function getAvailabilities(userId) { } -async function filterPublishersNew(selectFields, filterDate, isExactTime = false, isForTheMonth = false, isNoEndDateFilter = false, isWithStats = true, includeOldAvailabilities = false) { +async function filterPublishersNew(selectFields, filterDate, isExactTime = false, isForTheMonth = false, noEndDateFilter = false, isWithStats = true, includeOldAvailabilities = false) { filterDate = new Date(filterDate); // Convert to date object if not already @@ -359,7 +359,7 @@ async function filterPublishersNew(selectFields, filterDate, isExactTime = false } }; - if (!isNoEndDateFilter) { // Check if we need to apply the endTime filter + if (!noEndDateFilter) { // Check if we need to apply the endTime filter whereClause["availabilities"].some.OR[0].endTime = { lte: monthInfo.lastSunday }; } }