Refactor employee management

This commit is contained in:
Frudrax Cheng
2026-05-28 10:05:56 +08:00
parent 8b930ff44d
commit b9bc8f5419
11 changed files with 285 additions and 1051 deletions
+15 -3
View File
@@ -1,25 +1,35 @@
export type UserRole = 'admin' | 'technician' | 'employee' | 'user';
export type UserRole = 'admin' | 'technician' | 'employee';
export interface User {
id: number;
username: string;
name: string;
email?: string;
phone?: string;
employeeNo?: string;
position?: string;
role: UserRole;
createdAt: string;
employeeSerials?: EmployeeSerial[];
}
export interface CreateUserRequest {
username: string;
password: string;
username?: string;
password?: string;
name: string;
email?: string;
phone: string;
employeeNo: string;
position: string;
role: UserRole;
}
export interface UpdateUserRequest {
name?: string;
email?: string;
phone?: string;
employeeNo?: string;
position?: string;
role?: UserRole;
}
@@ -135,10 +145,12 @@ export interface CompanyFilter {
}
export interface EmployeeSerial {
id?: number;
serialNumber: string;
companyName: string;
position: string;
employeeName: string;
employeeId?: number;
isActive: boolean;
createdAt: string;
updatedAt?: string;