-
Notifications
You must be signed in to change notification settings - Fork 3
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
deactivates the pupil signup for selected chapters #98
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for sbs-austria failed.
|
for more information, see https://pre-commit.ci
@@ -7,6 +7,7 @@ export type Chapter = { | |||
} | |||
baseId: string | |||
acceptsSignups: boolean |
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.
This is maybe not the most future-proof interface for managing signup state of chapters.
How about we use acceptsSignups: Record<'students' | 'pupils', boolean> = {students: true, pupils: false}
?
@@ -10,6 +10,7 @@ import raw_form from '../../signup-form/de/pupil.yml' | |||
export const load: PageServerLoad = async () => { | |||
let chapters = await fetch_chapters() | |||
chapters = chapters.filter((chap) => chap.acceptsSignups) |
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 there a particular reason why you don't combine these filters?
let chapters = await fetch_chapters()
chapters = chapters.filter((chap) => chap.acceptsSignups && !chap.deactivatePupils)
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…ation and for the signup forms
for more information, see https://pre-commit.ci
Ok, I corrected these issues. |
Some chapters want to deactivate the signup button
Still to do is a feedback for the user when they try to select the chapter in the signup form, that the waiting list for this chapter is full.