(Feat-Fix): Lots of fixes done, reporting system fixed, stricter types
This commit is contained in:
31
src/types.ts
31
src/types.ts
@@ -4,7 +4,7 @@ export interface Employee {
|
||||
dept: string;
|
||||
sub: string;
|
||||
activity: string;
|
||||
status: 'Present' | 'Absent';
|
||||
status: "Present" | "Absent";
|
||||
in: string;
|
||||
out: string;
|
||||
remark: string;
|
||||
@@ -56,3 +56,32 @@ export interface ChartData {
|
||||
color?: string;
|
||||
fill?: string;
|
||||
}
|
||||
|
||||
export type AttendanceStatus = "CheckedIn" | "CheckedOut" | "Absent" | "HalfDay" | "Late";
|
||||
|
||||
export type SwapStatus = "Active" | "Completed" | "Cancelled";
|
||||
|
||||
export type SwapReason = "LeftWork" | "Sick" | "FinishedEarly" | "Other";
|
||||
|
||||
export interface EmployeeSwap {
|
||||
id: number;
|
||||
employee_id: number;
|
||||
employee_name?: string;
|
||||
original_department_id: number;
|
||||
original_department_name?: string;
|
||||
original_contractor_id?: number;
|
||||
original_contractor_name?: string;
|
||||
target_department_id: number;
|
||||
target_department_name?: string;
|
||||
target_contractor_id?: number;
|
||||
target_contractor_name?: string;
|
||||
swap_reason: SwapReason;
|
||||
reason_details?: string;
|
||||
work_completion_percentage: number;
|
||||
swap_date: string;
|
||||
swapped_by_id: number;
|
||||
swapped_by_name?: string;
|
||||
status: SwapStatus;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user