Skip to content

Use simplified chapter settings#165

Open
kleinicke wants to merge 2 commits intomainfrom
dev/signup_button_settings
Open

Use simplified chapter settings#165
kleinicke wants to merge 2 commits intomainfrom
dev/signup_button_settings

Conversation

@kleinicke
Copy link
Member

Fixes #156
We can use a single single select button for selecting the status of the chapter on the website. Currently we have several boolean options to activate the signup buttons. But single select status allows to select the status of the chapter and also allows to disable signups for pupils or students individually.

The stati are:
active
starting
partner
acceptStudents
acceptPupils

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for sbsev ready!

Name Link
🔨 Latest commit be67710
🔍 Latest deploy log https://app.netlify.com/projects/sbsev/deploys/695a49fa30a55900085a253b
😎 Deploy Preview https://deploy-preview-165--sbsev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for sbs-austria ready!

Name Link
🔨 Latest commit c2f6b9c
🔍 Latest deploy log https://app.netlify.com/projects/sbs-austria/deploys/695a49f0efa66c00085d357f
😎 Deploy Preview https://deploy-preview-165--sbs-austria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for sbs-austria ready!

Name Link
🔨 Latest commit be67710
🔍 Latest deploy log https://app.netlify.com/projects/sbs-austria/deploys/695a49fae4c28b0008dedf15
😎 Deploy Preview https://deploy-preview-165--sbs-austria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

// Map status to CSS class for map markers
function getMapClass(status: ChapterStatus): string {
if (status === 'acceptStudents' || status === 'acceptPupils' || status === 'active') {
return 'active'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are also chapters who are starting but also accept signups right? Why dont we just do

return status

or remove this function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they already accept signups, they are kind of active I would say. Starting would only for new chapters where you don't have anyone yet checking the local email addresses and allowing no signups. Once you want to allow signups you could just move the status to active. In that case you will also need to check the local email addresses (or just create forwards to your email address).

const openChapters = $derived(Array.isArray(chapters) ? chapters.filter((ch) => ch.acceptsSignups) : [])
const startingChapters = $derived(Array.isArray(chapters) ? chapters.filter((ch) => ch.status == `starting`) : [])
const partnerChapters = $derived(Array.isArray(chapters) ? chapters.filter((ch) => ch.status == `partner`) : [])
const openChapters = $derived(Array.isArray(chapters) ? chapters.filter((ch) => showsSignupSection(ch.status)) : [])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: openChapters seems a bit misleading, maybe just use acceptsSignup? Is it a problem that openChapters and the other arrays are not disjoint?

}

// Unified status values combining chapter maturity and signup availability
export type ChapterStatus =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use something like:

export type ChapterStatus = 
  'starting'
  | 'active'
  | 'partner'

export SignupStatus =
  'all'
  | 'noStudents'
  | 'noPupils'
  | 'none'

for further flexibility. Or is this overkill?

</a>
{:else}
<button class="btn blue disabled" disabled>
<IconGraduation {style} />{$microcopy?.location?.studentWaitlistFull ?? 'Warteliste voll'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move the Warteliste voll to microcopy

- Bericht in Zeitung/Internet
- Auflistung in Ehrenamtsregister
- Kooperationsparter
- Coronaschool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these options removed? I think Philipp explicitly requested them

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really? He explicitly wanted to have local German organizations in the Werbemaßnamen list for Austria?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up options for contentful-chapter page

2 participants