-
Notifications
You must be signed in to change notification settings - Fork 2
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
Membership #1153
base: main
Are you sure you want to change the base?
Membership #1153
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Some small nits + we need tests before we can merge this
} | ||
|
||
|
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.
Remove extra newlines
"dev": "pnpm -rc -F @dotkomonline/web -F @dotkomonline/dashboard -F @dotkomonline/rpc -F @dotkomonline/invoicification -F @dotkomonline/rif exec doppler run --preserve-env pnpm run dev", | ||
"migrate": "pnpm -rc -F @dotkomonline/migrator exec doppler run --preserve-env pnpm run migrate", | ||
"migrate-down": "pnpm -rc -F @dotkomonline/migrator exec doppler run --preserve-env pnpm run migrate -- down", | ||
"migrate-down-all": "pnpm -rc -F @dotkomonline/migrator exec doppler run --preserve-env pnpm run migrate", | ||
"migrate-with-fixtures": "pnpm -rc -F @dotkomonline/migrator exec doppler run --preserve-env pnpm run migrate latest --with-fixtures", | ||
"migrate-with-sample-data": "pnpm -rc -F @dotkomonline/migrator exec doppler run --preserve-env pnpm run migrate -- latest --sample-data", | ||
"dev": "pnpm -rc -F @dotkomonline/web -F @dotkomonline/dashboard -F @dotkomonline/rpc -F @dotkomonline/invoicification -F @dotkomonline/rif exec doppler run --preserve-env -- pnpm run dev", | ||
"migrate": "pnpm -rc -F @dotkomonline/migrator exec doppler run -- pnpm run migrate", | ||
"migrate-down": "pnpm -rc -F @dotkomonline/migrator exec doppler run -- pnpm run migrate -- down", | ||
"migrate-down-all": "pnpm -rc -F @dotkomonline/migrator exec doppler run -- pnpm run migrate", | ||
"migrate-with-fixtures": "pnpm -rc -F @dotkomonline/migrator exec doppler run -- pnpm run migrate latest --with-fixtures", | ||
"migrate-with-sample-data": "pnpm -rc -F @dotkomonline/migrator exec doppler run -- pnpm run migrate -- latest --sample-data", |
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.
Needs rebase
@@ -11,6 +11,7 @@ export interface UserRepository { | |||
searchForUser(query: string, limit: number, page: number): Promise<User[]> | |||
create(data: UserWrite, password: string): Promise<User> | |||
registerId(auth0Id: string): Promise<void> | |||
getByIdWithFeideAccessToken(id: UserId): Promise<{ user: User | null; accessToken: string | null }> |
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.
getWithFeideAccessTokenById?
Maybe a better name?
courseGradeIndications[course.code] = { grade: course.year, credits: courseCredits } | ||
} | ||
|
||
console.log("Course year indications:", courseGradeIndications) |
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.
console.log
export type Membership = z.infer<typeof MembershipSchema> | ||
export type MembershipType = Membership["type"] | ||
|
||
export function membershipValid(membership: Membership) { |
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.
export function membershipValid(membership: Membership) { | |
export function isMembershipValid(membership: Membership) { |
return membershipGrade(membership) !== null || membership.type === "KNIGHT" | ||
} | ||
|
||
export function membershipGrade(membership: Membership): number | null { |
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.
export function membershipGrade(membership: Membership): number | null { | |
export function getMembershipGrade(membership: Membership): number | null { |
TODO: