refactor: update frontend types according to new backend models

This commit is contained in:
2025-11-06 15:56:27 +01:00
parent 7d386fadfd
commit 4443a9b3a1
2 changed files with 2 additions and 6 deletions

View File

@@ -1,9 +1,6 @@
import { Role } from "./role";
import type { User } from "./user";
export interface InternshipStatusData {
internship_id: number;
user_id: string;
status: InternshipStatus;
changed: string;
note: string;
@@ -36,6 +33,6 @@ export function prettyInternshipStatus(status: InternshipStatus) {
case InternshipStatus.NOT_DEFENDED:
return "Neobhájené";
default:
throw new Error("Unknown status");
throw new Error(`Unknown internship status: '${status}'`);
}
}

View File

@@ -4,8 +4,7 @@ import type { User } from "./user";
export interface Internship {
id: number;
user_id?: string;
user?: User;
student: User;
company: CompanyData;
start: string;
end: string;