feat: add order field

This commit is contained in:
Methapon2001 2024-06-24 13:14:44 +07:00
parent aa8dcdaf86
commit 0bd2c1ecf2
11 changed files with 79 additions and 26 deletions

View file

@ -395,6 +395,7 @@ export class EmployeeController extends Controller {
},
data: {
...rest,
statusOrder: +(rest.status === "INACTIVE"),
code: `${customerBranch.customer.code}-${customerBranch.branchNo.toString().padStart(2, "0")}-${new Date().getFullYear().toString().slice(-2).padStart(2, "0")}${last.value.toString().padStart(4, "0")}`,
employeeWork: {
createMany: {
@ -562,6 +563,7 @@ export class EmployeeController extends Controller {
},
data: {
...rest,
statusOrder: +(rest.status === "INACTIVE"),
code,
customerBranch: { connect: customerBranchId ? { id: customerBranchId } : undefined },
employeeWork: employeeWork