feat: search employee also cover passport no
This commit is contained in:
parent
670fa1bfac
commit
f78fd01313
1 changed files with 10 additions and 0 deletions
|
|
@ -161,6 +161,11 @@ export class EmployeeController extends Controller {
|
|||
by: ["gender"],
|
||||
where: {
|
||||
OR: queryOrNot<Prisma.EmployeeWhereInput[]>(query, [
|
||||
{
|
||||
employeePassport: {
|
||||
some: { number: { contains: query } },
|
||||
},
|
||||
},
|
||||
{ firstName: { contains: query } },
|
||||
{ firstNameEN: { contains: query } },
|
||||
{ lastName: { contains: query } },
|
||||
|
|
@ -204,6 +209,11 @@ export class EmployeeController extends Controller {
|
|||
) {
|
||||
const where = {
|
||||
OR: queryOrNot<Prisma.EmployeeWhereInput[]>(query, [
|
||||
{
|
||||
employeePassport: {
|
||||
some: { number: { contains: query } },
|
||||
},
|
||||
},
|
||||
{ firstName: { contains: query } },
|
||||
{ firstNameEN: { contains: query } },
|
||||
{ lastName: { contains: query } },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue