Skip to content

Commit b187327

Browse files
committed
Role Skills Intake Tweaks and Bugs
1 parent 051608b commit b187327

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

src/routes/RoleRoutes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ module.exports = {
1313
},
1414
get: {
1515
controller: 'RoleController',
16-
method: 'searchRoles',
16+
method: 'searchRoles'
1717
}
1818
},
1919
'/taas-roles/:id': {
2020
get: {
2121
controller: 'RoleController',
22-
method: 'getRole',
22+
method: 'getRole'
2323
},
2424
patch: {
2525
controller: 'RoleController',

src/services/JobCandidateService.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ fullyUpdateJobCandidate.schema = Joi.object()
203203
.keys({
204204
jobId: Joi.string().uuid().required(),
205205
userId: Joi.string().uuid().required(),
206-
status: Joi.jobCandidateStatus().default("open"),
206+
status: Joi.jobCandidateStatus().default('open'),
207207
externalId: Joi.string().allow(null).default(null),
208-
resume: Joi.string().uri().allow("").allow(null).default(null),
208+
resume: Joi.string().uri().allow('').allow(null).default(null),
209209
remark: Joi.stringAllowEmpty().allow(null)
210210
})
211-
.required(),
211+
.required()
212212
})
213-
.required();
213+
.required()
214214

215215
/**
216216
* Delete jobCandidate by id

src/services/JobService.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,11 @@ partiallyUpdateJob.schema = Joi.object()
294294
jobLocation: Joi.stringAllowEmpty().allow(null),
295295
jobTimezone: Joi.stringAllowEmpty().allow(null),
296296
currency: Joi.stringAllowEmpty().allow(null),
297-
roleIds: Joi.array().items(Joi.string().uuid().required()).allow(null),
297+
roleIds: Joi.array().items(Joi.string().uuid().required()).allow(null)
298298
})
299-
.required(),
299+
.required()
300300
})
301-
.required();
301+
.required()
302302

303303
/**
304304
* Fully update job by id

src/services/TeamService.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ roleSearchRequest.schema = Joi.object()
789789
currentUser: Joi.object(),
790790
data: Joi.object().keys({
791791
roleId: Joi.string().uuid(),
792-
jobDescription: Joi.string().max(255),
792+
jobDescription: Joi.string().max(2000),
793793
skills: Joi.array().items(Joi.string().uuid().required()),
794794
jobTitle: Joi.string().max(100),
795795
previousRoleSearchRequestId: Joi.string().uuid()
@@ -864,6 +864,12 @@ async function getSkillsByJobDescription (data) {
864864
if (skill.pattern.test(word)) {
865865
foundSkills.push(skill.name)
866866
}
867+
// for suffix with 'js'
868+
if (!word.endsWith('js') && skill.name.endsWith('js')) {
869+
if (skill.pattern.test(word + 'js')) {
870+
foundSkills.push(skill.name)
871+
}
872+
}
867873
})
868874
})
869875
foundSkills = _.uniq(foundSkills)

0 commit comments

Comments
 (0)