sr-npm 1.7.588 → 1.7.590

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/backend/data.js CHANGED
@@ -255,9 +255,9 @@ async function saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS() {
255
255
  referFriendLink: referFriendLink,
256
256
  };
257
257
  await wixData.update(COLLECTIONS.JOBS, updatedJob);
258
- if (siteconfig.customFields==="true") {
259
- await insertValuesReference(job._id);
260
- }
258
+ // if (siteconfig.customFields==="true") {
259
+ // await insertValuesReference(job._id);
260
+ // }
261
261
  return { success: true, jobId: job._id, title: job.title };
262
262
  } catch (error) {
263
263
  console.error(` ❌ Failed to update ${job.title} (${job._id}):`, error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.588",
3
+ "version": "1.7.590",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -91,16 +91,10 @@ async function loadJobs(_$w) {
91
91
  optionsByFieldId.set(fieldId, originalOptions);
92
92
  const counter={}
93
93
  const allvalues=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
94
- console.log("allvalues: ",allvalues)
95
94
  for (const val of allvalues) {
96
95
  counter[val.title]=val.totalJobs
97
96
  }
98
97
 
99
- // for (const val of fieldValues) {
100
- // const result=await wixData.queryReferenced(COLLECTIONS.CUSTOM_VALUES, val, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
101
- // counter[val.title]=result.totalCount
102
- // }
103
-
104
98
  countsByFieldId.set(fieldId, new Map(originalOptions.map(o => [o.value, counter[o.label]])));
105
99
 
106
100
  // Initialize UI
@@ -117,6 +111,7 @@ async function loadJobs(_$w) {
117
111
  }
118
112
  applyJobFilters(_$w,JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES); // re-query jobs
119
113
  refreshFacetCounts(_$w); // recompute and update counts in all lists
114
+ updateSelectedValuesRepeater(_$w);
120
115
 
121
116
  });
122
117
 
@@ -278,6 +273,7 @@ async function refreshFacetCounts(_$w) {
278
273
  }
279
274
 
280
275
  function updateSelectedValuesRepeater(_$w) {
276
+ console.log("updating selected values repeater")
281
277
  const selectedItems = [];
282
278
  for (const [fieldId, valueIds] of selectedByField.entries()) {
283
279
  const opts = optionsByFieldId.get(fieldId) || [];