You've already forked isop-mirror
refactor: update frontend types according to new backend models
This commit is contained in:
@@ -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}'`);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user