fix: array length not match

This commit is contained in:
Methapon Metanipat 2024-10-07 16:17:31 +07:00
parent 9a67e3a6e9
commit 9612e71a88

View file

@ -256,7 +256,10 @@ export class QuotationController extends Controller {
.map((v) => v.workId || [])
.filter((v, i, a) => a.findIndex((c) => c === v) === i)
.flat(),
service: body.productServiceList.map((v) => v.serviceId || []).flat(),
service: body.productServiceList
.map((v) => v.serviceId || [])
.filter((v, i, a) => a.findIndex((c) => c === v) === i)
.flat(),
};
const [customerBranch, employee, product, work, service] = await prisma.$transaction(