sr-npm 1.7.928 → 1.7.929
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 +15 -10
- package/backend/data.js +12 -6
- package/package.json +1 -1
- package/pages/careersPage.js +5 -0
- package/pages/homePage.js +0 -3
- package/pages/supportTeamsPage.js +6 -1
package/backend/consts.js
CHANGED
|
@@ -91,22 +91,27 @@ const supportTeamsPageIds={
|
|
|
91
91
|
MOST_RECENT_JOBS_TITLE: "#mostRecentJobsTitle",
|
|
92
92
|
valueToValueIdMap: {
|
|
93
93
|
"Human Resouces":"PeopleSupport",
|
|
94
|
-
"Buying":"Merchandise",
|
|
95
|
-
"
|
|
96
|
-
"Planning":"Merchandise",
|
|
94
|
+
"Merchandise - Buying":"Merchandise",
|
|
95
|
+
"Technology, Data and Digital":"InformationServices",
|
|
96
|
+
"Merchandise - Planning":"Merchandise",
|
|
97
97
|
"Digital":"ecommerceandDigital",// this field doesnt exists in the database
|
|
98
|
-
"Marketing":"Marketing",
|
|
99
|
-
"Finance":"Finance",// this field doesnt exists in the database
|
|
98
|
+
"Marketing and Market Media":"Marketing",
|
|
99
|
+
"Finance, Property and Legal":"Finance",// this field doesnt exists in the database
|
|
100
100
|
"Services":"ServicesInstallation",
|
|
101
|
-
"Design":"Merchandise",
|
|
102
|
-
"
|
|
101
|
+
"Merchandise - Design and Sourcing":"Merchandise",
|
|
102
|
+
"Store Operations":"Operations",// this field doesnt exists in the database
|
|
103
103
|
"Data":"InsightsandDataScience",// this field doesnt exists in the database
|
|
104
104
|
"Property":"Property",// this field doesnt exists in the database,
|
|
105
105
|
"Legal":"Legal",// this field doesnt exists in the database,
|
|
106
|
-
"Supply Chain":"Logistics",
|
|
107
|
-
"Contact
|
|
106
|
+
"Supply Chain and Logistics":"Logistics",
|
|
107
|
+
"Contact Centres":"CustomerEngagementCentres",// this field doesnt exists in the database
|
|
108
108
|
"Commercial":"CommercialSales",// this field doesnt exists in the database
|
|
109
|
-
}
|
|
109
|
+
},
|
|
110
|
+
excludeValues: new Set([
|
|
111
|
+
"Noel Leeming Commercial",
|
|
112
|
+
"Noel Leeming Services",
|
|
113
|
+
"Sustainability"
|
|
114
|
+
])
|
|
110
115
|
}
|
|
111
116
|
const LINKS={
|
|
112
117
|
myApplication:'https://www.smartrecruiters.com/app/employee-portal/68246e5512d84f4c00a19e62/job-applications',
|
package/backend/data.js
CHANGED
|
@@ -111,7 +111,9 @@ async function saveJobsDataToCMS() {
|
|
|
111
111
|
const customFieldsValues = {}
|
|
112
112
|
|
|
113
113
|
const {companyId,templateType} = await getApiKeys();
|
|
114
|
-
|
|
114
|
+
if(siteconfig===undefined) {
|
|
115
|
+
await getSiteConfig();
|
|
116
|
+
}
|
|
115
117
|
// bulk insert to jobs collection without descriptions first
|
|
116
118
|
const jobsData = sourcePositions.map(position => {
|
|
117
119
|
|
|
@@ -135,7 +137,7 @@ async function saveJobsDataToCMS() {
|
|
|
135
137
|
country: position.location?.country || '',
|
|
136
138
|
remote: position.location?.remote || false,
|
|
137
139
|
language: position.language?.label || '',
|
|
138
|
-
brand: getBrand(position.customField),
|
|
140
|
+
brand: siteconfig.disableMultiBrand==="false" ? getBrand(position.customField) : '',
|
|
139
141
|
jobDescription: null, // Will be filled later
|
|
140
142
|
employmentType: position.typeOfEmployment.label,
|
|
141
143
|
releasedDate: position.releasedDate
|
|
@@ -149,9 +151,7 @@ async function saveJobsDataToCMS() {
|
|
|
149
151
|
}
|
|
150
152
|
return basicJob;
|
|
151
153
|
});
|
|
152
|
-
|
|
153
|
-
await getSiteConfig();
|
|
154
|
-
}
|
|
154
|
+
|
|
155
155
|
if (siteconfig.customFields==="true") {
|
|
156
156
|
await populateCustomFieldsCollection(customFieldsLabels,templateType);
|
|
157
157
|
await populateCustomValuesCollection(customFieldsValues);
|
|
@@ -468,9 +468,15 @@ async function aggregateJobs() {
|
|
|
468
468
|
|
|
469
469
|
async function referenceJobs() {
|
|
470
470
|
console.log("Reference jobs");
|
|
471
|
+
if(siteconfig===undefined) {
|
|
472
|
+
await getSiteConfig();
|
|
473
|
+
}
|
|
471
474
|
await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.DEPARTMENT_REF, sourceCollection: COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT, jobField: JOBS_COLLECTION_FIELDS.DEPARTMENT });
|
|
472
475
|
await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.CITY, sourceCollection: COLLECTIONS.CITIES, jobField: JOBS_COLLECTION_FIELDS.CITY_TEXT });
|
|
473
|
-
|
|
476
|
+
if(siteconfig.disableMultiBrand==="false"){
|
|
477
|
+
await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.BRAND_REF, sourceCollection: COLLECTIONS.BRANDS, jobField: JOBS_COLLECTION_FIELDS.BRAND });
|
|
478
|
+
}
|
|
479
|
+
|
|
474
480
|
console.log("finished referencing jobs");
|
|
475
481
|
}
|
|
476
482
|
|
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -507,11 +507,16 @@ async function updateMapMarkers(_$w){
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
async function handleBrandDropdown(_$w){
|
|
510
|
+
if(siteconfig.disableMultiBrand==="false"){
|
|
510
511
|
const brands=await wixData.query(COLLECTIONS.BRANDS).find();
|
|
511
512
|
if(brands.items.length>1){
|
|
512
513
|
console.log("showing brand dropdown");
|
|
513
514
|
_$w('#dropdownBrand').show();
|
|
514
515
|
}
|
|
516
|
+
}
|
|
517
|
+
else{
|
|
518
|
+
_$w('#dropdownBrand').hide();
|
|
519
|
+
}
|
|
515
520
|
}
|
|
516
521
|
module.exports = {
|
|
517
522
|
careersPageOnReady,
|
package/pages/homePage.js
CHANGED
|
@@ -18,13 +18,10 @@ async function homePageOnReady(_$w,thisObject=null) {
|
|
|
18
18
|
if(siteconfig.categorySearch==="true") {
|
|
19
19
|
const allJobs=await getAllRecords(COLLECTIONS.JOBS);
|
|
20
20
|
const allvaluesobjects=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
21
|
-
|
|
22
21
|
bindPrimarySearch(_$w,allvaluesobjects,allJobs);
|
|
23
22
|
loadPrimarySearchRepeater(_$w)
|
|
24
23
|
bindTeamRepeater(_$w)
|
|
25
24
|
bindViewAllButton(_$w)
|
|
26
|
-
|
|
27
|
-
|
|
28
25
|
}
|
|
29
26
|
else{
|
|
30
27
|
|
|
@@ -14,7 +14,12 @@ async function supportTeasmPageOnReady(_$w) {
|
|
|
14
14
|
async function handleRecentJobsSection(_$w) {
|
|
15
15
|
|
|
16
16
|
const currentItem= _$w(supportTeamsPageIds.TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
|
|
17
|
-
console.log("currentItem:
|
|
17
|
+
console.log("currentItem 2 3 4: ",currentItem);
|
|
18
|
+
if(supportTeamsPageIds.excludeValues.has(currentItem.title_fld)) {
|
|
19
|
+
console.log("Value is excluded , collapsing recently Jobs Section ");
|
|
20
|
+
await collapseSection(_$w);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
18
23
|
const valueId=supportTeamsPageIds.valueToValueIdMap[currentItem.title_fld]
|
|
19
24
|
console.log("valueId: ",valueId);
|
|
20
25
|
const Value=await getValueFromValueId(valueId);
|