-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* comment filter * replace a tag with span when there is no marketing url
- Loading branch information
1 parent
7a8d28f
commit 1454f96
Showing
2 changed files
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,28 +61,27 @@ const getUsersSkills = async () => { | |
}); | ||
|
||
const usersSkillsReq = await axios.get(`${crmUrl}/ssw_userskills`); | ||
const usersSkills = usersSkillsReq.data.value | ||
.map((us) => { | ||
const skill = skills.find((s) => s.ssw_skillid === us._ssw_skillid_value); | ||
const marketingPage = | ||
skill?.[ | ||
'_ssw_marketingpage_value@OData.Community.Display.V1.FormattedValue' | ||
] ?? ''; | ||
|
||
const userSkill = { | ||
userId: us._ssw_systemuserid_value, | ||
experienceLevel: getExperienceLevel(us.ssw_level), | ||
sortOrder: us.ssw_sortorder || null, | ||
technology: skill?.ssw_name ?? '', | ||
marketingPage, | ||
marketingPageUrl: consultingPages[marketingPage], | ||
published: | ||
skill?.['[email protected]'] ?? '', | ||
}; | ||
|
||
return userSkill; | ||
}) | ||
.filter((us) => us.published === 'Published'); | ||
const usersSkills = usersSkillsReq.data.value.map((us) => { | ||
const skill = skills.find((s) => s.ssw_skillid === us._ssw_skillid_value); | ||
const marketingPage = | ||
skill?.[ | ||
'_ssw_marketingpage_value@OData.Community.Display.V1.FormattedValue' | ||
] ?? ''; | ||
|
||
const userSkill = { | ||
userId: us._ssw_systemuserid_value, | ||
experienceLevel: getExperienceLevel(us.ssw_level), | ||
sortOrder: us.ssw_sortorder || null, | ||
technology: skill?.ssw_name ?? '', | ||
marketingPage, | ||
marketingPageUrl: consultingPages[marketingPage], | ||
published: | ||
skill?.['[email protected]'] ?? '', | ||
}; | ||
|
||
return userSkill; | ||
}); | ||
// .filter((us) => us.published === 'Published'); | ||
|
||
return usersSkills; | ||
}; | ||
|