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

nwHacks application #645

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
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
30 changes: 16 additions & 14 deletions src/components/ApplicationDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ const Dashboard = ({
setSafewalkSelect,
// nwMentorshipSelect,
// setNwMentorshipSelect,
hcFeatureSelect,
setHcFeatureSelect,
marketingFeatureSelect,
setMarketingFeatureSelect,
username,
editApplication,
relevantDates,
Expand All @@ -416,7 +416,7 @@ const Dashboard = ({
const [willBeAttending, setWillBeAttending] = useState(willBeAttendingCheck || false)
const [safewalk, setSafewalk] = useState(safewalkSelect || undefined)
// const [nwMentorship, setNwMentorship] = useState(nwMentorshipSelect || undefined)
const [hcFeature, setHcFeature] = useState(hcFeatureSelect || false)
const [marketingFeature, setMarketingFeature] = useState(marketingFeatureSelect || false)

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

Expand Down Expand Up @@ -464,9 +464,9 @@ const Dashboard = ({
// setNwMentorshipSelect(e.target.value)
// }

const handleHcFeatureChange = value => {
setHcFeature(value)
setHcFeatureSelect(value)
const handleMarketingFeatureChange = value => {
setMarketingFeature(value)
setMarketingFeatureSelect(value)
}

const handleRSVPClick = () => {
Expand Down Expand Up @@ -652,24 +652,26 @@ const Dashboard = ({
</QuestionContainer>

<SelectContainer>
<QuestionLabel>HackCamp 2024 Feature Preference</QuestionLabel>
<QuestionLabel>
{copyText[activeHackathon].hackathonName} 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 Build Day
(Sunday, November 10th). If chosen, our team will reach out with further
instructions. Are you interested in participating?{' '}
at {copyText[activeHackathon].hackathonNameShort}. Filming will take ~10 mins and
will take place during the hackathon. If chosen, our team will reach out with
further instructions. Are you interested in participating?{' '}
</P>
<SelectOptionContainer>
<Checkbox
checked={hcFeature}
onChange={() => handleHcFeatureChange(true)}
checked={marketingFeature}
onChange={() => handleMarketingFeatureChange(true)}
label="Yes"
/>
</SelectOptionContainer>
<SelectOptionContainer>
<Checkbox
checked={!hcFeature}
onChange={() => handleHcFeatureChange(false)}
checked={!marketingFeature}
onChange={() => handleMarketingFeatureChange(false)}
label="No"
/>
</SelectOptionContainer>
Expand Down
61 changes: 32 additions & 29 deletions src/components/ApplicationForm/ReviewCards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,13 @@ const ReviewCards = ({ formInputs, handleEdit, onChange }) => {
<QuestionHeading>Terms &amp; conditions</QuestionHeading>

<ContentWrapper textBlock>
{/* <P>
<P>
<span role="img" aria-label="Robot emoji">
🤖
</span>{' '}
cmd-f 2024 is an MLH partner event. The following 3 checkboxes are for this partnership.
</P> */}
{copyText[activeHackathon].hackathonNameShort} is an MLH partner event. The following 3
checkboxes are for this partnership.
</P>
<IndentedCheckbox
flex
checked={formInputs.termsAndConditions.MLHCodeOfConduct}
Expand All @@ -333,7 +334,7 @@ const ReviewCards = ({ formInputs, handleEdit, onChange }) => {
.<Required />
</span>
</IndentedCheckbox>
{/* <IndentedCheckbox
<IndentedCheckbox
flex
checked={formInputs.termsAndConditions.MLHPrivacyPolicy}
onChange={() =>
Expand Down Expand Up @@ -377,33 +378,35 @@ const ReviewCards = ({ formInputs, handleEdit, onChange }) => {
I authorize MLH to send me occasional emails about relevant events, career
opportunities, and community announcements.
</span>
</Checkbox> */}
</IndentedCheckbox>
</ContentWrapper>

{/* <ContentWrapper textBlock>
<P>
<span role="img" aria-label="Plant sprout emoji">
🌱
</span>{' '}
Gender is deeply personal and can look different on each individual. We ask all
participants to trust that everyone attending belongs at cmd-f.
</P>

<IndentedCheckbox
flex
checked={formInputs.termsAndConditions.genderAcknowledgement}
onChange={() =>
onChange({
genderAcknowledgement: !formInputs.termsAndConditions.genderAcknowledgement,
})
}
>
<span>
I agree
<Required />
</span>
</IndentedCheckbox>
</ContentWrapper> */}
{activeHackathon === 'cmd-f' && (
<ContentWrapper textBlock>
<P>
<span role="img" aria-label="Plant sprout emoji">
🌱
</span>{' '}
Gender is deeply personal and can look different on each individual. We ask all
participants to trust that everyone attending belongs at cmd-f.
</P>

<IndentedCheckbox
flex
checked={formInputs.termsAndConditions.genderAcknowledgement}
onChange={() =>
onChange({
genderAcknowledgement: !formInputs.termsAndConditions.genderAcknowledgement,
})
}
>
<span>
I agree
<Required />
</span>
</IndentedCheckbox>
</ContentWrapper>
)}

<ContentWrapper textBlock>
<P>
Expand Down
10 changes: 6 additions & 4 deletions src/containers/Application/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ const ApplicationDashboardContainer = () => {
forceSave()
}

const setHcFeatureSelect = hcFeatureSelect => {
const setMarketingFeatureSelect = marketingFeatureSelect => {
updateApplication({
basicInfo: {
hcFeatureSelect,
marketingFeatureSelect,
},
})
forceSave()
Expand Down Expand Up @@ -223,8 +223,10 @@ const ApplicationDashboardContainer = () => {
setSafewalkSelect={safewalkSelect => setSafewalkSelect(safewalkSelect)}
// nwMentorshipSelect={application.basicInfo.nwMentorshipSelect || undefined}
// setNwMentorshipSelect={nwMentorshipSelect => setNwMentorshipSelect(nwMentorshipSelect)}
hcFeatureSelect={application.basicInfo.hcFeatureSelect || undefined}
setHcFeatureSelect={hcFeatureSelect => setHcFeatureSelect(hcFeatureSelect)}
marketingFeatureSelect={application.basicInfo.marketingFeatureSelect || undefined}
setMarketingFeatureSelect={marketingFeatureSelect =>
setMarketingFeatureSelect(marketingFeatureSelect)
}
relevantDates={relevantDates}
waiversAndForms={waiversAndForms}
notionLinks={notionLinks}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/HackathonSelection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import nwplus_icon from '../assets/nwplus_icon.svg'
import HackathonCard from '../components/HackathonCard'

// one of 'HackCamp', 'nwHacks', 'cmd-f', or null (when we're done for the year)
const UP_NEXT_HACKATHON_NAME = 'HackCamp'
const UP_NEXT_HACKATHON_NAME = 'nwHacks'

const HackathonSelectionContainer = styled.div`
display: flex;
Expand Down
4 changes: 3 additions & 1 deletion src/utility/HackerApplicationContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ export function HackerApplicationProvider({ children }) {
return null
}

if (!applicationOpen && !window.location.pathname.endsWith('/application')) {
const canViewApplication =
applicationOpen || window.location.pathname.endsWith('/application') || user?.admin
if (!canViewApplication) {
return <Closed />
}

Expand Down
Loading