sr-npm 1.7.895 → 1.7.897

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.895",
3
+ "version": "1.7.897",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -218,6 +218,7 @@ async function loadJobsRepeater(_$w) {
218
218
  }
219
219
 
220
220
  function updateTotalJobsCountText(_$w) {
221
+ console.log("currentJobs inisde updateTotalJobsCountText: ",currentJobs)
221
222
  secondarySearchIsFilled? _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.TotalJobsCountText).text = `${currentSecondarySearchJobs.length} Jobs`:
222
223
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.TotalJobsCountText).text = `${currentJobs.length} Jobs`;
223
224
  }
@@ -439,17 +440,23 @@ async function refreshFacetCounts(_$w,clearAll=false) {
439
440
  function countJobsPerField(jobs) {
440
441
  const fieldIds = Array.from(optionsByFieldId.keys());
441
442
  const currentJobsIds=jobs.map(job=>job._id);
443
+
442
444
  for (const fieldId of fieldIds) {
445
+ console.log("fieldId: ",fieldId)
446
+ console.log("optionsByFieldId: ",optionsByFieldId)
447
+ console.log("valueToJobs: ",valueToJobs)
443
448
  let currentoptions=optionsByFieldId.get(fieldId)
444
449
  let counter=new Map();
445
450
  for(const option of currentoptions) {
446
451
  for (const jobId of currentJobsIds) {
452
+ console.log("current jobId: ",jobId)
447
453
  if (valueToJobs[option.value].includes(jobId)) {
448
454
  counter.set(option.value, (counter.get(option.value) || 0) + 1);
449
455
  }
450
456
  }
451
457
  }
452
458
  countsByFieldId.set(fieldId, counter);
459
+ console.log("countsByFieldId: ",countsByFieldId)
453
460
  }
454
461
  }
455
462
 
@@ -501,7 +508,6 @@ async function secondarySearch(_$w,query) {
501
508
  try {
502
509
  await bindPrimarySearch(_$w,allvaluesobjects,alljobs);
503
510
 
504
-
505
511
  const secondarySearchDebounced = debounce(async () => {
506
512
  const query = (_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value || '').toLowerCase().trim();
507
513
  await secondarySearch(_$w, query);