Skip to content

Commit

Permalink
Merge pull request #196 from HackRU/dev
Browse files Browse the repository at this point in the history
Update page.tsx
  • Loading branch information
avsomers25 authored Oct 2, 2024
2 parents a205d1a + 37374af commit 4b8651e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,17 @@ export default function Dashboard() {
const data = new FormData();
data.set('file', waiverFile);
const requiredFields = ["first_name","last_name","resume","github","major","short_answer","shirt_size","hackathon_count","dietary_restrictions","special_needs","age","school","grad_year","gender","level_of_study","country_of_residence","ethnicity","how_you_heard_about_hackru","reasons","phone_number"]
const fieldtext = ["First Name", "Last Name", "Resume", "Github", "major", "What are you hoping to experience at HackRU?", "Shirt Size", "Hackathon Count", "Dietary Restrictions", "Anything we should account for?",
'age', "schhool", "Graduation Year", "Gender", "Level of Study", "Country of Residence", "Ethnicity", "How you heard about hackru", "reasons for attending", "phone number"
]
for (let i = 0; i < requiredFields.length; i++) {
if (!userData[requiredFields[i]]){
if(requiredFields[i] == "resume" && resumeExists){
}
else{
console.log("THIS FIELD IS FAIL" + requiredFields[i])
trigger(requiredFields[i] as any, { shouldFocus: true });
alert("Please scroll down and fill out the entire profile before registering");
alert(`Please scroll down and fill out ${fieldtext[i]} the entire profile before registering`);
return;
}
}
Expand Down

0 comments on commit 4b8651e

Please sign in to comment.