sr-npm 1.7.586 → 1.7.588

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.586",
3
+ "version": "1.7.588",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -90,14 +90,17 @@ async function loadJobs(_$w) {
90
90
  }));
91
91
  optionsByFieldId.set(fieldId, originalOptions);
92
92
  const counter={}
93
- console.log("fieldValues: ",fieldValues)
94
- const all_results=await wixData.queryReferenced(COLLECTIONS.CUSTOM_VALUES, fieldValues, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
95
- console.log("all_results@@@@@: ",all_results)
96
- console.log("all_results@@@@@: ",all_results)
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
+ // }
103
+
101
104
  countsByFieldId.set(fieldId, new Map(originalOptions.map(o => [o.value, counter[o.label]])));
102
105
 
103
106
  // Initialize UI