sr-npm 1.7.611 → 1.7.612
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 +28 -11
package/package.json
CHANGED
|
@@ -233,20 +233,35 @@ async function refreshFacetCounts(_$w) {
|
|
|
233
233
|
// {
|
|
234
234
|
// return;
|
|
235
235
|
// }
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
const fieldIds = Array.from(optionsByFieldId.keys());
|
|
239
|
+
for (const fieldId of fieldIds) {
|
|
240
|
+
let currentoptions=optionsByFieldId.get(fieldId)
|
|
241
|
+
console.log("currentoptions@@@@@@@@@@@@@: ",currentoptions)
|
|
242
|
+
let counter=new Map();
|
|
243
|
+
for(const option of currentoptions) {
|
|
244
|
+
for (const jobId of currentJobs) {
|
|
245
|
+
if (valueToJobs[option.value].includes(jobId)) {
|
|
246
|
+
counter.set(option.value, (countsByFieldId.get(option.value) || 0) + 1);
|
|
247
|
+
}
|
|
241
248
|
}
|
|
242
249
|
}
|
|
250
|
+
countsByFieldId.set(fieldId, counter);
|
|
243
251
|
}
|
|
244
|
-
|
|
245
|
-
// const
|
|
252
|
+
|
|
253
|
+
// for (const valueId of Object.keys(valueToJobs)) {
|
|
254
|
+
// for (const jobId of currentJobs) {
|
|
255
|
+
// if (valueToJobs[valueId].includes(jobId)) {
|
|
256
|
+
// counter.set(valueId, (countsByFieldId.get(valueId) || 0) + 1);
|
|
257
|
+
// }
|
|
258
|
+
// }
|
|
259
|
+
// }
|
|
260
|
+
// }
|
|
246
261
|
// for (const valueId of Object.keys(valueToJobs)) {
|
|
247
262
|
// for (const jobId of currentJobs) {
|
|
248
263
|
// if (valueToJobs[valueId].includes(jobId)) {
|
|
249
|
-
//
|
|
264
|
+
// counter.set(valueId, (countsByFieldId.get(valueId) || 0) + 1);
|
|
250
265
|
// }
|
|
251
266
|
// }
|
|
252
267
|
// }
|
|
@@ -335,12 +350,14 @@ async function refreshFacetCounts(_$w) {
|
|
|
335
350
|
}
|
|
336
351
|
|
|
337
352
|
async function updateCurrentJobs(res) {
|
|
338
|
-
|
|
339
|
-
|
|
353
|
+
let newcurrentJobs = [];
|
|
354
|
+
newcurrentJobs.push(...res.items.map(job=>job._id));
|
|
340
355
|
while (res.hasNext()) {
|
|
341
356
|
res = await res.next();
|
|
342
|
-
|
|
357
|
+
newcurrentJobs.push(...res.items.map(job=>job._id));
|
|
343
358
|
}
|
|
359
|
+
console.log("newcurrentJobs inisde new function: ",newcurrentJobs)
|
|
360
|
+
currentJobs = newcurrentJobs;
|
|
344
361
|
console.log("updated currentJobs inisde new function: ",currentJobs)
|
|
345
362
|
}
|
|
346
363
|
|