Merge branch 'main' into production

This commit is contained in:
Dobromir Popov
2024-04-26 10:49:04 +03:00
3 changed files with 3 additions and 4 deletions

View File

@ -124,7 +124,6 @@ export default function CalendarPage({ initialEvents, initialShifts }) {
// }); // });
//commented for now: remove unavailable publishers //commented for now: remove unavailable publishers
// availablePubsForDate = availablePubsForDate.map(pub => { // availablePubsForDate = availablePubsForDate.map(pub => {
// pub.availabilities = pub.availabilities.filter(avail => avail.isFromPreviousAssignment == false); // pub.availabilities = pub.availabilities.filter(avail => avail.isFromPreviousAssignment == false);

View File

@ -1,2 +1,2 @@
-- AlterTable -- AlterTable
ALTER TABLE `publisher` ADD COLUMN `lastLogin` DATETIME(3) NULL; ALTER TABLE `Publisher` ADD COLUMN `lastLogin` DATETIME(3) NULL;

View File

@ -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 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 }; whereClause["availabilities"].some.OR[0].endTime = { lte: monthInfo.lastSunday };
} }
} }