From 4443a9b3a12fb6179dfdf4fb06bac66d6073c6eb Mon Sep 17 00:00:00 2001 From: br0kenpixel <23280129+br0kenpixel@users.noreply.github.com> Date: Thu, 6 Nov 2025 15:56:27 +0100 Subject: [PATCH] refactor: update frontend types according to new backend models --- frontend/app/types/internship_status.ts | 5 +---- frontend/app/types/internships.ts | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/app/types/internship_status.ts b/frontend/app/types/internship_status.ts index 6098439..33d027c 100644 --- a/frontend/app/types/internship_status.ts +++ b/frontend/app/types/internship_status.ts @@ -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}'`); } } \ No newline at end of file diff --git a/frontend/app/types/internships.ts b/frontend/app/types/internships.ts index 96e285a..5f9ce0f 100644 --- a/frontend/app/types/internships.ts +++ b/frontend/app/types/internships.ts @@ -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;