(Feat): More changes
This commit is contained in:
@@ -14,6 +14,16 @@ export interface User {
|
||||
created_at: Date;
|
||||
department_name?: string;
|
||||
contractor_name?: string;
|
||||
// Common fields for Employee and Contractor
|
||||
phone_number?: string | null;
|
||||
aadhar_number?: string | null;
|
||||
bank_account_number?: string | null;
|
||||
bank_name?: string | null;
|
||||
bank_ifsc?: string | null;
|
||||
// Contractor-specific fields
|
||||
contractor_agreement_number?: string | null;
|
||||
pf_number?: string | null;
|
||||
esic_number?: string | null;
|
||||
}
|
||||
|
||||
export interface JWTPayload {
|
||||
@@ -66,7 +76,7 @@ export interface WorkAllocation {
|
||||
}
|
||||
|
||||
// Attendance types
|
||||
export type AttendanceStatus = "CheckedIn" | "CheckedOut" | "Absent";
|
||||
export type AttendanceStatus = "CheckedIn" | "CheckedOut" | "Absent" | "HalfDay" | "Late";
|
||||
|
||||
export interface Attendance {
|
||||
id: number;
|
||||
@@ -76,6 +86,7 @@ export interface Attendance {
|
||||
check_out_time: Date | null;
|
||||
work_date: Date;
|
||||
status: AttendanceStatus;
|
||||
remark?: string | null;
|
||||
created_at: Date;
|
||||
employee_name?: string;
|
||||
supervisor_name?: string;
|
||||
@@ -83,6 +94,49 @@ export interface Attendance {
|
||||
contractor_name?: string;
|
||||
}
|
||||
|
||||
// Employee swap types
|
||||
export type SwapReason = "LeftWork" | "Sick" | "FinishedEarly" | "Other";
|
||||
export type SwapStatus = "Active" | "Completed" | "Cancelled";
|
||||
|
||||
export interface EmployeeSwap {
|
||||
id: number;
|
||||
employee_id: number;
|
||||
original_department_id: number;
|
||||
target_department_id: number;
|
||||
original_contractor_id: number | null;
|
||||
target_contractor_id: number | null;
|
||||
swap_reason: SwapReason;
|
||||
reason_details: string | null;
|
||||
work_completion_percentage: number;
|
||||
swap_date: Date;
|
||||
swapped_by: number;
|
||||
status: SwapStatus;
|
||||
created_at: Date;
|
||||
completed_at: Date | null;
|
||||
// Joined fields
|
||||
employee_name?: string;
|
||||
original_department_name?: string;
|
||||
target_department_name?: string;
|
||||
original_contractor_name?: string;
|
||||
target_contractor_name?: string;
|
||||
swapped_by_name?: string;
|
||||
}
|
||||
|
||||
export interface CreateSwapRequest {
|
||||
employeeId: number;
|
||||
targetDepartmentId: number;
|
||||
targetContractorId?: number;
|
||||
swapReason: SwapReason;
|
||||
reasonDetails?: string;
|
||||
workCompletionPercentage?: number;
|
||||
swapDate: string;
|
||||
}
|
||||
|
||||
export interface UpdateAttendanceStatusRequest {
|
||||
status: AttendanceStatus;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
// Contractor rate types
|
||||
export interface ContractorRate {
|
||||
id: number;
|
||||
@@ -127,6 +181,16 @@ export interface CreateUserRequest {
|
||||
role: UserRole;
|
||||
departmentId?: number | null;
|
||||
contractorId?: number | null;
|
||||
// Common fields for Employee and Contractor
|
||||
phoneNumber?: string | null;
|
||||
aadharNumber?: string | null;
|
||||
bankAccountNumber?: string | null;
|
||||
bankName?: string | null;
|
||||
bankIfsc?: string | null;
|
||||
// Contractor-specific fields
|
||||
contractorAgreementNumber?: string | null;
|
||||
pfNumber?: string | null;
|
||||
esicNumber?: string | null;
|
||||
}
|
||||
|
||||
export interface UpdateUserRequest {
|
||||
@@ -136,6 +200,16 @@ export interface UpdateUserRequest {
|
||||
departmentId?: number | null;
|
||||
contractorId?: number | null;
|
||||
isActive?: boolean;
|
||||
// Common fields for Employee and Contractor
|
||||
phoneNumber?: string | null;
|
||||
aadharNumber?: string | null;
|
||||
bankAccountNumber?: string | null;
|
||||
bankName?: string | null;
|
||||
bankIfsc?: string | null;
|
||||
// Contractor-specific fields
|
||||
contractorAgreementNumber?: string | null;
|
||||
pfNumber?: string | null;
|
||||
esicNumber?: string | null;
|
||||
}
|
||||
|
||||
export interface ChangePasswordRequest {
|
||||
|
||||
Reference in New Issue
Block a user