sr-npm 1.7.616 → 1.7.617
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 +1 -1
- package/pages/careersMultiBoxesPage.js +11 -11
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ async function careersMultiBoxesPageOnReady(_$w) {
|
|
|
28
28
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.SELECTED_VALUES_REPEATER_ITEM_LABEL).text = itemData.label || '';
|
|
29
29
|
|
|
30
30
|
// Deselect this value from both the selected map and the multibox
|
|
31
|
-
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.DESELECT_BUTTON_ID).onClick(() => {
|
|
31
|
+
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.DESELECT_BUTTON_ID).onClick(async () => {
|
|
32
32
|
const fieldId = itemData.fieldId;
|
|
33
33
|
const valueId = itemData.valueId;
|
|
34
34
|
if (!fieldId || !valueId) return;
|
|
@@ -50,12 +50,12 @@ async function careersMultiBoxesPageOnReady(_$w) {
|
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
applyJobFilters(_$w,JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES);
|
|
54
|
-
refreshFacetCounts(_$w);
|
|
55
|
-
updateSelectedValuesRepeater(_$w);
|
|
53
|
+
await applyJobFilters(_$w,JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES);
|
|
54
|
+
await refreshFacetCounts(_$w);
|
|
55
|
+
await updateSelectedValuesRepeater(_$w);
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
|
-
updateSelectedValuesRepeater(_$w);
|
|
58
|
+
await updateSelectedValuesRepeater(_$w);
|
|
59
59
|
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -118,16 +118,16 @@ async function loadJobs(_$w) {
|
|
|
118
118
|
|
|
119
119
|
//$item(CHECKBOX_GROUP_ID).options = originalOptions;
|
|
120
120
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).selectedIndices = []; // start empty
|
|
121
|
-
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).onChange((ev) => {
|
|
121
|
+
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).onChange(async (ev) => {
|
|
122
122
|
const selected = ev.target.value; // array of selected value IDs
|
|
123
123
|
if (selected && selected.length) {
|
|
124
124
|
selectedByField.set(fieldId, selected);
|
|
125
125
|
} else {
|
|
126
126
|
selectedByField.delete(fieldId);
|
|
127
127
|
}
|
|
128
|
-
applyJobFilters(_$w,JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES); // re-query jobs
|
|
129
|
-
refreshFacetCounts(_$w); // recompute and update counts in all lists
|
|
130
|
-
updateSelectedValuesRepeater(_$w);
|
|
128
|
+
await applyJobFilters(_$w,JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES); // re-query jobs
|
|
129
|
+
await refreshFacetCounts(_$w); // recompute and update counts in all lists
|
|
130
|
+
await updateSelectedValuesRepeater(_$w);
|
|
131
131
|
|
|
132
132
|
});
|
|
133
133
|
|
|
@@ -205,7 +205,7 @@ async function loadJobs(_$w) {
|
|
|
205
205
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).value = preserved;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
function applyJobFilters(_$w,filterByField) {
|
|
208
|
+
async function applyJobFilters(_$w,filterByField) {
|
|
209
209
|
console.log("applying job filters")
|
|
210
210
|
console.log("selectedByField: ",selectedByField)
|
|
211
211
|
|
|
@@ -238,7 +238,7 @@ async function refreshFacetCounts(_$w) {
|
|
|
238
238
|
const fieldIds = Array.from(optionsByFieldId.keys());
|
|
239
239
|
for (const fieldId of fieldIds) {
|
|
240
240
|
let currentoptions=optionsByFieldId.get(fieldId)
|
|
241
|
-
console.log("currentoptions@@@@@@@@@@@@@: ",currentoptions)
|
|
241
|
+
//console.log("currentoptions@@@@@@@@@@@@@: ",currentoptions)
|
|
242
242
|
let counter=new Map();
|
|
243
243
|
for(const option of currentoptions) {
|
|
244
244
|
console.log("currentJobs length: ",currentJobs.length)
|