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"],
|
by: ["gender"],
|
||||||
where: {
|
where: {
|
||||||
OR: queryOrNot<Prisma.EmployeeWhereInput[]>(query, [
|
OR: queryOrNot<Prisma.EmployeeWhereInput[]>(query, [
|
||||||
|
{
|
||||||
|
employeePassport: {
|
||||||
|
some: { number: { contains: query } },
|
||||||
|
},
|
||||||
|
},
|
||||||
{ firstName: { contains: query } },
|
{ firstName: { contains: query } },
|
||||||
{ firstNameEN: { contains: query } },
|
{ firstNameEN: { contains: query } },
|
||||||
{ lastName: { contains: query } },
|
{ lastName: { contains: query } },
|
||||||
|
|
@ -204,6 +209,11 @@ export class EmployeeController extends Controller {
|
||||||
) {
|
) {
|
||||||
const where = {
|
const where = {
|
||||||
OR: queryOrNot<Prisma.EmployeeWhereInput[]>(query, [
|
OR: queryOrNot<Prisma.EmployeeWhereInput[]>(query, [
|
||||||
|
{
|
||||||
|
employeePassport: {
|
||||||
|
some: { number: { contains: query } },
|
||||||
|
},
|
||||||
|
},
|
||||||
{ firstName: { contains: query } },
|
{ firstName: { contains: query } },
|
||||||
{ firstNameEN: { contains: query } },
|
{ firstNameEN: { contains: query } },
|
||||||
{ lastName: { contains: query } },
|
{ lastName: { contains: query } },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue