-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat:add plan sharing * feat:add plan copying * fix: types * fix: fix scrollbars * fix: fix styling on share plan page * feat: add responsive share link dialog * fix: fix input props component error * fix: fix drawer styling * fix: maybe fix for olo * fix: umami can be undefined * feat: add link to helpform * feat: add api for courses * feat: inform about project deploy * fix: add padding to mobile ending quote * feat: add new darker background * feat: change design for plan view * fix: disable hover on mai nbutton --------- Co-authored-by: unewMe <[email protected]>
- Loading branch information
Showing
8 changed files
with
195 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { NextResponse } from "next/server"; | ||
|
||
import type { ApiResponse } from "@/lib/types"; | ||
import { createUsosService } from "@/lib/usos"; | ||
|
||
export const revalidate = 3600; | ||
|
||
export async function GET( | ||
_request: Request, | ||
{ params }: { params: { facultyId: string } }, | ||
) { | ||
const service = createUsosService(); | ||
|
||
return NextResponse.json( | ||
{ | ||
registrations: await Promise.all( | ||
(await service.getRegistrations(params.facultyId)).map(async (r) => ({ | ||
registration: r, | ||
courses: await Promise.all( | ||
r.related_courses.flatMap(async (c) => ({ | ||
course: await service.getCourse(c.course_id), | ||
groups: await service.getGroups(c.course_id, c.term_id), | ||
})), | ||
), | ||
})), | ||
), | ||
}, | ||
{ | ||
headers: { | ||
"Cache-Control": "public, max-age=3600", | ||
}, | ||
}, | ||
); | ||
} | ||
|
||
export type ApiProfileGet = ApiResponse<typeof GET>; |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
export type GetRegistrations = Registration[]; | ||
export interface Registration { | ||
id: string; | ||
description: Description; | ||
message: Description; | ||
type: Type; | ||
status: RegistrationStatus; | ||
is_linkage_required: boolean; | ||
www_instance: WWWInstance; | ||
related_courses: RelatedCourse[]; | ||
} | ||
|
||
export interface Description { | ||
pl: string; | ||
en: string; | ||
} | ||
|
||
export interface RelatedCourse { | ||
course_id: string; | ||
term_id: TermID; | ||
status: RelatedCourseStatus; | ||
limits: null; | ||
} | ||
|
||
export enum RelatedCourseStatus { | ||
RegisterAndUnregister = "register_and_unregister", | ||
} | ||
|
||
export enum TermID { | ||
The202425Z = "2024/25-Z", | ||
} | ||
|
||
export enum RegistrationStatus { | ||
Active = "active", | ||
Prepared = "prepared", | ||
} | ||
|
||
export enum Type { | ||
NotToken = "not_token", | ||
} | ||
|
||
export enum WWWInstance { | ||
PwrWWW = "PWR_WWW", | ||
} |
This file contains 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
This file contains 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