From e2bdcb4bd85ab23ec9259e7f717bc2ceafd2b47d Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 21 Oct 2024 13:29:27 +0700 Subject: [PATCH] feat: search now cover workName --- src/controllers/05-quotation-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 2b41111..02d16e8 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -183,7 +183,7 @@ export class QuotationController extends Controller { @Query() query = "", ) { const where = { - OR: [{ code: { contains: query, mode: "insensitive" } }], + OR: [{ code: { contains: query, mode: "insensitive" } }, { workName: { contains: query } }], payCondition, registeredBranch: isSystem(req.user) ? undefined : { OR: permissionCond(req.user) }, } satisfies Prisma.QuotationWhereInput;