20 lines
641 B
TypeScript
20 lines
641 B
TypeScript
export interface User {
|
|
first_name: string;
|
|
last_name: string;
|
|
email: string;
|
|
role: UserRole;
|
|
user_module_access: UserModuleAccess;
|
|
}
|
|
|
|
export type UserRole = 'ADMIN' | 'SUPERVISOR' | 'HR' | 'ACCOUNTING' | 'EMPLOYEE' | 'DEALER' | 'CUSTOMER' | 'GUEST';
|
|
|
|
export const ModuleNames = {
|
|
DASHBOARD: 'dashboard',
|
|
EMPLOYEE_LIST: 'employee_list',
|
|
EMPLOYEE_MANAGEMENT: 'employee_management',
|
|
PERSONAL_PROFILE: 'personal_profile',
|
|
TIMESHEETS: 'timesheets',
|
|
TIMESHEETS_APPROVAL: 'timesheets_approval',
|
|
} as const;
|
|
|
|
export type UserModuleAccess = typeof ModuleNames[keyof typeof ModuleNames]; |