sr-npm 1.7.591 → 1.7.592

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
@@ -171,9 +171,6 @@ async function saveJobsDataToCMS() {
171
171
  console.log(`✓ All chunks processed. Total jobs saved: ${totalSaved}/${jobsData.length}`);
172
172
  }
173
173
 
174
- async function insertValuesReference(jobId) {
175
- await wixData.insertReference(COLLECTIONS.JOBS, JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,jobId, jobToCustomValues[jobId]);
176
- }
177
174
  async function insertJobsReference(valueId) {
178
175
  await wixData.insertReference(COLLECTIONS.CUSTOM_VALUES, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,valueId, customValuesToJobs[valueId]);
179
176
  }
@@ -255,9 +252,6 @@ async function saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS() {
255
252
  referFriendLink: referFriendLink,
256
253
  };
257
254
  await wixData.update(COLLECTIONS.JOBS, updatedJob);
258
- // if (siteconfig.customFields==="true") {
259
- // await insertValuesReference(job._id);
260
- // }
261
255
  return { success: true, jobId: job._id, title: job.title };
262
256
  } catch (error) {
263
257
  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.591",
3
+ "version": "1.7.592",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,6 +6,7 @@ let valuesByFieldIdGlobal = null;
6
6
  const selectedByField = new Map(); // fieldId -> array of selected value IDs
7
7
  const optionsByFieldId = new Map(); // fieldId -> [{label, value}]
8
8
  const countsByFieldId = new Map();
9
+ const alljobs=[]
9
10
 
10
11
  async function careersMultiBoxesPageOnReady(_$w) {
11
12
  await loadJobs(_$w);
@@ -42,6 +43,9 @@ async function careersMultiBoxesPageOnReady(_$w) {
42
43
  });
43
44
  });
44
45
  updateSelectedValuesRepeater(_$w);
46
+ if(alljobs.length===0) {
47
+ alljobs=await getAllRecords(COLLECTIONS.JOBS);
48
+ }
45
49
  }
46
50
 
47
51
  async function loadJobs(_$w) {