fix: wrong data type

This commit is contained in:
Methapon2001 2024-06-07 13:54:02 +07:00
parent 2c134aa68a
commit 23f52b137d
4 changed files with 30 additions and 15 deletions

View file

@ -56,8 +56,8 @@ export type CustomerCreate = {
jobPositionEN: string;
jobDescription: string;
saleEmployee: string;
payDate: string;
wageDate: string;
payDate: Date;
wageDate: Date;
subDistrictId?: string | null;
districtId?: string | null;
@ -98,8 +98,8 @@ export type CustomerUpdate = {
jobPositionEN: string;
jobDescription: string;
saleEmployee: string;
payDate: string;
wageDate: string;
payDate: Date;
wageDate: Date;
subDistrictId?: string | null;
districtId?: string | null;
@ -281,7 +281,7 @@ export class CustomerController extends Controller {
data:
customerBranch?.map((v, i) => ({
...v,
branchNo: `${i + 1}`,
branchNo: i + 1,
createdBy: req.user.name,
updateBy: req.user.name,
})) || [],
@ -396,14 +396,14 @@ export class CustomerController extends Controller {
where: { id: v.id || "" },
create: {
...v,
branchNo: `${i + 1}`,
branchNo: i + 1,
createdBy: req.user.name,
updateBy: req.user.name,
id: undefined,
},
update: {
...v,
branchNo: `${i + 1}`,
branchNo: i + 1,
updateBy: req.user.name,
},
})),