Skip to content

Commit

Permalink
Merge pull request #307 from nwplus/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
DonaldKLee authored Jan 17, 2025
2 parents fa8d57f + f592aa0 commit 92ab1e9
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions pages/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ export default function Status({ hackathons }) {
const [success, setSuccess] = useState('')
const [error, setError] = useState('')
const [releaseLiabilityStatus, setreleaseLiabilityStatus] = useState(false)
const [covidWaiverStatus, setCovidWaiverStatus] = useState(false)
const [mediaConsentStatus, setMediaConsentStatus] = useState(false)
const [safewalkSelectStatus, setsafewalkSelectStatus] = useState('safewalkNo')
const [mentorshipSelectStatus, setMentorshipSelectStatus] = useState('nwMentorshipNo')
const [emailConsentStatus, setEmailConsentStatus] = useState(false)
const [checkInDisclaimerStatus, setCheckInDisclaimerStatus] = useState(false)

const validateInputs = () => {
if (!emails) {
Expand Down Expand Up @@ -111,10 +112,11 @@ export default function Status({ hackathons }) {
await updateApplicantStatus(userId, statusSelected, hackathonSelected)
if (statusSelected === 'acceptedAndAttending') {
await updateWaiver(userId, 'releaseLiabilityCheck', releaseLiabilityStatus, hackathonSelected)
await updateWaiver(userId, 'covidWaiverCheck', covidWaiverStatus, hackathonSelected)
await updateWaiver(userId, 'mediaConsentCheck', mediaConsentStatus, hackathonSelected)
await updateWaiver(userId, 'safewalkSelect', safewalkSelectStatus, hackathonSelected)
await updateWaiver(userId, 'nwMentorshipSelect', mentorshipSelectStatus, hackathonSelected)
await updateWaiver(userId, 'sponsorEmailConsentCheck', emailConsentStatus, hackathonSelected)
await updateWaiver(userId, 'checkInDisclaimerCheck', checkInDisclaimerStatus, hackathonSelected)
}
}

Expand Down Expand Up @@ -171,11 +173,6 @@ export default function Status({ hackathons }) {
checked: releaseLiabilityStatus,
onClick: () => setreleaseLiabilityStatus(!releaseLiabilityStatus),
},
{
label: 'Covid Waiver',
checked: covidWaiverStatus,
onClick: () => setCovidWaiverStatus(!covidWaiverStatus),
},
{
label: 'Media Consent',
checked: mediaConsentStatus,
Expand All @@ -194,6 +191,18 @@ export default function Status({ hackathons }) {
prev === 'nwMentorshipYes' ? 'nwMentorshipNo' : 'nwMentorshipYes'
),
},
{
label:
'I authorize the use of my email to receive hiring opportunities, promotions, and information from participating nwHacks sponsors',
checked: emailConsentStatus,
onClick: () => setEmailConsentStatus(!emailConsentStatus),
},
{
label:
'I understand that if I do not arrive during the designated check-in period, my spot may be given to someone else. In this case my RSVP does not guarantee entry to the event.',
checked: checkInDisclaimerStatus,
onClick: () => setCheckInDisclaimerStatus(!checkInDisclaimerStatus),
},
].map(({ label, checked, onClick }) => (
<div key={label}>
<Checkbox label={label} checked={checked} onClick={onClick} />
Expand Down

0 comments on commit 92ab1e9

Please sign in to comment.