From c4b6d08bd8be2c23bc0bb5da05196d42cb7fa5eb Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 10 Oct 2024 11:38:37 +0700 Subject: [PATCH] feat: also include customer and its registered branch --- src/controllers/05-quotation-controller.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 822177d..c45a8bc 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -202,7 +202,13 @@ export class QuotationController extends Controller { _count: { select: { worker: true }, }, - customerBranch: true, + customerBranch: { + include: { + customer: { + include: { registeredBranch: true }, + }, + }, + }, paySplit: true, }, take: pageSize,