sr-npm 1.2.42 → 1.2.44
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 +1 -1
- package/pages/careersMultiBoxesPage.js +16 -13
package/package.json
CHANGED
|
@@ -134,19 +134,23 @@ async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {
|
|
|
134
134
|
if(urlParams.keyword) {
|
|
135
135
|
applyFiltering = await primarySearch(_$w, decodeURIComponent(urlParams.keyword));
|
|
136
136
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value = decodeURIComponent(urlParams.keyword);
|
|
137
|
+
let items = [];
|
|
138
|
+
let data;
|
|
137
139
|
_$w("#jobsDataset").onReady(async () => {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
+
try {
|
|
141
|
+
data = await _$w("#jobsDataset").getItems(0, 1000);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.error('Failed to get items:', error);
|
|
144
|
+
}
|
|
140
145
|
items.push(...data.items);
|
|
141
146
|
|
|
142
147
|
while (_$w("#jobsDataset").hasNextPage()) {
|
|
143
148
|
const nextItems = await _$w("#jobsDataset").nextPage();
|
|
144
149
|
items.push(...nextItems);
|
|
145
150
|
}
|
|
146
|
-
|
|
147
|
-
currentJobs = items;
|
|
148
|
-
keywordAllJobs = items;
|
|
149
151
|
});
|
|
152
|
+
currentJobs = items;
|
|
153
|
+
keywordAllJobs = items;
|
|
150
154
|
}
|
|
151
155
|
|
|
152
156
|
for (const url of possibleUrlParams)
|
|
@@ -160,10 +164,11 @@ async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {
|
|
|
160
164
|
}
|
|
161
165
|
currentApplyFilterFlag=false;
|
|
162
166
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
|
|
168
|
+
if(applyFiltering || keywordAllJobs || handleBackAndForth) {
|
|
169
|
+
await updateJobsAndNumbersAndFilters(_$w);
|
|
170
|
+
|
|
171
|
+
}
|
|
167
172
|
|
|
168
173
|
if(urlParams.page) {
|
|
169
174
|
if(Number.isNaN(Number(urlParams.page)) || Number(urlParams.page)<=1 || Number(urlParams.page)>Math.ceil(currentJobs.length/pagination.pageSize)) {
|
|
@@ -472,8 +477,7 @@ function getValueFromValueId(valueIds, value) {
|
|
|
472
477
|
}
|
|
473
478
|
}
|
|
474
479
|
|
|
475
|
-
async function applyJobFilters(_$w
|
|
476
|
-
// if(!clearAll) {
|
|
480
|
+
async function applyJobFilters(_$w) {
|
|
477
481
|
let tempFilteredJobs=[];
|
|
478
482
|
let finalFilteredJobs=[];
|
|
479
483
|
secondarySearchIsFilled? finalFilteredJobs=allsecondarySearchJobs:finalFilteredJobs=alljobs;
|
|
@@ -525,8 +529,7 @@ function getValueFromValueId(valueIds, value) {
|
|
|
525
529
|
}
|
|
526
530
|
pagination.currentPage=1;
|
|
527
531
|
handlePaginationButtons(_$w);
|
|
528
|
-
|
|
529
|
-
// }
|
|
532
|
+
}
|
|
530
533
|
|
|
531
534
|
function handlePaginationButtons(_$w)
|
|
532
535
|
{
|