sr-npm 1.7.585 → 1.7.587
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
|
@@ -256,9 +256,7 @@ async function saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS() {
|
|
|
256
256
|
};
|
|
257
257
|
await wixData.update(COLLECTIONS.JOBS, updatedJob);
|
|
258
258
|
if (siteconfig.customFields==="true") {
|
|
259
|
-
console.log("inserting values reference")
|
|
260
259
|
await insertValuesReference(job._id);
|
|
261
|
-
console.log("inserted values reference successfully")
|
|
262
260
|
}
|
|
263
261
|
return { success: true, jobId: job._id, title: job.title };
|
|
264
262
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -90,14 +90,16 @@ async function loadJobs(_$w) {
|
|
|
90
90
|
}));
|
|
91
91
|
optionsByFieldId.set(fieldId, originalOptions);
|
|
92
92
|
const counter={}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
for (const val of fieldValues) {
|
|
98
|
-
const result=await wixData.queryReferenced(COLLECTIONS.CUSTOM_VALUES, val, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
|
|
99
|
-
counter[val.title]=result.totalCount
|
|
93
|
+
const allvalues=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
94
|
+
console.log("allvalues: ",allvalues)
|
|
95
|
+
for (const val of allvalues) {
|
|
96
|
+
counter[val.title]=val.totalJobs
|
|
100
97
|
}
|
|
98
|
+
|
|
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
|
+
// }
|
|
101
103
|
countsByFieldId.set(fieldId, new Map(originalOptions.map(o => [o.value, counter[o.label]])));
|
|
102
104
|
|
|
103
105
|
// Initialize UI
|