feat: search now cover workName

This commit is contained in:
Methapon Metanipat 2024-10-21 13:29:27 +07:00
parent a0f1765309
commit e2bdcb4bd8

View file

@ -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;