feat: filter gender
This commit is contained in:
parent
c9d92c43f9
commit
0747fca92e
1 changed files with 5 additions and 4 deletions
|
|
@ -228,16 +228,17 @@ export class EmployeeController extends Controller {
|
|||
@Get()
|
||||
async list(
|
||||
@Query() zipCode?: string,
|
||||
@Query() gender?: string,
|
||||
@Query() query: string = "",
|
||||
@Query() page: number = 1,
|
||||
@Query() pageSize: number = 30,
|
||||
) {
|
||||
const where = {
|
||||
OR: [
|
||||
{ firstName: { contains: query }, zipCode },
|
||||
{ firstNameEN: { contains: query }, zipCode },
|
||||
{ lastName: { contains: query }, zipCode },
|
||||
{ lastNameEN: { contains: query }, zipCode },
|
||||
{ firstName: { contains: query }, zipCode, gender },
|
||||
{ firstNameEN: { contains: query }, zipCode, gender },
|
||||
{ lastName: { contains: query }, zipCode, gender },
|
||||
{ lastNameEN: { contains: query }, zipCode, gender },
|
||||
],
|
||||
} satisfies Prisma.EmployeeWhereInput;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue