50 lines
1.5 KiB
TypeScript
50 lines
1.5 KiB
TypeScript
import { Internship } from "@/data";
|
|
import {
|
|
ReceiveSubmissionApproveAction,
|
|
ReceiveSubmissionDeclineAction,
|
|
ReceiveSubmissionUpdateAction,
|
|
SaveSubmissionAction,
|
|
SendSubmissionAction
|
|
} from "@/state/actions/submission";
|
|
import { SubmissionState } from "@/api/dto/internship-registration";
|
|
import { Report } from "@/data/report";
|
|
|
|
export enum InternshipReportActions {
|
|
Send = "SEND_REPORT",
|
|
Save = "SAVE_REPORT",
|
|
Approve = "RECEIVE_REPORT_APPROVE",
|
|
Decline = "RECEIVE_REPORT_DECLINE",
|
|
Receive = "RECEIVE_REPORT_STATE",
|
|
Reset = "RESET_REPORT",
|
|
}
|
|
|
|
export interface SendReportAction extends SendSubmissionAction<InternshipReportActions.Send> {
|
|
}
|
|
|
|
export interface ResetReportAction extends SendSubmissionAction<InternshipReportActions.Reset> {
|
|
}
|
|
|
|
export interface ReceiveReportApproveAction extends ReceiveSubmissionApproveAction<InternshipReportActions.Approve> {
|
|
}
|
|
|
|
export interface ReceiveReportDeclineAction extends ReceiveSubmissionDeclineAction<InternshipReportActions.Decline> {
|
|
}
|
|
|
|
export interface ReceiveReportUpdateAction extends ReceiveSubmissionUpdateAction<InternshipReportActions.Receive> {
|
|
report: Report;
|
|
state: SubmissionState,
|
|
comment: string,
|
|
}
|
|
|
|
export interface SaveReportAction extends SaveSubmissionAction<InternshipReportActions.Save> {
|
|
report: Report;
|
|
}
|
|
|
|
export type InternshipReportAction
|
|
= SendReportAction
|
|
| SaveReportAction
|
|
| ResetReportAction
|
|
| ReceiveReportApproveAction
|
|
| ReceiveReportDeclineAction
|
|
| ReceiveReportUpdateAction;
|