Skip to content

remove skillMatched property #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
6 changes: 0 additions & 6 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2112,9 +2112,6 @@ components:
type: array
items:
$ref: '#/components/schemas/Skill'
skillMatched:
type: integer
description: The percentage of skill matched for that particular job he/she is assinged
jobId:
type: string
format: uuid
Expand Down Expand Up @@ -2262,9 +2259,6 @@ components:
type: array
items:
$ref: '#/components/schemas/Skill'
skillMatched:
type: integer
description: The percentage of skill matched for that particular job he/she is assinged
Error:
required:
- message
Expand Down
29 changes: 0 additions & 29 deletions src/services/TeamService.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,22 +216,6 @@ async function getTeam (currentUser, id) {
}
}

// add resources skills for result
if (teamDetail && teamDetail.resources) {
for (const user of teamDetail.resources) {
user.skillMatched = 0
if (user.skills && user.skills.length > 0) {
for (const jobSkill of jobSkills) {
if (_.find(user.skills, userSkill => {
return userSkill.id === jobSkill.id
})) {
user.skillMatched += 1
}
}
}
}
}

return teamDetail
}

Expand Down Expand Up @@ -266,8 +250,6 @@ async function getTeamJob (currentUser, id, jobId) {
)
}

const jobSkills = job.skills

if (job && job.candidates && job.candidates.length > 0) {
const usersPromises = []
_.map(job.candidates, (candidate) => { usersPromises.push(helper.getUserById(candidate.userId, true)) })
Expand All @@ -293,17 +275,6 @@ async function getTeamJob (currentUser, id, jobId) {
if (findMember && findMember.photoURL) {
item.photo_url = findMember.photoURL
}

item.skillMatched = 0
if (item.skills && item.skills.length > 0) {
for (const jobSkillId of jobSkills) {
if (_.find(item.skills, userSkill => {
return userSkill.id === jobSkillId
})) {
item.skillMatched += 1
}
}
}
}
}

Expand Down