diff --git a/data/demo-data.json b/data/demo-data.json index 0e67b097..dddaaf13 100644 --- a/data/demo-data.json +++ b/data/demo-data.json @@ -19,7 +19,7 @@ "a2b4bc11-c641-4a19-9eb7-33980378f82e" ], "status": "in-review", - "isApplicationPageActive": false, + "isApplicationPageActive": true, "minSalary": 100, "maxSalary": 200, "hoursPerWeek": 20, @@ -51,7 +51,7 @@ "a2b4bc11-c641-4a19-9eb7-33980378f82e" ], "status": "in-review", - "isApplicationPageActive": false, + "isApplicationPageActive": true, "minSalary": 100, "maxSalary": 200, "hoursPerWeek": 80, @@ -83,7 +83,7 @@ "a2b4bc11-c641-4a19-9eb7-33980378f82e" ], "status": "in-review", - "isApplicationPageActive": false, + "isApplicationPageActive": true, "minSalary": 100, "maxSalary": 200, "hoursPerWeek": 90, @@ -115,7 +115,7 @@ "a2b4bc11-c641-4a19-9eb7-33980378f82e" ], "status": "in-review", - "isApplicationPageActive": false, + "isApplicationPageActive": true, "minSalary": 100, "maxSalary": 200, "hoursPerWeek": 20, @@ -148,7 +148,7 @@ "0b104b7c-0792-4118-8bc7-a274e9ee19e3" ], "status": "closed", - "isApplicationPageActive": false, + "isApplicationPageActive": true, "minSalary": null, "maxSalary": null, "hoursPerWeek": null, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index dced7a41..a3dc43e4 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -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 diff --git a/src/services/JobService.js b/src/services/JobService.js index 8057c478..265c1de9 100644 --- a/src/services/JobService.js +++ b/src/services/JobService.js @@ -453,6 +453,7 @@ async function searchJobs (currentUser, criteria, options = { returnAll: false } } _.each(_.pick(criteria, [ + 'isApplicationPageActive', 'projectId', 'externalId', 'description', @@ -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', @@ -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(),