(Feat-Fix): Lots of fixes done, reporting system fixed, stricter types
This commit is contained in:
@@ -3,7 +3,7 @@ export interface User {
|
||||
username: string;
|
||||
name: string;
|
||||
email: string;
|
||||
role: 'SuperAdmin' | 'Supervisor' | 'Contractor' | 'Employee';
|
||||
role: "SuperAdmin" | "Supervisor" | "Contractor" | "Employee";
|
||||
department_id?: number;
|
||||
contractor_id?: number;
|
||||
is_active: boolean;
|
||||
@@ -13,13 +13,11 @@ export interface User {
|
||||
sub_department_id?: number;
|
||||
sub_department_name?: string;
|
||||
primary_activity?: string;
|
||||
// Common fields for Employee and Contractor
|
||||
phone_number?: string;
|
||||
aadhar_number?: string;
|
||||
bank_account_number?: string;
|
||||
bank_name?: string;
|
||||
bank_ifsc?: string;
|
||||
// Contractor-specific fields
|
||||
contractor_agreement_number?: string;
|
||||
pf_number?: string;
|
||||
esic_number?: string;
|
||||
@@ -45,7 +43,7 @@ export interface Activity {
|
||||
id: number;
|
||||
sub_department_id: number;
|
||||
name: string;
|
||||
unit_of_measurement: 'Per Bag' | 'Fixed Rate-Per Person';
|
||||
unit_of_measurement: "Per Bag" | "Fixed Rate-Per Person";
|
||||
created_at: string;
|
||||
sub_department_name?: string;
|
||||
department_id?: number;
|
||||
@@ -60,7 +58,7 @@ export interface WorkAllocation {
|
||||
sub_department_id?: number;
|
||||
description?: string;
|
||||
assigned_date: string;
|
||||
status: 'Pending' | 'InProgress' | 'Completed' | 'Cancelled';
|
||||
status: "Pending" | "InProgress" | "Completed" | "Cancelled";
|
||||
completion_date?: string;
|
||||
rate?: number;
|
||||
created_at: string;
|
||||
@@ -73,7 +71,12 @@ export interface WorkAllocation {
|
||||
department_name?: string;
|
||||
}
|
||||
|
||||
export type AttendanceStatus = 'CheckedIn' | 'CheckedOut' | 'Absent' | 'HalfDay' | 'Late';
|
||||
export type AttendanceStatus =
|
||||
| "CheckedIn"
|
||||
| "CheckedOut"
|
||||
| "Absent"
|
||||
| "HalfDay"
|
||||
| "Late";
|
||||
|
||||
export interface Attendance {
|
||||
id: number;
|
||||
@@ -93,8 +96,8 @@ export interface Attendance {
|
||||
contractor_name?: string;
|
||||
}
|
||||
|
||||
export type SwapReason = 'LeftWork' | 'Sick' | 'FinishedEarly' | 'Other';
|
||||
export type SwapStatus = 'Active' | 'Completed' | 'Cancelled';
|
||||
export type SwapReason = "LeftWork" | "Sick" | "FinishedEarly" | "Other";
|
||||
export type SwapStatus = "Active" | "Completed" | "Cancelled";
|
||||
|
||||
export interface EmployeeSwap {
|
||||
id: number;
|
||||
|
||||
Reference in New Issue
Block a user