sr-npm 1.7.917 → 1.7.918
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/backend/consts.js +12 -14
- package/package.json +1 -1
- package/pages/positionPage.js +23 -17
package/backend/consts.js
CHANGED
|
@@ -90,28 +90,26 @@ const supportTeamsPageIds={
|
|
|
90
90
|
MOST_RECENT_JOBS_TITLE: "#mostRecentJobsTitle",
|
|
91
91
|
valueToValueIdMap: {
|
|
92
92
|
"Human Resouces":"PeopleSupport",
|
|
93
|
-
"Buying":"Merchandise",
|
|
94
|
-
"
|
|
95
|
-
"Planning":"Merchandise",
|
|
93
|
+
"Merchandise - Buying":"Merchandise",
|
|
94
|
+
"Technology, Data and Digital":"InformationServices",
|
|
95
|
+
"Merchandise - Planning":"Merchandise",
|
|
96
96
|
"Digital":"ecommerceandDigital",// this field doesnt exists in the database
|
|
97
|
-
"Marketing":"Marketing",
|
|
98
|
-
"Finance":"Finance",// this field doesnt exists in the database
|
|
97
|
+
"Marketing and Market Media":"Marketing",
|
|
98
|
+
"Finance, Property and Legal":"Finance",// this field doesnt exists in the database
|
|
99
99
|
"Services":"ServicesInstallation",
|
|
100
|
-
"Design":"Merchandise",
|
|
101
|
-
"
|
|
100
|
+
"Merchandise - Design and Sourcing":"Merchandise",
|
|
101
|
+
"Store Operations":"Operations",// this field doesnt exists in the database
|
|
102
102
|
"Data":"InsightsandDataScience",// this field doesnt exists in the database
|
|
103
103
|
"Property":"Property",// this field doesnt exists in the database,
|
|
104
104
|
"Legal":"Legal",// this field doesnt exists in the database,
|
|
105
|
-
"Supply Chain":"Logistics",
|
|
106
|
-
"Contact
|
|
105
|
+
"Supply Chain and Logistics":"Logistics",
|
|
106
|
+
"Contact Centres":"CustomerEngagementCentres",// this field doesnt exists in the database
|
|
107
107
|
"Commercial":"CommercialSales",// this field doesnt exists in the database
|
|
108
108
|
},
|
|
109
109
|
excludeValues: new Set([
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"Planning",
|
|
114
|
-
"Digital",
|
|
110
|
+
"Noel Leeming Commercial",
|
|
111
|
+
"Noel Leeming Services",
|
|
112
|
+
"Sustainability"
|
|
115
113
|
])
|
|
116
114
|
}
|
|
117
115
|
const LINKS={
|
package/package.json
CHANGED
package/pages/positionPage.js
CHANGED
|
@@ -10,7 +10,7 @@ const {
|
|
|
10
10
|
} = require('../public/utils');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
let siteconfig;
|
|
14
14
|
|
|
15
15
|
async function positionPageOnReady(_$w) {
|
|
16
16
|
|
|
@@ -32,11 +32,24 @@ async function getCategoryValueId(customValues) {
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
async function bind(_$w) {
|
|
35
|
+
siteconfig=await wixData.query(COLLECTIONS.SITE_CONFIGS).find().then(result => result.items[0]);
|
|
35
36
|
_$w('#datasetJobsItem').onReady(async () => {
|
|
36
37
|
|
|
37
38
|
const item = await _$w('#datasetJobsItem').getCurrentItem();
|
|
39
|
+
if(siteconfig.customFields==="true"){
|
|
38
40
|
const multiRefField=await getPositionWithMultiRefField(item._id);
|
|
39
41
|
const categoryValueId=await getCategoryValueId(multiRefField);
|
|
42
|
+
const relatedJobs=await getRelatedJobs(categoryValueId,item._id,5);
|
|
43
|
+
if(_$w('#relatedJobsRepNoDepartment')) // when there is no department, we filter based on category
|
|
44
|
+
{
|
|
45
|
+
const relatedJobs=await getRelatedJobs(categoryValueId,item._id,5);
|
|
46
|
+
_$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
|
|
47
|
+
$item('#relatedJobTitle').text = itemData.title;
|
|
48
|
+
$item('#relatedJobLocation').text = itemData.location.fullLocation;
|
|
49
|
+
});
|
|
50
|
+
_$w('#relatedJobsRepNoDepartment').data = relatedJobs;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
40
53
|
handleReferFriendButton(_$w,item);
|
|
41
54
|
handleApplyButton(_$w,item);
|
|
42
55
|
|
|
@@ -49,25 +62,18 @@ async function getCategoryValueId(customValues) {
|
|
|
49
62
|
{
|
|
50
63
|
_$w('#additionalInfoText').text = htmlToText(item.jobDescription.additionalInformation.text);
|
|
51
64
|
}
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
const relatedJobs=await getRelatedJobs(categoryValueId,item._id,5);
|
|
55
|
-
_$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
|
|
56
|
-
$item('#relatedJobTitle').text = itemData.title;
|
|
57
|
-
$item('#relatedJobLocation').text = itemData.location.fullLocation;
|
|
58
|
-
});
|
|
59
|
-
_$w('#relatedJobsRepNoDepartment').data = relatedJobs;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
65
|
+
|
|
63
66
|
});
|
|
67
|
+
if(isElementExistOnPage(_$w('#relatedJobsNoDepartmentItem')))
|
|
68
|
+
{
|
|
64
69
|
_$w('#relatedJobsNoDepartmentItem').onClick((event) => {
|
|
65
70
|
const data = _$w("#relatedJobsRepNoDepartment").data;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
const clickedItemData = data.find(
|
|
72
|
+
(item) => item._id === event.context.itemId,
|
|
73
|
+
);
|
|
74
|
+
location.to(clickedItemData["link-jobs-title"]);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
71
77
|
if(isElementExistOnPage(_$w('#relatedJobsDataset')))
|
|
72
78
|
{
|
|
73
79
|
_$w('#relatedJobsDataset').onReady(() => {
|