sr-npm 1.7.652 → 1.7.653

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.652",
3
+ "version": "1.7.653",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -93,7 +93,7 @@ async function loadJobs(_$w) {
93
93
 
94
94
  let valuesByFieldId = groupValuesByField(allvaluesobjects, CUSTOM_VALUES_COLLECTION_FIELDS.CUSTOM_FIELD);
95
95
  console.log("valuesByFieldId: ",valuesByFieldId)
96
- valuesByFieldId["Location"]=cities
96
+ valuesByFieldId.set("Location",cities)
97
97
  console.log("valuesByFieldId after addubg cities: ",valuesByFieldId)
98
98
  valuesByFieldIdGlobal = valuesByFieldId; // store globally
99
99
 
@@ -126,11 +126,15 @@ async function loadJobs(_$w) {
126
126
  }));
127
127
  }
128
128
  else{
129
- originalOptions = fieldValues.map(v => ({
130
- label: v.title ,
131
- value: v._id
132
- }));
133
- }
129
+ originalOptions=fieldValues
130
+ }
131
+ console.log("originalOptions: ",originalOptions)
132
+ // else{
133
+ // originalOptions = fieldValues.map(v => ({
134
+ // label: v.title ,
135
+ // value: v._id
136
+ // }));
137
+ // }
134
138
  optionsByFieldId.set(fieldId, originalOptions);
135
139
  const counter={}
136
140
 
@@ -300,9 +304,11 @@ async function refreshFacetCounts(_$w) {
300
304
  const map = new Map();
301
305
  for (const v of values) {
302
306
  const ref = v[refKey]; // should be the _id of the CustomFields item
303
- if (!ref) continue;
304
307
  if (!map.has(ref)) map.set(ref, []);
305
- map.get(ref).push(v);
308
+ map.get(ref).push({
309
+ label: v.title ,
310
+ value: v._id
311
+ });
306
312
  }
307
313
  return map;
308
314
  }