sr-npm 1.7.620 → 1.7.621
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
|
@@ -3,11 +3,11 @@ const { items: wixData } = require('@wix/data');
|
|
|
3
3
|
const {CAREERS_MULTI_BOXES_PAGE_CONSTS} = require('../backend/careersMultiBoxesPageIds');
|
|
4
4
|
|
|
5
5
|
const selectedByField = new Map(); // fieldId -> array of selected value IDs
|
|
6
|
-
const optionsByFieldId = new Map(); // fieldId -> [{label, value}]
|
|
7
|
-
const countsByFieldId = new Map();
|
|
6
|
+
const optionsByFieldId = new Map(); // fieldId -> [{label, value}] array of objects with label which is the valueLabel and value which is the valueId
|
|
7
|
+
const countsByFieldId = new Map(); // fieldId -> {valueId: count} map of counts for each valueId
|
|
8
8
|
let alljobs=[] // all jobs in the database
|
|
9
9
|
let allvaluesobjects=[] // all values in the database
|
|
10
|
-
let valueToJobs={} // valueId -> array of
|
|
10
|
+
let valueToJobs={} // valueId -> array of jobIdsxw
|
|
11
11
|
let currentJobs=[] // current jobs that are displayed in the jobs repeater
|
|
12
12
|
async function careersMultiBoxesPageOnReady(_$w) {
|
|
13
13
|
if(alljobs.length===0) {
|
|
@@ -70,6 +70,8 @@ async function loadJobs(_$w) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function updateTotalJobsCountText(_$w) {
|
|
73
|
+
console.log("updating total jobs count text")
|
|
74
|
+
console.log("currentJobs.length: ",currentJobs.length)
|
|
73
75
|
_$w('#totalJobsCountText').text = `${currentJobs.length} Jobs`;
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -259,7 +261,7 @@ async function refreshFacetCounts(_$w) {
|
|
|
259
261
|
const label = byId.get(id);
|
|
260
262
|
if (label) {
|
|
261
263
|
//selectedItems.push({ _id: `${fieldId}:${id}`, label, fieldId, valueId: id });
|
|
262
|
-
selectedItems.push({ label, fieldId,
|
|
264
|
+
selectedItems.push({ label, fieldId, _id: id }); //_id is the valueId
|
|
263
265
|
}
|
|
264
266
|
}
|
|
265
267
|
}
|