Skip to content
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

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

kleinicke
Copy link
Member

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.

@netlify
Copy link

netlify bot commented Mar 24, 2023

Deploy Preview for sbs-austria failed.

Name Link
🔨 Latest commit ae997a3
🔍 Latest deploy log https://app.netlify.com/sites/sbs-austria/deploys/6483b9fa9ba679000879690c

@@ -7,6 +7,7 @@ export type Chapter = {
}
baseId: string
acceptsSignups: boolean
Copy link
Member

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)
Copy link
Contributor

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)

@kleinicke
Copy link
Member Author

Ok, I corrected these issues.
Do you like the idea to use the info from the Contentful chapter area on a page? Or would you solve it in another way without matching the corresponding chapter to a page?

@dominikgeissler dominikgeissler marked this pull request as draft September 26, 2023 10:07
@dominikgeissler dominikgeissler added the stale Stale/abandoned PRs and issues label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale/abandoned PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants