From 1885ca4c147de19215b1197b83cbe036860fcde9 Mon Sep 17 00:00:00 2001 From: "riho.takagi" Date: Thu, 29 Feb 2024 12:39:30 -0500 Subject: [PATCH] for testing --- .../client/booking/components/RoomCalendar.tsx | 4 ++-- .../client/booking/components/SheetEditor.tsx | 18 ++++++++++-------- media_commons_booking_app/src/server/admin.js | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/media_commons_booking_app/src/client/booking/components/RoomCalendar.tsx b/media_commons_booking_app/src/client/booking/components/RoomCalendar.tsx index 26930666..7a375c54 100644 --- a/media_commons_booking_app/src/client/booking/components/RoomCalendar.tsx +++ b/media_commons_booking_app/src/client/booking/components/RoomCalendar.tsx @@ -21,9 +21,9 @@ export const RoomCalendar = ({ useEffect(() => { //PROD - fetchCalendarEvents(room.calendarIdProd); + //fetchCalendarEvents(room.calendarIdProd); //DEV - //fetchCalendarEvents(room.calendarId); + fetchCalendarEvents(room.calendarId); }, []); const fetchCalendarEvents = async (calendarId) => { serverFunctions.getCalendarEvents(calendarId).then((rows) => { diff --git a/media_commons_booking_app/src/client/booking/components/SheetEditor.tsx b/media_commons_booking_app/src/client/booking/components/SheetEditor.tsx index f477d487..1ceb4f4b 100644 --- a/media_commons_booking_app/src/client/booking/components/SheetEditor.tsx +++ b/media_commons_booking_app/src/client/booking/components/SheetEditor.tsx @@ -50,16 +50,16 @@ const SAFTY_TRAINING_SHEET_NAME = 'safety_training_users'; const INSTANT_APPROVAL_ROOMS = ['221', '222', '223', '224']; const SheetEditor = () => { - //IN PRODUCTION - const roomCalendarId = (room) => { - return findByRoomId(mappingRoomSettings, room.roomId)?.calendarIdProd; - }; - - //IN DEV + //PRODUCTION //const roomCalendarId = (room) => { - // return findByRoomId(mappingRoomSettings, room.roomId)?.calendarId; + // return findByRoomId(mappingRoomSettings, room.roomId)?.calendarIdProd; //}; + //DEV + const roomCalendarId = (room) => { + return findByRoomId(mappingRoomSettings, room.roomId)?.calendarId; + }; + const getActiveUserEmail = () => { serverFunctions.getActiveUserEmail().then((response) => { console.log('userEmail response', response); @@ -200,7 +200,9 @@ const SheetEditor = () => { [] ); const trained = emails.includes(userEmail); - setIsSafetyTrained(trained); + if (trained) { + setIsSafetyTrained(trained); + } }); } }; diff --git a/media_commons_booking_app/src/server/admin.js b/media_commons_booking_app/src/server/admin.js index 0b7751d6..ddb170f2 100644 --- a/media_commons_booking_app/src/server/admin.js +++ b/media_commons_booking_app/src/server/admin.js @@ -1,6 +1,6 @@ export const BOOKING_SHEET_NAME = 'bookings'; export const BOOKING_STATUS_SHEET_NAME = 'bookingStatus'; -const SECOND_APPROVER_EMAIL = 'ss12430@nyu.edu'; +const SECOND_APPROVER_EMAIL = 'mediacommons.reservations@nyu.edu'; const current = new Date();