chore: clean up
This commit is contained in:
parent
da372dc6fd
commit
daebea490f
2 changed files with 1 additions and 4 deletions
|
|
@ -1246,7 +1246,6 @@ model QuotationWorker {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
no Int
|
no Int
|
||||||
code String
|
|
||||||
employee Employee @relation(fields: [employeeId], references: [id])
|
employee Employee @relation(fields: [employeeId], references: [id])
|
||||||
employeeId String
|
employeeId String
|
||||||
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
||||||
|
|
|
||||||
|
|
@ -503,12 +503,11 @@ export class QuotationController extends Controller {
|
||||||
...rest,
|
...rest,
|
||||||
...price,
|
...price,
|
||||||
statusOrder: +(rest.status === "INACTIVE"),
|
statusOrder: +(rest.status === "INACTIVE"),
|
||||||
code: `${currentYear.toString().padStart(2, "0")}${currentMonth.toString().padStart(2, "0")}${currentDate.toString().padStart(2, "0")}${lastQuotation.value.toString().padStart(4, "0")}`,
|
code: `QT${currentYear.toString().padStart(2, "0")}${currentMonth.toString().padStart(2, "0")}${currentDate.toString().padStart(2, "0")}${lastQuotation.value.toString().padStart(4, "0")}`,
|
||||||
worker: {
|
worker: {
|
||||||
createMany: {
|
createMany: {
|
||||||
data: sortedEmployeeId.map((v, i) => ({
|
data: sortedEmployeeId.map((v, i) => ({
|
||||||
no: i,
|
no: i,
|
||||||
code: "",
|
|
||||||
employeeId: v,
|
employeeId: v,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
|
|
@ -753,7 +752,6 @@ export class QuotationController extends Controller {
|
||||||
skipDuplicates: true,
|
skipDuplicates: true,
|
||||||
data: sortedEmployeeId.map((v, i) => ({
|
data: sortedEmployeeId.map((v, i) => ({
|
||||||
no: i,
|
no: i,
|
||||||
code: "",
|
|
||||||
employeeId: v,
|
employeeId: v,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue