Skip to content
Merged

Dev #307

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading