refactor: type employee

This commit is contained in:
Thanaphon Frappet 2024-12-02 17:46:48 +07:00
parent d0eaafb9d8
commit e76077ba08
2 changed files with 9 additions and 5 deletions

View file

@ -17,6 +17,9 @@ export type Employee = {
firstNameEN: string; firstNameEN: string;
lastName: string; lastName: string;
lastNameEN: string; lastNameEN: string;
middleName?: string;
middleNameEN?: string;
dateOfBirth: Date; dateOfBirth: Date;
gender: string; gender: string;
nationality: string; nationality: string;

View file

@ -2,6 +2,7 @@ import { CustomerType } from '../customer/types';
import { District, Province, SubDistrict } from '../address'; import { District, Province, SubDistrict } from '../address';
import { CreatedBy, Status, UpdatedBy } from '../types'; import { CreatedBy, Status, UpdatedBy } from '../types';
import { Invoice } from '../payment/types'; import { Invoice } from '../payment/types';
import { Employee } from '../employee/types';
export type PayCondition = export type PayCondition =
| 'Full' | 'Full'
@ -266,7 +267,7 @@ export type QuotationFull = {
id: string; id: string;
quotationId: string; quotationId: string;
employeeId: string; employeeId: string;
employee: EmployeeRelation; employee: Employee;
code: string; code: string;
no: number; no: number;
}[]; }[];
@ -355,7 +356,7 @@ export type QuotationPayload = {
customerBranchId: string; customerBranchId: string;
registeredBranchId: string; registeredBranchId: string;
urgent: boolean; urgent: boolean;
worker: EmployeeWorker[]; worker: Employee[];
workerMax: number | null; workerMax: number | null;
_count: { worker: number }; _count: { worker: number };
discount?: number; discount?: number;
@ -384,8 +385,8 @@ export type EmployeeWorker = {
documentExpireDate?: Date | undefined; documentExpireDate?: Date | undefined;
lastNameEN: string; lastNameEN: string;
lastName: string; lastName: string;
middleNameEN: string; middleNameEN?: string;
middleName: string; middleName?: string;
firstNameEN: string; firstNameEN: string;
firstName: string; firstName: string;
namePrefix: string; namePrefix: string;
@ -428,7 +429,7 @@ export type Details = {
contactTel: string; contactTel: string;
workName: string; workName: string;
dueDate: Date; dueDate: Date;
worker: EmployeeWorker[]; worker: Employee[];
}; };
export type PaymentPayload = { export type PaymentPayload = {