feat: search customer now cover more field
This commit is contained in:
parent
9f8914e5c3
commit
3cbc157028
2 changed files with 3 additions and 0 deletions
|
|
@ -195,6 +195,7 @@ export class CustomerBranchController extends Controller {
|
|||
) {
|
||||
const where = {
|
||||
OR: queryOrNot<Prisma.CustomerBranchWhereInput[]>(query, [
|
||||
{ customerName: { contains: query } },
|
||||
{ registerName: { contains: query } },
|
||||
{ registerNameEN: { contains: query } },
|
||||
{ email: { contains: query } },
|
||||
|
|
|
|||
|
|
@ -168,6 +168,8 @@ export class CustomerController extends Controller {
|
|||
OR: queryOrNot<Prisma.CustomerWhereInput[]>(query, [
|
||||
{ branch: { some: { namePrefix: { contains: query } } } },
|
||||
{ branch: { some: { customerName: { contains: query } } } },
|
||||
{ branch: { some: { registerName: { contains: query } } } },
|
||||
{ branch: { some: { registerNameEN: { contains: query } } } },
|
||||
{ branch: { some: { firstName: { contains: query } } } },
|
||||
{ branch: { some: { firstNameEN: { contains: query } } } },
|
||||
{ branch: { some: { lastName: { contains: query } } } },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue