35 lines
939 B
TypeScript
35 lines
939 B
TypeScript
import { Moment } from "moment-timezone";
|
|
import { Course } from "@/data/course";
|
|
import { Identifiable } from "@/data/common";
|
|
import { InternshipProgramEntry, InternshipType } from "@/data/internship";
|
|
import { ReportSchema } from "@/data/report";
|
|
|
|
export type Edition = {
|
|
course: Course;
|
|
startDate: Moment;
|
|
endDate: Moment;
|
|
proposalDeadline: Moment;
|
|
reportingStart: Moment,
|
|
reportingEnd: Moment,
|
|
minimumInternshipHours: number;
|
|
maximumInternshipHours?: number;
|
|
program: InternshipProgramEntry[];
|
|
types: InternshipType[];
|
|
schema: ReportSchema;
|
|
} & Identifiable
|
|
|
|
export type Deadlines = {
|
|
personalData?: Moment;
|
|
proposal?: Moment;
|
|
personalPlan?: Moment;
|
|
report?: Moment;
|
|
insurance?: Moment;
|
|
}
|
|
|
|
export function getEditionDeadlines(edition: Edition): Deadlines {
|
|
return {
|
|
proposal: edition.proposalDeadline,
|
|
personalPlan: edition.proposalDeadline,
|
|
}
|
|
}
|