-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add semester auto select to interest page #5165
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
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.
Looks mostly good! 😄 Nicely done
value: Number(currentCompanySemester?.id) ?? 9999, | ||
year: currentCompanySemester?.year ?? 9999, |
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.
💀 why not just the current year?
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.
If currentCompanySemester
is undefined
(which it really shouldn't since the default option is the current semester), the input should default to "Vis alle semestre"
. Looking at the old implementation, the value defaulted to ''
, but year
is now a number
. Would Number(currentCompanySemester?.year)
be better?
T, | ||
Option extends { label: string; value: T }, |
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.
is this used?
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.
It's maybe not the best solution, but it fixes typescript errors when value
is not a number
(the most common case afaik). I assume value: any
would not be better?
Description
Makes the selected semester under company interest the current semester by default.
Result
Screencast.From.2024-11-06.21-14-27.mp4
Testing
Resolves ABA-1048