sr-npm 1.7.940 → 1.7.941

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.940",
3
+ "version": "1.7.941",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -39,6 +39,21 @@ function groupValuesByField(values, refKey) {
39
39
  return items;
40
40
  }
41
41
 
42
+ async function getAllRecordsWithoutMultiRef(collectionId) {
43
+ const q = wixData.query(collectionId)
44
+
45
+
46
+ const items = [];
47
+ let res = await q.limit(1000).find();
48
+ items.push(...res.items);
49
+
50
+ while (res.hasNext()) {
51
+ res = await res.next();
52
+ items.push(...res.items);
53
+ }
54
+ return items;
55
+ }
56
+
42
57
  function getFieldById(fieldId,allFields) {
43
58
  return allFields.find(field=>field._id===fieldId);
44
59
  }
@@ -212,5 +227,6 @@ async function primarySearch(_$w,query,alljobs) {
212
227
  bindPrimarySearch,
213
228
  primarySearch,
214
229
  getLatestJobsByValue,
215
- getValueFromValueId
230
+ getValueFromValueId,
231
+ getAllRecordsWithoutMultiRef
216
232
  }
@@ -1,8 +1,7 @@
1
1
  const { getLatestJobsByValue, getValueFromValueId } = require('./pagesUtils');
2
2
  const { location } = require("@wix/site-location");
3
3
  const { supportTeamsPageIds } = require('../backend/consts');
4
- const { COLLECTIONS } = require('../backend/collectionConsts');
5
- const { getAllRecords } = require('./pagesUtils');
4
+ const { getAllRecordsWithoutMultiRef } = require('./pagesUtils');
6
5
 
7
6
  let currentItem;
8
7
  async function supportTeasmPageOnReady(_$w) {
@@ -28,7 +27,8 @@ async function handleVideoSection(_$w) {
28
27
  async function handlePeopleSection(_$w) {
29
28
  const currentPeopleRepeaterData= _$w(supportTeamsPageIds.PEOPLE_REPEATER).data;
30
29
  console.log("currentPeopleRepeaterData: ",currentPeopleRepeaterData);
31
- const allpeoplesrecord=await getAllRecords(COLLECTIONS.PEOPLE);
30
+ const allpeoplesrecord=await getAllRecordsWithoutMultiRef("OurPeople");
31
+ console.log("allpeoplesrecord: ",allpeoplesrecord);
32
32
  let itemObj = _$w("#peopleDataset").getCurrentItem();
33
33
  console.log("itemObj: ",itemObj);
34
34
  if(currentPeopleRepeaterData.length === 0) {