Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HC RSVP Page Update #624

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
72 changes: 50 additions & 22 deletions src/components/ApplicationDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,14 @@ const Dashboard = ({
setMediaConsentCheck,
ageOfMajoritySelect,
setAgeOfMajoritySelect,
willBeAttendingSelect,
setWillBeAttendingSelect,
willBeAttendingCheck,
setWillBeAttendingCheck,
safewalkSelect,
setSafewalkSelect,
nwMentorshipSelect,
setNwMentorshipSelect,
// nwMentorshipSelect,
// setNwMentorshipSelect,
hcFeatureSelect,
setHcFeatureSelect,
username,
editApplication,
relevantDates,
Expand All @@ -395,9 +397,10 @@ const Dashboard = ({
const [releaseLiability, setReleaseLiability] = useState(releaseLiabilityCheck || undefined)
const [mediaConsent, setMediaConsent] = useState(mediaConsentCheck || undefined)
// const [ageOfMajority, setAgeOfMajority] = useState(ageOfMajoritySelect || undefined)
const [willBeAttending, setWillBeAttending] = useState(willBeAttendingSelect || undefined)
const [willBeAttending, setWillBeAttending] = useState(willBeAttendingCheck || false)
const [safewalk, setSafewalk] = useState(safewalkSelect || undefined)
const [nwMentorship, setNwMentorship] = useState(nwMentorshipSelect || undefined)
// const [nwMentorship, setNwMentorship] = useState(nwMentorshipSelect || undefined)
const [hcFeature, setHcFeature] = useState(hcFeatureSelect || false)

const hackerRSVPStatus = hackerStatuses()[hackerStatus]?.sidebarText

Expand Down Expand Up @@ -430,19 +433,24 @@ const Dashboard = ({
// setAgeOfMajoritySelect(e.target.value)
// }

const handleWillBeAttendingSelectChange = e => {
setWillBeAttending(e.target.value)
setWillBeAttendingSelect(e.target.value)
const handleWillBeAttendingChange = () => {
setWillBeAttending(!willBeAttending)
setWillBeAttendingCheck(!willBeAttendingCheck)
}

const handleSafewalkSelectChange = e => {
setSafewalk(e.target.value)
setSafewalkSelect(e.target.value)
}

const handleNwMentorshipSelectChange = e => {
setNwMentorship(e.target.value)
setNwMentorshipSelect(e.target.value)
// const handleNwMentorshipSelectChange = e => {
// setNwMentorship(e.target.value)
// setNwMentorshipSelect(e.target.value)
// }

const handleHcFeatureChange = value => {
setHcFeature(value)
setHcFeatureSelect(value)
}

const handleRSVPClick = () => {
Expand Down Expand Up @@ -495,15 +503,11 @@ const Dashboard = ({
{relevantDates.hackathonWeekend}? <Required />
</QuestionLabel>
<SelectOptionContainer>
<input
type="radio"
id="willBeAttendingYes"
name="willBeAttendingYes"
value="willBeAttendingYes"
checked={willBeAttending === 'willBeAttendingYes'}
onChange={handleWillBeAttendingSelectChange}
<Checkbox
checked={willBeAttending}
onChange={handleWillBeAttendingChange}
label="Yes, I will be attending"
/>
<label htmlFor="willBeAttendingYes">Yes</label>
</SelectOptionContainer>
</SelectContainer>

Expand Down Expand Up @@ -594,7 +598,7 @@ const Dashboard = ({
width="130px"
target="_blank"
rel="noopener noreferrer"
href={waiversAndForms.COVID}
href={waiversAndForms.covid}
>
Read Full Waiver.
</A>{' '}
Expand Down Expand Up @@ -632,6 +636,30 @@ const Dashboard = ({
</QuestionContainer>

<SelectContainer>
<QuestionLabel>HackCamp 2024 Feature Preference</QuestionLabel>
<P>
We are looking for people to be featured in interview videos about their experience
at HackCamp. Filming will take ~10 mins and will take place during Day 2 Build Day.
If chosen, our team will reach out with further instructions. Are you interested in
participating?{' '}
</P>
<SelectOptionContainer>
<Checkbox
checked={hcFeature}
onChange={() => handleHcFeatureChange(true)}
label="Yes"
/>
</SelectOptionContainer>
<SelectOptionContainer>
<Checkbox
checked={!hcFeature}
onChange={() => handleHcFeatureChange(false)}
label="No"
/>
</SelectOptionContainer>
</SelectContainer>

{/* <SelectContainer>
<QuestionLabel>nwMentorship Program</QuestionLabel>
<P>
I would like to participate in the nwMentorship program to connect with an industry
Expand Down Expand Up @@ -669,7 +697,7 @@ const Dashboard = ({
/>
<label htmlFor="nwMentorshipNo">No</label>
</SelectOptionContainer>
</SelectContainer>
</SelectContainer> */}
</>
)}

Expand Down
25 changes: 18 additions & 7 deletions src/containers/Application/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ const ApplicationDashboardContainer = () => {
forceSave()
}

const setWillBeAttendingSelect = willBeAttendingSelect => {
const setWillBeAttendingCheck = willBeAttendingCheck => {
updateApplication({
basicInfo: {
willBeAttendingSelect,
willBeAttendingCheck,
},
})
forceSave()
Expand All @@ -164,6 +164,15 @@ const ApplicationDashboardContainer = () => {
forceSave()
}

const setHcFeatureSelect = hcFeatureSelect => {
updateApplication({
basicInfo: {
hcFeatureSelect,
},
})
forceSave()
}

const handleWaiver = async waiver => {
// check to make sure its under 2mb
const size = (waiver.size / 1024 / 1024).toFixed(2)
Expand Down Expand Up @@ -206,14 +215,16 @@ const ApplicationDashboardContainer = () => {
setMediaConsentCheck={mediaConsentCheck => setMediaConsentCheck(mediaConsentCheck)}
ageOfMajoritySelect={application.basicInfo.ageOfMajoritySelect || undefined}
setAgeOfMajoritySelect={ageOfMajoritySelect => setAgeOfMajoritySelect(ageOfMajoritySelect)}
willBeAttendingSelect={application.basicInfo.willBeAttendingSelect || undefined}
setWillBeAttendingSelect={willBeAttendingSelect =>
setWillBeAttendingSelect(willBeAttendingSelect)
willBeAttendingCheck={application.basicInfo.willBeAttendingCheck || false}
setWillBeAttendingCheck={willBeAttendingCheck =>
setWillBeAttendingCheck(willBeAttendingCheck)
}
safewalkSelect={application.basicInfo.safewalkSelect || undefined}
setSafewalkSelect={safewalkSelect => setSafewalkSelect(safewalkSelect)}
nwMentorshipSelect={application.basicInfo.nwMentorshipSelect || undefined}
setNwMentorshipSelect={nwMentorshipSelect => setNwMentorshipSelect(nwMentorshipSelect)}
// nwMentorshipSelect={application.basicInfo.nwMentorshipSelect || undefined}
// setNwMentorshipSelect={nwMentorshipSelect => setNwMentorshipSelect(nwMentorshipSelect)}
hcFeatureSelect={application.basicInfo.hcFeatureSelect || undefined}
setHcFeatureSelect={hcFeatureSelect => setHcFeatureSelect(hcFeatureSelect)}
relevantDates={relevantDates}
waiversAndForms={waiversAndForms}
notionLinks={notionLinks}
Expand Down
Loading