sr-npm 1.7.708 → 1.7.709
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/package.json
CHANGED
|
@@ -32,6 +32,7 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async function handleUrlParams(_$w,urlParams) {
|
|
35
|
+
let applyFiltering=false;
|
|
35
36
|
if(urlParams.brand) {
|
|
36
37
|
const brandValue = decodeURIComponent(urlParams.brand);
|
|
37
38
|
console.log("brandValue: ", brandValue);
|
|
@@ -49,13 +50,37 @@ async function handleUrlParams(_$w,urlParams) {
|
|
|
49
50
|
|
|
50
51
|
_$w(`#${FiltersIds[field.title]}CheckBox`).value = [option.value];
|
|
51
52
|
selectedByField.set(field._id, [option.value]);
|
|
52
|
-
|
|
53
|
+
applyFiltering=true;
|
|
53
54
|
}
|
|
54
55
|
else {
|
|
55
56
|
console.warn("brand value not found in dropdown options");
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
}
|
|
59
|
+
if(urlParams.category) {
|
|
60
|
+
const categoryValue = decodeURIComponent(urlParams.category);
|
|
61
|
+
console.log("categoryValue: ", categoryValue);
|
|
62
|
+
console.log("selectedByField: ", selectedByField);
|
|
63
|
+
console.log("optionsByFieldId: ", optionsByFieldId);
|
|
64
|
+
console.log("allfields: ", allfields);
|
|
65
|
+
const field=getFieldByTitle(fieldTitlesInCMS.category,allfields);
|
|
66
|
+
console.log("field: ", field);
|
|
67
|
+
const options=optionsByFieldId.get(field._id);
|
|
68
|
+
console.log("all the options: are ", options);
|
|
69
|
+
const option=getCorrectOption(categoryValue,options);
|
|
70
|
+
console.log("the correctoption: ", option);
|
|
71
|
+
if(option) {
|
|
72
|
+
console.log("setting the value of the checkbox to: ", option.value);
|
|
73
|
+
_$w(`#${FiltersIds[field.title]}CheckBox`).value = [option.value];
|
|
74
|
+
selectedByField.set(field._id, [option.value]);
|
|
75
|
+
applyFiltering=true
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
console.warn("category value not found in dropdown options");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if(applyFiltering) {
|
|
83
|
+
await updateJobsAndNumbersAndFilters(_$w);
|
|
59
84
|
}
|
|
60
85
|
}
|
|
61
86
|
|
|
@@ -185,6 +210,7 @@ async function loadJobsRepeater(_$w) {
|
|
|
185
210
|
updateOptionsUI(_$w,field.title, field._id, ''); // no search query
|
|
186
211
|
_$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices = []; // start empty
|
|
187
212
|
_$w(`#${FiltersIds[field.title]}CheckBox`).onChange(async (ev) => {
|
|
213
|
+
console.log(`#${FiltersIds[field.title]}CheckBox.selectedIndices: `, _$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices);
|
|
188
214
|
dontUpdateThisCheckBox=field._id;
|
|
189
215
|
const selected = ev.target.value; // array of selected value IDs
|
|
190
216
|
if (selected && selected.length) {
|