sr-npm 1.7.663 → 1.7.664
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 -1
- package/package.json +1 -1
- package/pages/careersMultiBoxesPage.js +12 -9
package/backend/data.js
CHANGED
|
@@ -11,7 +11,7 @@ const { retrieveSecretVal, getTokenFromCMS } = require('./secretsData');
|
|
|
11
11
|
let customValuesToJobs = {}
|
|
12
12
|
let locationToJobs = {}
|
|
13
13
|
let siteconfig;
|
|
14
|
-
const EXCLUDED_CUSTOM_FIELDS = new Set(["Department"]);
|
|
14
|
+
const EXCLUDED_CUSTOM_FIELDS = new Set(["Department","COUNTRY"]);
|
|
15
15
|
|
|
16
16
|
function getBrand(customField) {
|
|
17
17
|
return customField.find(field => field.fieldLabel === 'Brands')?.valueLabel;
|
package/package.json
CHANGED
|
@@ -237,20 +237,23 @@ async function loadJobs(_$w) {
|
|
|
237
237
|
let tempFilteredJobs=[];
|
|
238
238
|
let finalFilteredJobs=alljobs;
|
|
239
239
|
let addedJobsIds=[]
|
|
240
|
-
if(filterByField!="Location") {
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
else{
|
|
244
|
-
|
|
245
|
-
}
|
|
240
|
+
// if(filterByField!="Location") {
|
|
241
|
+
// filterByField=JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES;
|
|
242
|
+
// }
|
|
243
|
+
// else{
|
|
244
|
+
// filterByField=JOBS_COLLECTION_FIELDS.CITY_TEXT;
|
|
245
|
+
// }
|
|
246
|
+
console.log("filterByField: ",filterByField)
|
|
246
247
|
|
|
247
248
|
console.log("selectedByField: ",selectedByField)
|
|
248
249
|
// AND across categories, OR within each category
|
|
249
|
-
for (const [, values] of selectedByField.entries()) {
|
|
250
|
+
for (const [key, values] of selectedByField.entries()) {
|
|
251
|
+
console.log("key: ",key)
|
|
252
|
+
console.log("values: ",values)
|
|
250
253
|
for(job of finalFilteredJobs) {
|
|
251
|
-
if(
|
|
254
|
+
if(key==="Location"){
|
|
252
255
|
//if it is location then we check if selecred values (which is an array) have job city text
|
|
253
|
-
if(values.includes(job[
|
|
256
|
+
if(values.includes(job[JOBS_COLLECTION_FIELDS.CITY_TEXT])) {
|
|
254
257
|
if(!addedJobsIds.includes(job._id)) {
|
|
255
258
|
tempFilteredJobs.push(job);
|
|
256
259
|
addedJobsIds.push(job._id);
|