sr-npm 1.7.612 → 1.7.614

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.612",
3
+ "version": "1.7.614",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -83,7 +83,7 @@ async function loadJobs(_$w) {
83
83
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER).data = fields;
84
84
 
85
85
  // 2) Load all values once and group them by referenced field
86
- //const values = await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
86
+
87
87
  const valuesByFieldId = groupValuesByField(allvaluesobjects, CUSTOM_VALUES_COLLECTION_FIELDS.CUSTOM_FIELD);
88
88
  valuesByFieldIdGlobal = valuesByFieldId; // store globally
89
89
 
@@ -106,7 +106,7 @@ async function loadJobs(_$w) {
106
106
  }));
107
107
  optionsByFieldId.set(fieldId, originalOptions);
108
108
  const counter={}
109
- //const allvalues=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
109
+
110
110
  for (const val of allvaluesobjects) {
111
111
  counter[val.title]=val.totalJobs
112
112
  }
@@ -219,8 +219,8 @@ async function loadJobs(_$w) {
219
219
  }
220
220
 
221
221
  q.find()
222
- .then((res) => { _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = res.items;
223
- updateCurrentJobs(res);
222
+ .then(async (res) => { _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = res.items;
223
+ await updateCurrentJobs(res);
224
224
  // currentJobs=res.items.map(job=>job._id);
225
225
  console.log("updated currentJobs adfger fucniton: ",currentJobs)
226
226
  })
@@ -234,7 +234,7 @@ async function refreshFacetCounts(_$w) {
234
234
  // return;
235
235
  // }
236
236
 
237
-
237
+ console.log("current countsByFieldId: ",countsByFieldId)
238
238
  const fieldIds = Array.from(optionsByFieldId.keys());
239
239
  for (const fieldId of fieldIds) {
240
240
  let currentoptions=optionsByFieldId.get(fieldId)
@@ -249,7 +249,7 @@ async function refreshFacetCounts(_$w) {
249
249
  }
250
250
  countsByFieldId.set(fieldId, counter);
251
251
  }
252
-
252
+ console.log("new countsByFieldId: ",countsByFieldId)
253
253
  // for (const valueId of Object.keys(valueToJobs)) {
254
254
  // for (const jobId of currentJobs) {
255
255
  // if (valueToJobs[valueId].includes(jobId)) {