Skip to content

Commit 003fdc4

Browse files
authored
Merge pull request #544 from yoution/issue-543
fix: issue #543
2 parents 7b95462 + 2f3cea5 commit 003fdc4

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

data/demo-data.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
2020
],
2121
"status": "in-review",
22-
"isApplicationPageActive": false,
22+
"isApplicationPageActive": true,
2323
"minSalary": 100,
2424
"maxSalary": 200,
2525
"hoursPerWeek": 20,
@@ -51,7 +51,7 @@
5151
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
5252
],
5353
"status": "in-review",
54-
"isApplicationPageActive": false,
54+
"isApplicationPageActive": true,
5555
"minSalary": 100,
5656
"maxSalary": 200,
5757
"hoursPerWeek": 80,
@@ -83,7 +83,7 @@
8383
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
8484
],
8585
"status": "in-review",
86-
"isApplicationPageActive": false,
86+
"isApplicationPageActive": true,
8787
"minSalary": 100,
8888
"maxSalary": 200,
8989
"hoursPerWeek": 90,
@@ -115,7 +115,7 @@
115115
"a2b4bc11-c641-4a19-9eb7-33980378f82e"
116116
],
117117
"status": "in-review",
118-
"isApplicationPageActive": false,
118+
"isApplicationPageActive": true,
119119
"minSalary": 100,
120120
"maxSalary": 200,
121121
"hoursPerWeek": 20,
@@ -148,7 +148,7 @@
148148
"0b104b7c-0792-4118-8bc7-a274e9ee19e3"
149149
],
150150
"status": "closed",
151-
"isApplicationPageActive": false,
151+
"isApplicationPageActive": true,
152152
"minSalary": null,
153153
"maxSalary": null,
154154
"hoursPerWeek": null,

docs/swagger.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ paths:
118118
schema:
119119
type: integer
120120
description: The project id.
121+
- in: query
122+
name: isApplicationPageActive
123+
required: false
124+
schema:
125+
type: boolean
126+
description: Is application page active.
121127
- in: query
122128
name: projectIds
123129
required: false

src/services/JobService.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ async function searchJobs (currentUser, criteria, options = { returnAll: false }
453453
}
454454

455455
_.each(_.pick(criteria, [
456+
'isApplicationPageActive',
456457
'projectId',
457458
'externalId',
458459
'description',
@@ -532,6 +533,7 @@ async function searchJobs (currentUser, criteria, options = { returnAll: false }
532533
logger.info({ component: 'JobService', context: 'searchJobs', message: 'fallback to DB query' })
533534
const filter = { [Op.and]: [] }
534535
_.each(_.pick(criteria, [
536+
'isApplicationPageActive',
535537
'projectId',
536538
'externalId',
537539
'startDate',
@@ -595,6 +597,7 @@ searchJobs.schema = Joi.object().keys({
595597
sortOrder: Joi.string().valid('desc', 'asc'),
596598
projectId: Joi.number().integer(),
597599
externalId: Joi.string(),
600+
isApplicationPageActive: Joi.boolean(),
598601
description: Joi.string(),
599602
title: Joi.title(),
600603
startDate: Joi.date(),

0 commit comments

Comments
 (0)