sr-npm 1.7.944 → 1.7.946
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/pages/positionPage.js
CHANGED
|
@@ -35,8 +35,7 @@ async function getCategoryValueId(customValues) {
|
|
|
35
35
|
_$w('#datasetJobsItem').onReady(async () => {
|
|
36
36
|
|
|
37
37
|
const item = await _$w('#datasetJobsItem').getCurrentItem();
|
|
38
|
-
|
|
39
|
-
const categoryValueId=await getCategoryValueId(multiRefField);
|
|
38
|
+
|
|
40
39
|
handleReferFriendButton(_$w,item);
|
|
41
40
|
handleApplyButton(_$w,item);
|
|
42
41
|
|
|
@@ -49,8 +48,12 @@ async function getCategoryValueId(customValues) {
|
|
|
49
48
|
{
|
|
50
49
|
_$w('#additionalInfoText').text = htmlToText(item.jobDescription.additionalInformation.text);
|
|
51
50
|
}
|
|
52
|
-
if(_$w('#relatedJobsRepNoDepartment')) // when there is no department, we filter based on category
|
|
51
|
+
if(isElementExistOnPage(_$w('#relatedJobsRepNoDepartment'))) // when there is no department, we filter based on category
|
|
53
52
|
{
|
|
53
|
+
|
|
54
|
+
const multiRefField=await getPositionWithMultiRefField(item._id);
|
|
55
|
+
const categoryValueId=await getCategoryValueId(multiRefField);
|
|
56
|
+
|
|
54
57
|
const relatedJobs = await getRelatedJobs({ categoryValueId, itemId: item._id ,limit:5});
|
|
55
58
|
_$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
|
|
56
59
|
$item('#relatedJobTitle').text = itemData.title;
|
|
@@ -61,6 +64,7 @@ async function getCategoryValueId(customValues) {
|
|
|
61
64
|
|
|
62
65
|
}
|
|
63
66
|
});
|
|
67
|
+
if(isElementExistOnPage(_$w('#relatedJobsRepNoDepartment'))) {
|
|
64
68
|
_$w('#relatedJobsNoDepartmentItem').onClick((event) => {
|
|
65
69
|
const data = _$w("#relatedJobsRepNoDepartment").data;
|
|
66
70
|
const clickedItemData = data.find(
|
|
@@ -68,6 +72,7 @@ async function getCategoryValueId(customValues) {
|
|
|
68
72
|
);
|
|
69
73
|
location.to(clickedItemData["link-jobs-title"]);
|
|
70
74
|
});
|
|
75
|
+
}
|
|
71
76
|
if(isElementExistOnPage(_$w('#relatedJobsDataset')))
|
|
72
77
|
{
|
|
73
78
|
_$w('#relatedJobsDataset').onReady(() => {
|
|
@@ -30,12 +30,12 @@ async function handlePeopleSection(_$w) {
|
|
|
30
30
|
const allpeoplesrecord=await getAllRecordsWithoutMultiRef("OurPeople");
|
|
31
31
|
console.log("allpeoplesrecord: ",allpeoplesrecord);
|
|
32
32
|
console.log("currentItem inisde peolpe serion: ",currentItem);
|
|
33
|
-
const peopleToDisplay=allpeoplesrecord.filter(person=>person.supportTeamName===currentItem.
|
|
33
|
+
const peopleToDisplay=allpeoplesrecord.filter(person=>person.supportTeamName===currentItem._id);
|
|
34
34
|
console.log("peopleToDisplay: ",peopleToDisplay);
|
|
35
35
|
let itemObj = _$w("#peopleDataset").getCurrentItem();
|
|
36
36
|
console.log("itemObj: ",itemObj);
|
|
37
|
-
|
|
38
|
-
if(
|
|
37
|
+
|
|
38
|
+
if(peopleToDisplay.length === 0) {
|
|
39
39
|
console.log("No people found , collapsing people section ");
|
|
40
40
|
collapseSection(_$w,"people");
|
|
41
41
|
return;
|