sr-npm 1.7.738 → 1.7.740

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.738",
3
+ "version": "1.7.740",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -360,7 +360,8 @@ function handlePageUrlParam() {
360
360
  }
361
361
 
362
362
  }
363
- async function refreshFacetCounts(_$w,clearAll=false,secondarySearch=false) {
363
+ async function refreshFacetCounts(_$w,clearAll=false,secondarySearch=false) {
364
+
364
365
  console.log("refreshing facet counts");
365
366
 
366
367
 
@@ -391,6 +392,7 @@ async function refreshFacetCounts(_$w,clearAll=false,secondarySearch=false) {
391
392
 
392
393
 
393
394
  function countJobsPerField(jobs) {
395
+ console.log("counting jobs per field for jobs: ", jobs);
394
396
  const fieldIds = Array.from(optionsByFieldId.keys());
395
397
  const currentJobsIds=jobs.map(job=>job._id);
396
398
  for (const fieldId of fieldIds) {
@@ -405,6 +407,7 @@ async function refreshFacetCounts(_$w,clearAll=false,secondarySearch=false) {
405
407
  }
406
408
  countsByFieldId.set(fieldId, counter);
407
409
  }
410
+ console.log("countsByFieldId inside countJobsPerField: ", countsByFieldId);
408
411
  }
409
412
 
410
413
 
@@ -446,7 +449,7 @@ async function secondarySearch(_$w,query) {
446
449
  }
447
450
  handlePaginationButtons(_$w,true);
448
451
  updateTotalJobsCountText(_$w,true);
449
- await refreshFacetCounts(_$w,true);
452
+ await refreshFacetCounts(_$w, false, true); //false for clearAll, true for secondarySearch
450
453
  return secondarySearchJobs;
451
454
  }
452
455
  async function bindSearchInput(_$w) {