sr-npm 1.7.530 → 1.7.531
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 +3 -1
- package/package.json +1 -1
- package/pages/careersPage.js +8 -4
package/backend/data.js
CHANGED
|
@@ -56,6 +56,7 @@ function addCustomFields(basicJob, position) {
|
|
|
56
56
|
const customFieldsArray = Array.isArray(position?.customField) ? position.customField : [];
|
|
57
57
|
const customFields = {};
|
|
58
58
|
for (const field of customFieldsArray) {
|
|
59
|
+
if(field.fieldLabel==="Country" || field.fieldLabel==="Department") continue; //country and department are not custom fields, they are already in the job object
|
|
59
60
|
const label = field.fieldLabel==="Brands" ? "brand" : field.fieldLabel
|
|
60
61
|
const key = normalizeString(label);
|
|
61
62
|
const value = field.valueLabel
|
|
@@ -352,6 +353,7 @@ async function aggregateJobs() {
|
|
|
352
353
|
aggregateJobsByFieldToCMS({ field: JOBS_COLLECTION_FIELDS.CITY_TEXT, collection: COLLECTIONS.CITIES }),
|
|
353
354
|
aggregateJobsByFieldToCMS({ field: JOBS_COLLECTION_FIELDS.BRAND, collection: COLLECTIONS.BRANDS })
|
|
354
355
|
]);
|
|
356
|
+
|
|
355
357
|
console.log("finished aggregating jobs");
|
|
356
358
|
}
|
|
357
359
|
|
|
@@ -374,7 +376,7 @@ async function syncJobsFast() {
|
|
|
374
376
|
// console.log("saving jobs descriptions and location apply url to CMS");
|
|
375
377
|
// await saveJobsDescriptionsAndLocationApplyUrlToCMS();
|
|
376
378
|
// console.log("saved jobs descriptions and location apply url to CMS successfully");
|
|
377
|
-
|
|
379
|
+
// await aggregateJobs();
|
|
378
380
|
// await referenceJobs();
|
|
379
381
|
// console.log("syncing jobs fast finished successfully");
|
|
380
382
|
}
|
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -376,6 +376,7 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
376
376
|
});
|
|
377
377
|
|
|
378
378
|
//applyCustomFieldFilters(filters);
|
|
379
|
+
console.log("dropdownFiltersMapping after applying filters: ", dropdownFiltersMapping);
|
|
379
380
|
|
|
380
381
|
const filter = await getFilter(filters, 'and');
|
|
381
382
|
await _$w('#jobsDataset').setFilter(filter);
|
|
@@ -426,13 +427,16 @@ async function updateCount(_$w) {
|
|
|
426
427
|
return count;
|
|
427
428
|
}
|
|
428
429
|
|
|
429
|
-
async function handleGivenURLParam(_$w,param,value) {
|
|
430
|
+
async function handleGivenURLParam(_$w,param,value,isCustomField=false) {
|
|
430
431
|
const paramValue = decodeURIComponent(value);
|
|
431
432
|
let dropdownOptions = _$w(DROPDOWN_IDS[param]).options;
|
|
432
433
|
console.log("dropdown options:", dropdownOptions);
|
|
433
|
-
|
|
434
|
-
if(
|
|
435
|
-
|
|
434
|
+
let optionsFromCMS;
|
|
435
|
+
if(!isCustomField){
|
|
436
|
+
optionsFromCMS=await wixData.query(DROPDOWN_COLLECTIONS[param]).find();
|
|
437
|
+
if(dropdownOptions.length!==optionsFromCMS.items.length+1){
|
|
438
|
+
fixDropdownOptions(DROPDOWN_IDS[param],optionsFromCMS, _$w);
|
|
439
|
+
}
|
|
436
440
|
}
|
|
437
441
|
const option=_$w(DROPDOWN_IDS[param]).options.find(option => option.value.toLowerCase() === paramValue.toLowerCase())
|
|
438
442
|
if(option){
|