deactivates the pupil signup for selected chapters#98
Draft
deactivates the pupil signup for selected chapters#98
Conversation
❌ Deploy Preview for sbs-austria failed.
|
for more information, see https://pre-commit.ci
janosh
reviewed
Mar 24, 2023
| @@ -7,6 +7,7 @@ export type Chapter = { | |||
| } | |||
| baseId: string | |||
| acceptsSignups: boolean | |||
Contributor
There was a problem hiding this comment.
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) | |||
Contributor
There was a problem hiding this comment.
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
Member
Author
|
Ok, I corrected these issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.