Skip to content

Commit 28e0b38

Browse files
authored
Merge pull request #83 from imcaizheng/remove-skillMatched-property
remove skillMatched property
2 parents 4062f60 + b2c30f8 commit 28e0b38

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

docs/swagger.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,9 +2112,6 @@ components:
21122112
type: array
21132113
items:
21142114
$ref: '#/components/schemas/Skill'
2115-
skillMatched:
2116-
type: integer
2117-
description: The percentage of skill matched for that particular job he/she is assinged
21182115
jobId:
21192116
type: string
21202117
format: uuid
@@ -2262,9 +2259,6 @@ components:
22622259
type: array
22632260
items:
22642261
$ref: '#/components/schemas/Skill'
2265-
skillMatched:
2266-
type: integer
2267-
description: The percentage of skill matched for that particular job he/she is assinged
22682262
Error:
22692263
required:
22702264
- message

src/services/TeamService.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -216,22 +216,6 @@ async function getTeam (currentUser, id) {
216216
}
217217
}
218218

219-
// add resources skills for result
220-
if (teamDetail && teamDetail.resources) {
221-
for (const user of teamDetail.resources) {
222-
user.skillMatched = 0
223-
if (user.skills && user.skills.length > 0) {
224-
for (const jobSkill of jobSkills) {
225-
if (_.find(user.skills, userSkill => {
226-
return userSkill.id === jobSkill.id
227-
})) {
228-
user.skillMatched += 1
229-
}
230-
}
231-
}
232-
}
233-
}
234-
235219
return teamDetail
236220
}
237221

@@ -266,8 +250,6 @@ async function getTeamJob (currentUser, id, jobId) {
266250
)
267251
}
268252

269-
const jobSkills = job.skills
270-
271253
if (job && job.candidates && job.candidates.length > 0) {
272254
const usersPromises = []
273255
_.map(job.candidates, (candidate) => { usersPromises.push(helper.getUserById(candidate.userId, true)) })
@@ -293,17 +275,6 @@ async function getTeamJob (currentUser, id, jobId) {
293275
if (findMember && findMember.photoURL) {
294276
item.photo_url = findMember.photoURL
295277
}
296-
297-
item.skillMatched = 0
298-
if (item.skills && item.skills.length > 0) {
299-
for (const jobSkillId of jobSkills) {
300-
if (_.find(item.skills, userSkill => {
301-
return userSkill.id === jobSkillId
302-
})) {
303-
item.skillMatched += 1
304-
}
305-
}
306-
}
307278
}
308279
}
309280

0 commit comments

Comments
 (0)