sr-npm 1.7.609 → 1.7.610
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
|
@@ -17,14 +17,10 @@ async function careersMultiBoxesPageOnReady(_$w) {
|
|
|
17
17
|
}
|
|
18
18
|
if(Object.keys(valueToJobs).length === 0){
|
|
19
19
|
allvaluesobjects=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
20
|
-
console.log("allvaluesobjects: ",allvaluesobjects)
|
|
21
20
|
for (const value of allvaluesobjects) {
|
|
22
|
-
console.log("value: ",value)
|
|
23
21
|
valueToJobs[value._id]= value.jobIds;
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
|
-
console.log("valueToJobs: ",valueToJobs)
|
|
27
|
-
console.log("alljobs: ",alljobs)
|
|
28
24
|
|
|
29
25
|
await loadJobs(_$w);
|
|
30
26
|
await loadFilters(_$w);
|
|
@@ -212,6 +208,7 @@ async function loadJobs(_$w) {
|
|
|
212
208
|
function applyJobFilters(_$w,filterByField) {
|
|
213
209
|
console.log("applying job filters")
|
|
214
210
|
console.log("selectedByField: ",selectedByField)
|
|
211
|
+
|
|
215
212
|
let q = wixData.query(COLLECTIONS.JOBS)
|
|
216
213
|
|
|
217
214
|
// AND across categories, OR within each category
|
|
@@ -222,9 +219,10 @@ async function loadJobs(_$w) {
|
|
|
222
219
|
}
|
|
223
220
|
|
|
224
221
|
q.find()
|
|
225
|
-
.then((res) => { _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = res.items;
|
|
226
|
-
|
|
227
|
-
|
|
222
|
+
.then((res) => { _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = res.items;
|
|
223
|
+
updateCurrentJobs(res);
|
|
224
|
+
// currentJobs=res.items.map(job=>job._id);
|
|
225
|
+
console.log("updated currentJobs adfger fucniton: ",currentJobs)
|
|
228
226
|
})
|
|
229
227
|
.catch((err) => { console.error('Failed to filter jobs:', err); });
|
|
230
228
|
}
|
|
@@ -325,6 +323,16 @@ async function refreshFacetCounts(_$w) {
|
|
|
325
323
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SELECTED_VALUES_REPEATER).data = selectedItems;
|
|
326
324
|
}
|
|
327
325
|
|
|
326
|
+
async function updateCurrentJobs(res) {
|
|
327
|
+
currentJobs = [];
|
|
328
|
+
currentJobs.push(res.items.map(job=>job._id));
|
|
329
|
+
while (res.hasNext()) {
|
|
330
|
+
res = await res.next();
|
|
331
|
+
currentJobs.push(...res.items.map(job=>job._id));
|
|
332
|
+
}
|
|
333
|
+
console.log("updated currentJobs inisde new function: ",currentJobs)
|
|
334
|
+
}
|
|
335
|
+
|
|
328
336
|
async function findAll(q) {
|
|
329
337
|
const out = [];
|
|
330
338
|
let res = await q.limit(1000).find();
|