From e6391432047879ed8a85e35eabcd28be415747a7 Mon Sep 17 00:00:00 2001 From: "riho.takagi" Date: Mon, 6 Nov 2023 19:49:39 -0500 Subject: [PATCH] update languages --- .../client/booking/components/Calendars.tsx | 11 +++-- .../client/booking/components/FormInput.tsx | 46 ++++++++++++------- .../booking/components/InitialModal.tsx | 4 ++ .../src/client/utils/date.tsx | 9 +++- 4 files changed, 46 insertions(+), 24 deletions(-) diff --git a/media_commons_booking_app/src/client/booking/components/Calendars.tsx b/media_commons_booking_app/src/client/booking/components/Calendars.tsx index 6e8a065a..3bfc0ca2 100644 --- a/media_commons_booking_app/src/client/booking/components/Calendars.tsx +++ b/media_commons_booking_app/src/client/booking/components/Calendars.tsx @@ -46,11 +46,11 @@ export const Calendars = ({ } if (bookingTimeEvent) { const isConfirmed = window.confirm( - `You are requesting to book the following rooms${selectedRooms.map( + `Confirming that you are requesting to book the following rooms: ${selectedRooms.map( (room) => `${room.roomId} ${room.name}` - )} for the time slot ${formatDate( + )} starting at ${formatDate( bookingTimeEvent.startStr - )} ~ ${formatDate(bookingTimeEvent.endStr)}` + )} and ending at ${formatDate(bookingTimeEvent.endStr)}` ); if (isConfirmed) handleSetDate(bookingTimeEvent); } @@ -160,13 +160,14 @@ export const Calendars = ({ }; return (
-
+
Select date
+
setEnrolledThesis(!enrolledThisis)} />

- Due to COVID policies, Non-NYU members will need to gain access - clearance through certain NYU processes. For more information about - visitor, vendor, and affiliate access,{' '} + Non-NYU guests will need to be sponsored through JRNY. For more + information about visitor, vendor, and affiliate access, @@ -490,18 +489,13 @@ const FormInput = ({ hasEmail, roomNumber, handleParentSubmit }) => { Room setup needed?

- If your event or reservation is in 233 or 1201 and requires a specific - room setup that is different from the standard configuration, it is - your responsibility to{' '} - + If your reservation is in 233 or 1201 and requires a specific room + setup that is different from the standard configuration, it is the + submit a work order with CBS - . It is also the reservation holder's responsibility to ensure the - room is reset after use. Failure to do either will result in the - restriction of reservation privileges. + .It is also the reservation holder's responsibility to ensure the room + is reset after use.

{errors.roomSetup && }
@@ -618,7 +612,7 @@ const FormInput = ({ hasEmail, roomNumber, handleParentSubmit }) => { name="mediaServices" {...register('mediaServices')} /> - (For 220-224) Using lights in ceiling grid + (For 220-224) Using DMX lights in ceiling grid )} {roomNumber.includes('202') || @@ -643,8 +637,26 @@ const FormInput = ({ hasEmail, roomNumber, handleParentSubmit }) => { className="block mb-2 text-sm font-medium text-gray-900 dark:text-white" > If you selected any of the Media Services above, please describe - your needs in detail. (Ie. what kind of equipment you need to check - out or the type of assistance you need from an audio technician) + your needs in detail. If you need to check out equipment, you can + check our inventory and include your request below. (Ie. 2x Small + Mocap Suits) +
-{' '} + + Inventory for Black Box 220 and Ballrooms 221-224 + +
-{' '} + + Inventory for Garage 103 + +

{

+ 370🅙 Media Commons Reservation Form +
+ Thank you for your interest in booking with the Media Commons. +
Please read our Policy for using the 370 Jay Street Shared Spaces

diff --git a/media_commons_booking_app/src/client/utils/date.tsx b/media_commons_booking_app/src/client/utils/date.tsx index b5a05fc8..aa6921c8 100644 --- a/media_commons_booking_app/src/client/utils/date.tsx +++ b/media_commons_booking_app/src/client/utils/date.tsx @@ -4,8 +4,13 @@ export const formatDate = (oldDate) => { const year = oldDateObject.getFullYear(); const month = String(oldDateObject.getMonth() + 1).padStart(2, '0'); const date = String(oldDateObject.getDate()).padStart(2, '0'); - const hours = String(oldDateObject.getHours()).padStart(2, '0'); + let hours = oldDateObject.getHours(); + + const ampm = hours >= 12 ? 'PM' : 'AM'; + hours = hours % 12; + hours = hours ? hours : 12; + const strHours = String(hours).padStart(2, '0'); const minutes = String(oldDateObject.getMinutes()).padStart(2, '0'); - return `${year}-${month}-${date} ${hours}:${minutes}`; + return `${month}-${date}-${year} ${strHours}:${minutes} ${ampm}`; };