From a514e43d2d846a90fe61faeef5f5da163fb74c86 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Thu, 25 Apr 2024 23:37:27 +0300 Subject: [PATCH 1/2] fix table capitalization --- .../20240425155607_add_publisher_last_login/migration.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prisma/migrations/20240425155607_add_publisher_last_login/migration.sql b/prisma/migrations/20240425155607_add_publisher_last_login/migration.sql index 60c9a86..10d5928 100644 --- a/prisma/migrations/20240425155607_add_publisher_last_login/migration.sql +++ b/prisma/migrations/20240425155607_add_publisher_last_login/migration.sql @@ -1,2 +1,2 @@ -- AlterTable -ALTER TABLE `publisher` ADD COLUMN `lastLogin` DATETIME(3) NULL; +ALTER TABLE `Publisher` ADD COLUMN `lastLogin` DATETIME(3) NULL; \ No newline at end of file From 3faa69c5728ee3f5342234906ac8b3533a56ebc1 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Fri, 26 Apr 2024 10:48:50 +0300 Subject: [PATCH 2/2] fix --- pages/cart/calendar/index.tsx | 1 - src/helpers/data.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 }; } }