Skip to content

Update membership system#2774

Merged
brage-andreas merged 1 commit intomainfrom
update-membership-system
Feb 27, 2026
Merged

Update membership system#2774
brage-andreas merged 1 commit intomainfrom
update-membership-system

Conversation

@brage-andreas
Copy link
Copy Markdown
Member

@brage-andreas brage-andreas commented Jan 23, 2026

Main changes:

  • All BACHELOR_STUDY and MASTER_STUDY memberships now last exactly one semester
  • Memberships are now semester-based instead of year-based
    • Logic has moved from date based to integer based
  • The grade calculation is stored inside the membership
    • This makes it easier to adjust
  • my chungus life

image.png

image.png

Copy link
Copy Markdown
Member Author

brage-andreas commented Jan 23, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@brage-andreas brage-andreas changed the title wip: update membership system Update membership system Jan 23, 2026
@brage-andreas brage-andreas marked this pull request as ready for review January 23, 2026 17:19
@brage-andreas brage-andreas marked this pull request as draft January 23, 2026 17:22
@brage-andreas brage-andreas force-pushed the update-membership-system branch 7 times, most recently from 474ae6b to a969991 Compare January 28, 2026 14:13
@brage-andreas brage-andreas force-pushed the update-membership-system branch from a969991 to 606076b Compare February 4, 2026 11:11
@brage-andreas brage-andreas force-pushed the update-membership-system branch 3 times, most recently from 3675919 to 9ea6210 Compare February 13, 2026 12:02
@brage-andreas brage-andreas force-pushed the update-membership-system branch 2 times, most recently from 2a012ce to 8eae0e1 Compare February 18, 2026 15:18
@brage-andreas brage-andreas marked this pull request as ready for review February 18, 2026 15:21
@brage-andreas brage-andreas force-pushed the update-membership-system branch 9 times, most recently from 4163a6a to 52e242f Compare February 19, 2026 12:34
Copy link
Copy Markdown
Member

@junlarsen junlarsen left a comment

Choose a reason for hiding this comment

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

Hard to say much about the logic but I think it makes sense?

Found a list of nits/code changes I would like though

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can just delete these scripts? There is no OW4 API anymore or anything like that. That honestly goes for most if not all import scripts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think so too

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Feel free to delete this file then

Comment on lines +123 to +129
export function getStudyGrade(semester: number): number
export function getStudyGrade(semester: null | undefined): null
export function getStudyGrade(semester: number | null | undefined): number | null
export function getStudyGrade(semester: number | null | undefined): number | null {
if (!semester) {
return null
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why should we ever accept that semester is null or undefined here? It should be the callers responsibility.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think it's nice for a helper to allow inputs to be nullish. Regardless, I think it will help with avoiding cases like const grade = membership?.semester ? getStudyGrade(membership.semester) : null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I heavily disagree that it should be the responsibility of the function to do this ¯_(ツ)_/¯

@brage-andreas brage-andreas force-pushed the update-membership-system branch 3 times, most recently from e1c0ed1 to f590541 Compare February 23, 2026 08:09
Copy link
Copy Markdown
Member Author

Afaik this is finished

@brage-andreas brage-andreas force-pushed the update-membership-system branch 9 times, most recently from 7c27ad7 to 0497d1b Compare February 26, 2026 17:44
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Feel free to delete this file then

import { ActionIcon, Stack } from "@mantine/core"
import { IconX } from "@tabler/icons-react"

export function createDateInput<F extends FieldValues>({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lol did we not have a DateInput before? Only DateTime?

Comment on lines +5 to +6
const JANUARY = 0
const AUGUST = 7
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

God bless javascript 🙃

@brage-andreas brage-andreas force-pushed the update-membership-system branch from 0497d1b to e58be75 Compare February 27, 2026 11:37
Copy link
Copy Markdown
Member Author

brage-andreas commented Feb 27, 2026

Merge activity

  • Feb 27, 11:47 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 27, 11:48 AM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 27, 11:49 AM UTC: @brage-andreas merged this pull request with Graphite.

@brage-andreas brage-andreas force-pushed the update-membership-system branch from e58be75 to 1814774 Compare February 27, 2026 11:47
@brage-andreas brage-andreas merged commit 8518567 into main Feb 27, 2026
2 checks passed
@brage-andreas brage-andreas deleted the update-membership-system branch February 27, 2026 11:49
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.

2 participants