Skip to content

Commit

Permalink
Merge pull request #167 from ITPNYU/hotfix/roomnumber_language
Browse files Browse the repository at this point in the history
Update logic for showing media services messages
  • Loading branch information
rlho authored Apr 11, 2024
2 parents 1748013 + a898d3c commit 60f9696
Showing 1 changed file with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,18 @@ const FormInput = ({ handleParentSubmit }) => {
<ErrorMessage errors={errors.mediaServices.message} />
)}
<div className="flex flex-col mb-4">
<label key={'checkoutEquipment'}>
<input
type="checkbox"
value="Checkout equipment"
{...register('mediaServices')}
/>
Checkout equipment
</label>
{roomNumber.some((room) =>
[103, 220, 221, 222, 223, 224, 230, 233, 260].includes(Number(room))
) && (
<label key={'checkoutEquipment'}>
<input
type="checkbox"
value="Checkout equipment"
{...register('mediaServices')}
/>
Checkout equipment
</label>
)}
{roomNumber.includes('103') && (
<label key={'103audioTechnician'}>
<input
Expand Down Expand Up @@ -568,18 +572,17 @@ const FormInput = ({ handleParentSubmit }) => {
(For 220-224) Using DMX lights in ceiling grid
</label>
)}
{roomNumber.includes('202') ||
(roomNumber.includes('1201') && (
<label key={'support'}>
<input
type="checkbox"
value="(For 202 and 1201) Contact Campus Media for technical and event support"
{...register('mediaServices')}
/>
(For 202 and 1201) Contact Campus Media for technical and event
support
</label>
))}
{roomNumber.some((room) => [202, 1201].includes(Number(room))) && (
<label key={'support'}>
<input
type="checkbox"
value="(For 202 and 1201) Contact Campus Media for technical and event support"
{...register('mediaServices')}
/>
(For 202 and 1201) Contact Campus Media if you need to check out
equipment or need technical and/or event support.
</label>
)}
</div>
</div>
{watch('mediaServices') !== undefined &&
Expand Down

0 comments on commit 60f9696

Please sign in to comment.