sr-npm 1.7.567 → 1.7.569
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/data.js +1 -3
- package/package.json +1 -1
- package/pages/careersPage.js +7 -6
package/backend/data.js
CHANGED
|
@@ -19,7 +19,6 @@ function getBrand(customField) {
|
|
|
19
19
|
async function getSiteConfig() {
|
|
20
20
|
const queryresult = await wixData.query(COLLECTIONS.SITE_CONFIGS).find();
|
|
21
21
|
siteconfig = queryresult.items[0];
|
|
22
|
-
console.log("siteconfig: ", siteconfig);
|
|
23
22
|
}
|
|
24
23
|
function validatePosition(position) {
|
|
25
24
|
if (!position.id) {
|
|
@@ -120,9 +119,8 @@ async function saveJobsDataToCMS() {
|
|
|
120
119
|
return basicJob;
|
|
121
120
|
});
|
|
122
121
|
if(siteconfig===undefined) {
|
|
123
|
-
|
|
122
|
+
await getSiteConfig();
|
|
124
123
|
}
|
|
125
|
-
console.log("siteconfig is @#!#!@!@$##!@: ", siteconfig);
|
|
126
124
|
if (siteconfig.customFields==="true") {
|
|
127
125
|
await populateCustomFieldsCollection(customFieldsLabels);
|
|
128
126
|
await populateCustomValuesCollection(customFieldsValues);
|
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -27,8 +27,8 @@ const {
|
|
|
27
27
|
|
|
28
28
|
async function careersPageOnReady(_$w,thisObject,queryParams) {
|
|
29
29
|
if(siteconfig===undefined) {
|
|
30
|
-
|
|
31
|
-
siteconfig =
|
|
30
|
+
const queryResult = await wixData.query(COLLECTIONS.SITE_CONFIGS).find();
|
|
31
|
+
siteconfig = queryResult.items[0];
|
|
32
32
|
}
|
|
33
33
|
console.log("queryParams: ", queryParams);
|
|
34
34
|
const { page, keyWord, department, location,jobType,brand } = queryParams;
|
|
@@ -101,8 +101,11 @@ async function handleUrlParams(_$w) {
|
|
|
101
101
|
if (queryKeyWordVar) {
|
|
102
102
|
await handleKeyWordParam(_$w,queryKeyWordVar);
|
|
103
103
|
}
|
|
104
|
+
if (queryBrandVar && _$w('#dropdownBrand').isVisible) { //if it is not visible, ignore it
|
|
105
|
+
await handleBrandParam(_$w,queryBrandVar);
|
|
106
|
+
}
|
|
104
107
|
|
|
105
|
-
if (siteconfig.onlyBrandKeywordUrlParams==="
|
|
108
|
+
if (siteconfig.onlyBrandKeywordUrlParams==="false") { // it is something else that is not TWG
|
|
106
109
|
if (queryPageVar) {
|
|
107
110
|
await handlePageParam(_$w);
|
|
108
111
|
}
|
|
@@ -115,9 +118,7 @@ async function handleUrlParams(_$w) {
|
|
|
115
118
|
if (queryJobTypeVar) {
|
|
116
119
|
await handleJobTypeParam(_$w,queryJobTypeVar);
|
|
117
120
|
}
|
|
118
|
-
|
|
119
|
-
await handleBrandParam(_$w,queryBrandVar);
|
|
120
|
-
}
|
|
121
|
+
|
|
121
122
|
}
|
|
122
123
|
await applyFilters(_$w, true); // Skip URL update since we're handling initial URL params
|
|
123
124
|
}
|