sr-npm 1.7.1302 → 1.7.1304
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.
|
@@ -46,6 +46,7 @@ const TWG_JOBS_COLLECTION_FIELDS={
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const CATEGORY_CUSTOM_FIELD_ID_IN_CMS='5cd8c873c9e77c0008aa7d23';
|
|
49
|
+
const COMPANY_SEGMENT_CUSTOM_FIELD_ID_IN_CMS='5cd8c7ebc9e77c00072d8bc7';
|
|
49
50
|
|
|
50
51
|
// used for filters - don't add anything else here
|
|
51
52
|
const fieldTitlesInCMS={
|
|
@@ -88,6 +89,7 @@ module.exports = {
|
|
|
88
89
|
FiltersIds,
|
|
89
90
|
fieldTitlesInCMS,
|
|
90
91
|
CATEGORY_CUSTOM_FIELD_ID_IN_CMS,
|
|
92
|
+
COMPANY_SEGMENT_CUSTOM_FIELD_ID_IN_CMS,
|
|
91
93
|
possibleUrlParams,
|
|
92
94
|
TWG_JOBS_COLLECTION_FIELDS,
|
|
93
95
|
PRIMARY_SEARCH_STATES,
|
package/package.json
CHANGED
package/pages/positionPage.js
CHANGED
|
@@ -5,13 +5,19 @@ const { TWG_JOBS_COLLECTION_FIELDS } = require('../backend/careersMultiBoxesPage
|
|
|
5
5
|
const { items: wixData } = require('@wix/data');
|
|
6
6
|
const { location } = require("@wix/site-location");
|
|
7
7
|
const{isElementExistOnPage} = require('psdev-utils');
|
|
8
|
+
const { COMPANY_SEGMENT_CUSTOM_FIELD_ID_IN_CMS } = require('../backend/careersMultiBoxesPageIds');
|
|
8
9
|
const {
|
|
9
10
|
appendQueryParams
|
|
10
11
|
} = require('../public/utils');
|
|
11
12
|
|
|
12
13
|
|
|
14
|
+
let siteconfig;
|
|
13
15
|
async function positionPageOnReady(_$w) {
|
|
16
|
+
if(siteconfig===undefined) {
|
|
17
|
+
siteconfig = await wixData.query(COLLECTIONS.SITE_CONFIGS).find().then(result => result.items[0]);
|
|
18
|
+
}
|
|
14
19
|
console.log("positionPageOnReady called");
|
|
20
|
+
|
|
15
21
|
await bind(_$w);
|
|
16
22
|
|
|
17
23
|
|
|
@@ -34,6 +40,22 @@ async function getCategoryValue(customValues) {
|
|
|
34
40
|
|
|
35
41
|
const item = await _$w('#datasetJobsItem').getCurrentItem();
|
|
36
42
|
console.log("item: ",item);
|
|
43
|
+
let multiRefField;
|
|
44
|
+
if(siteconfig.customFields==="true") {
|
|
45
|
+
multiRefField=await getPositionWithMultiRefField(item._id);
|
|
46
|
+
console.log("multiRefField: ",multiRefField);
|
|
47
|
+
|
|
48
|
+
const companysegmentValue=multiRefField.filter(field => field.customField===COMPANY_SEGMENT_CUSTOM_FIELD_ID_IN_CMS && field.title==="Store Support Office" );
|
|
49
|
+
console.log("companysegmentValue: ",companysegmentValue);
|
|
50
|
+
if(companysegmentValue===undefined) {
|
|
51
|
+
|
|
52
|
+
_$w("#notifyMe").hide()
|
|
53
|
+
console.log("companysegmentValue is Store Support Office, hiding notifyMe");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
37
59
|
|
|
38
60
|
handleReferFriendButton(_$w,item);
|
|
39
61
|
handleApplyButton(_$w,item);
|
|
@@ -49,9 +71,7 @@ async function getCategoryValue(customValues) {
|
|
|
49
71
|
if(isElementExistOnPage(_$w('#relatedJobsRepNoDepartment'))) // when there is no department, we filter based on category
|
|
50
72
|
{
|
|
51
73
|
|
|
52
|
-
const
|
|
53
|
-
const categoryValue=await getCategoryValue(multiRefField);
|
|
54
|
-
|
|
74
|
+
const categoryValue=await getCategoryValue(multiRefField);
|
|
55
75
|
if(isElementExistOnPage(_$w('#jobCategory'))) {
|
|
56
76
|
_$w('#jobCategory').text = categoryValue.title;
|
|
57
77
|
}
|