-
Notifications
You must be signed in to change notification settings - Fork 2
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
Threshold and Invalid Input Fix #550
Conversation
Deploy preview for irvinehacks-site-2025 ready!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome start Bo!
Can you also add frontend form validation for submitting a review score and also frontend form and backend validation for setting the thresholds?
Note for your reference: we will be moving the setting thresholds form to the director's dashboard, so since this PR is small, can you also remove HackerThresholdInputs
from HackerApplicants
? We will add HackerThresholdInputs
to the director's dashboard in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, make sure to add form validation in HackerThresholdsInput
for valid threshold values: 0 to 10 and make sure that the accept
threshold value must be greater than or equal to the waitlist
threshold value .
Note: when the input field is empty, the value of -1 is sent to /api/admin/set-thresholds
for when the accept or waitlist threshold value should stay the same.
Actually forget what I said about moving HackerThresholdsInput
to the director's page in another PR. I've decided to keep it here on the same page, but make it only visible for directors. There is an authorization roles check called isDirector
that can check to see if the user is a director.
apps/site/src/app/admin/applicants/hackers/HackerApplicants.tsx
Outdated
Show resolved
Hide resolved
apps/site/src/app/admin/applicants/hackers/HackerApplicants.tsx
Outdated
Show resolved
Hide resolved
apps/site/src/app/admin/applicants/components/HackerThresholdInputs.tsx
Outdated
Show resolved
Hide resolved
apps/site/src/app/admin/applicants/hackers/HackerApplicants.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done! A few more nitpicks
apps/site/src/app/admin/applicants/components/HackerThresholdInputs.tsx
Outdated
Show resolved
Hide resolved
apps/site/src/app/admin/applicants/components/HackerThresholdInputs.tsx
Outdated
Show resolved
Hide resolved
apps/site/src/app/admin/applicants/components/HackerThresholdInputs.tsx
Outdated
Show resolved
Hide resolved
apps/site/src/app/admin/applicants/components/HackerThresholdInputs.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work Bo!
Closes #536 and #531