sr-npm 1.7.552 → 1.7.554
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
|
@@ -150,8 +150,9 @@ async function saveJobsDataToCMS() {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
await insertValuesReference(jobToCustomValues);
|
|
153
|
+
console.log("inserted values reference successfully");
|
|
153
154
|
await insertJobsReference(jobToCustomValues);
|
|
154
|
-
|
|
155
|
+
console.log("inserted jobs reference successfully");
|
|
155
156
|
|
|
156
157
|
console.log(`✓ All chunks processed. Total jobs saved: ${totalSaved}/${jobsData.length}`);
|
|
157
158
|
}
|
|
@@ -172,14 +173,17 @@ async function insertJobsReference(jobToCustomValues) {
|
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
async function populateCustomFieldsCollection(customFields) {
|
|
176
|
+
console.log("populating custom fields collection");
|
|
175
177
|
for(const ID of Object.keys(customFields)){
|
|
176
178
|
await wixData.save(COLLECTIONS.CUSTOM_FIELDS, {
|
|
177
179
|
title: customFields[ID],
|
|
178
180
|
_id: ID,
|
|
179
181
|
});
|
|
180
182
|
}
|
|
183
|
+
console.log("populated custom fields collection successfully");
|
|
181
184
|
}
|
|
182
185
|
async function populateCustomValuesCollection(customFieldsValues) {
|
|
186
|
+
console.log("populating custom values collection");
|
|
183
187
|
for (const fieldId of Object.keys(customFieldsValues)) {
|
|
184
188
|
const valuesMap = customFieldsValues[fieldId] || {};
|
|
185
189
|
for (const valueId of Object.keys(valuesMap)) {
|
|
@@ -190,6 +194,7 @@ async function populateCustomValuesCollection(customFieldsValues) {
|
|
|
190
194
|
});
|
|
191
195
|
}
|
|
192
196
|
}
|
|
197
|
+
console.log("populated custom values collection successfully");
|
|
193
198
|
}
|
|
194
199
|
async function saveJobsDescriptionsAndLocationApplyUrlToCMS() {
|
|
195
200
|
console.log('🚀 Starting job descriptions update process for ALL jobs');
|