Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions data/demo-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
],
"status": "in-review",
"isApplicationPageActive": false,
"isApplicationPageActive": true,
"minSalary": 100,
"maxSalary": 200,
"hoursPerWeek": 20,
Expand Down Expand Up @@ -51,7 +51,7 @@
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
],
"status": "in-review",
"isApplicationPageActive": false,
"isApplicationPageActive": true,
"minSalary": 100,
"maxSalary": 200,
"hoursPerWeek": 80,
Expand Down Expand Up @@ -83,7 +83,7 @@
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
],
"status": "in-review",
"isApplicationPageActive": false,
"isApplicationPageActive": true,
"minSalary": 100,
"maxSalary": 200,
"hoursPerWeek": 90,
Expand Down Expand Up @@ -115,7 +115,7 @@
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
],
"status": "in-review",
"isApplicationPageActive": false,
"isApplicationPageActive": true,
"minSalary": 100,
"maxSalary": 200,
"hoursPerWeek": 20,
Expand Down Expand Up @@ -148,7 +148,7 @@
"0b104b7c-0792-4118-8bc7-a274e9ee19e3"
],
"status": "closed",
"isApplicationPageActive": false,
"isApplicationPageActive": true,
"minSalary": null,
"maxSalary": null,
"hoursPerWeek": null,
Expand Down
6 changes: 6 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ paths:
schema:
type: integer
description: The project id.
- in: query
name: isApplicationPageActive
required: false
schema:
type: boolean
description: Is application page active.
- in: query
name: projectIds
required: false
Expand Down
3 changes: 3 additions & 0 deletions src/services/JobService.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ async function searchJobs (currentUser, criteria, options = { returnAll: false }
}

_.each(_.pick(criteria, [
'isApplicationPageActive',
'projectId',
'externalId',
'description',
Expand Down Expand Up @@ -532,6 +533,7 @@ async function searchJobs (currentUser, criteria, options = { returnAll: false }
logger.info({ component: 'JobService', context: 'searchJobs', message: 'fallback to DB query' })
const filter = { [Op.and]: [] }
_.each(_.pick(criteria, [
'isApplicationPageActive',
'projectId',
'externalId',
'startDate',
Expand Down Expand Up @@ -595,6 +597,7 @@ searchJobs.schema = Joi.object().keys({
sortOrder: Joi.string().valid('desc', 'asc'),
projectId: Joi.number().integer(),
externalId: Joi.string(),
isApplicationPageActive: Joi.boolean(),
description: Joi.string(),
title: Joi.title(),
startDate: Joi.date(),
Expand Down