feat(admin): add committee overview with interview capacity status an…#433
Open
akselmat wants to merge 5 commits into
Open
feat(admin): add committee overview with interview capacity status an…#433akselmat wants to merge 5 commits into
akselmat wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The type was never exported from types.ts, causing the build to fail after merging main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sside into committee-overview
jorgengaldal
requested changes
Apr 12, 2026
Collaborator
jorgengaldal
left a comment
There was a problem hiding this comment.
Gjerne ta en titt på kommentarene.
|
|
||
| export const fetchCommitteesByPeriod = async ( | ||
| context: QueryFunctionContext, | ||
| ) => { |
Collaborator
There was a problem hiding this comment.
legg til returtype på funksjonen
| const session = await getServerSession(req, res, authOptions); | ||
|
|
||
| if (!hasSession(res, session)) return; | ||
| if (!isAdmin(res, session)) return; |
Collaborator
There was a problem hiding this comment.
Tenker for API-strukturens del at det kanskje kunne vært bedre å ha på en fil api/committees/index.ts, slik at vi kan gruppere sammen ting basert på hva man henter ut, uten å måtte ha mange egne paths for hva man henter etter.
Comment on lines
+25
to
+42
| const getApplicantCommittees = (applicant: applicantType): string[] => { | ||
| const preferences = applicant.preferences; | ||
| const preferenceCommittees: string[] = | ||
| (preferences as preferencesType).first !== undefined | ||
| ? [ | ||
| (preferences as preferencesType).first, | ||
| (preferences as preferencesType).second, | ||
| (preferences as preferencesType).third, | ||
| ] | ||
| : (preferences as unknown as { committee: string }[]).map( | ||
| (preference) => preference.committee, | ||
| ); | ||
|
|
||
| return [ | ||
| ...preferenceCommittees.filter((committee) => committee), | ||
| ...(applicant.optionalCommittees ?? []), | ||
| ]; | ||
| }; |
Collaborator
There was a problem hiding this comment.
Suggested change
| const getApplicantCommittees = (applicant: applicantType): string[] => { | |
| const preferences = applicant.preferences; | |
| const preferenceCommittees: string[] = | |
| (preferences as preferencesType).first !== undefined | |
| ? [ | |
| (preferences as preferencesType).first, | |
| (preferences as preferencesType).second, | |
| (preferences as preferencesType).third, | |
| ] | |
| : (preferences as unknown as { committee: string }[]).map( | |
| (preference) => preference.committee, | |
| ); | |
| return [ | |
| ...preferenceCommittees.filter((committee) => committee), | |
| ...(applicant.optionalCommittees ?? []), | |
| ]; | |
| }; | |
| const getApplicantCommittees = (applicant: applicantType): string[] => { | |
| const preferences = applicant.preferences; | |
| const preferenceCommittees: string[] = [ | |
| preferences.first, | |
| preferences.second, | |
| preferences.third, | |
| ].filter((committee) => committee); | |
| return [...preferenceCommittees, ...(applicant.optionalCommittees ?? [])]; | |
| }; |
Collaborator
There was a problem hiding this comment.
Var det en spesiell grunn til at den var sånn dobbelt før?
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.
…d period API