sr-npm 1.7.555 → 1.7.556

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.
Files changed (2) hide show
  1. package/backend/data.js +5 -7
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -158,18 +158,21 @@ async function saveJobsDataToCMS() {
158
158
  }
159
159
 
160
160
  async function insertValuesReference(jobToCustomValues) {
161
+ console.log("inserting values reference");
161
162
  for (const jobId of Object.keys(jobToCustomValues)) {
162
163
  const items = jobToCustomValues[jobId];
163
164
  await wixData.insertReference(COLLECTIONS.JOBS, JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,jobId, items);
164
165
  }
166
+ console.log("inserted values reference successfully");
165
167
  }
166
168
  async function insertJobsReference(jobToCustomValues) {
169
+ console.log("inserting jobs reference");
167
170
  for (const jobId of Object.keys(jobToCustomValues)) {
168
171
  for (const valueId of jobToCustomValues[jobId]) {
169
172
  await wixData.insertReference(COLLECTIONS.CUSTOM_VALUES, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,valueId, jobId);
170
173
  }
171
174
  }
172
-
175
+ console.log("inserted jobs reference successfully");
173
176
  }
174
177
 
175
178
  async function populateCustomFieldsCollection(customFields) {
@@ -181,21 +184,16 @@ async function populateCustomFieldsCollection(customFields) {
181
184
  }
182
185
  }
183
186
  async function populateCustomValuesCollection(customFieldsValues) {
184
- console.log("populating custom values collection");
185
- console.log("customFieldsValues: ", customFieldsValues);
186
187
  for (const fieldId of Object.keys(customFieldsValues)) {
187
- console.log("populating custom values for field: ", fieldId);
188
188
  const valuesMap = customFieldsValues[fieldId] || {};
189
189
  for (const valueId of Object.keys(valuesMap)) {
190
- console.log("populating custom values for value: ", valueId);
191
190
  await wixData.save(COLLECTIONS.CUSTOM_VALUES, {
192
191
  _id: valueId,
193
192
  title: valuesMap[valueId],
194
- // customField: fieldId, // reference to CustomFields collection (displays the label)
193
+ customField: fieldId, // reference to CustomFields collection (displays the label)
195
194
  });
196
195
  }
197
196
  }
198
- console.log("populated custom values collection successfully");
199
197
  }
200
198
  async function saveJobsDescriptionsAndLocationApplyUrlToCMS() {
201
199
  console.log('🚀 Starting job descriptions update process for ALL jobs');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.555",
3
+ "version": "1.7.556",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {