sr-npm 1.7.553 → 1.7.555
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 +6 -1
- package/package.json +1 -1
package/backend/data.js
CHANGED
|
@@ -181,16 +181,21 @@ async function populateCustomFieldsCollection(customFields) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
async function populateCustomValuesCollection(customFieldsValues) {
|
|
184
|
+
console.log("populating custom values collection");
|
|
185
|
+
console.log("customFieldsValues: ", customFieldsValues);
|
|
184
186
|
for (const fieldId of Object.keys(customFieldsValues)) {
|
|
187
|
+
console.log("populating custom values for field: ", fieldId);
|
|
185
188
|
const valuesMap = customFieldsValues[fieldId] || {};
|
|
186
189
|
for (const valueId of Object.keys(valuesMap)) {
|
|
190
|
+
console.log("populating custom values for value: ", valueId);
|
|
187
191
|
await wixData.save(COLLECTIONS.CUSTOM_VALUES, {
|
|
188
192
|
_id: valueId,
|
|
189
193
|
title: valuesMap[valueId],
|
|
190
|
-
|
|
194
|
+
// customField: fieldId, // reference to CustomFields collection (displays the label)
|
|
191
195
|
});
|
|
192
196
|
}
|
|
193
197
|
}
|
|
198
|
+
console.log("populated custom values collection successfully");
|
|
194
199
|
}
|
|
195
200
|
async function saveJobsDescriptionsAndLocationApplyUrlToCMS() {
|
|
196
201
|
console.log('🚀 Starting job descriptions update process for ALL jobs');
|