sr-npm 1.7.580 → 1.7.582
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/package.json
CHANGED
|
@@ -90,9 +90,12 @@ async function loadJobs(_$w) {
|
|
|
90
90
|
}));
|
|
91
91
|
optionsByFieldId.set(fieldId, originalOptions);
|
|
92
92
|
const counter={}
|
|
93
|
+
const all_results=await wixData.queryReferenced(COLLECTIONS.CUSTOM_VALUES, fieldValues, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
|
|
94
|
+
console.log("all_results@@@@@: ",all_results)
|
|
95
|
+
console.log("all_results@@@@@: ",all_results)
|
|
93
96
|
for (const val of fieldValues) {
|
|
94
97
|
const result=await wixData.queryReferenced(COLLECTIONS.CUSTOM_VALUES, val, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
|
|
95
|
-
counter[val.title]=result.
|
|
98
|
+
counter[val.title]=result.totalCount
|
|
96
99
|
}
|
|
97
100
|
countsByFieldId.set(fieldId, new Map(originalOptions.map(o => [o.value, counter[o.label]])));
|
|
98
101
|
|
|
@@ -230,7 +233,7 @@ async function refreshFacetCounts(_$w) {
|
|
|
230
233
|
for (const job of jobs) {
|
|
231
234
|
const referencedfield= await wixData.queryReferenced(COLLECTIONS.JOBS, job, JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
|
|
232
235
|
console.log("referencedfield: ",referencedfield)
|
|
233
|
-
const vals = referencedfield.
|
|
236
|
+
const vals = referencedfield.items
|
|
234
237
|
//const vals = job[JOB_VALUES_FIELD] || [];
|
|
235
238
|
for (const val of vals) {
|
|
236
239
|
if (optionSet.has(val._id)) {
|