diff --git a/media_commons_booking_app/src/client/admin-page/components/Bookings.tsx b/media_commons_booking_app/src/client/admin-page/components/Bookings.tsx index 48e8d201..46f2b756 100644 --- a/media_commons_booking_app/src/client/admin-page/components/Bookings.tsx +++ b/media_commons_booking_app/src/client/admin-page/components/Bookings.tsx @@ -114,6 +114,9 @@ export const Bookings = () => { catering: values[24], cateringService: values[25], hireSecurity: values[26], + chartFieldForCatering: values[27], + chartFieldForSecurity: values[28], + chartFieldForRoomSetup: values[29], }; }; @@ -213,6 +216,9 @@ export const Bookings = () => {
Media Services: diff --git a/media_commons_booking_app/src/client/booking/components/FormInput.tsx b/media_commons_booking_app/src/client/booking/components/FormInput.tsx index a554561a..e9c40677 100644 --- a/media_commons_booking_app/src/client/booking/components/FormInput.tsx +++ b/media_commons_booking_app/src/client/booking/components/FormInput.tsx @@ -26,6 +26,9 @@ export type Inputs = { expectedAttendance: string; cateringService: string; missingEmail?: string; + chartFieldForCatering: string; + chartFieldForSecurity: string; + chartFieldForRoomSetup: string; }; const ErrorMessage = (message) => { @@ -39,7 +42,7 @@ const ErrorMessage = (message) => { ); }; -const FormInput = ({ hasEmail, roomNumber, handleParentSubmit }) => { +const FormInput = ({ hasEmail, handleParentSubmit, selectedRoom }) => { const { register, handleSubmit, @@ -56,6 +59,9 @@ const FormInput = ({ hasEmail, roomNumber, handleParentSubmit }) => { mediaServicesDetails: '', role: '', catering: '', + chartFieldForCatering: '', + chartFieldForSecurity: '', + chartFieldForRoomSetup: '', hireSecurity: '', attendeeAffiliation: '', department: '', @@ -67,7 +73,10 @@ const FormInput = ({ hasEmail, roomNumber, handleParentSubmit }) => { const [resetRoom, setResetRoom] = useState(false); const [bookingPolicy, setBookingPolicy] = useState(false); const [showTextbox, setShowTextbox] = useState(false); + const roomNumber = selectedRoom.map((room) => room.roomId); + const maxCapacity = selectedRoom.map((room) => room.maxCapacity); + console.log('maxCapacity', maxCapacity); const disabledButton = !(checklist && resetRoom && bookingPolicy); useEffect(() => { trigger(); @@ -548,6 +557,25 @@ const FormInput = ({ hasEmail, roomNumber, handleParentSubmit }) => { /> )} + {watch('roomSetup') === 'yes' && ( +