sr-npm 1.7.756 → 1.7.758
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
|
@@ -22,7 +22,7 @@ const pagination = {
|
|
|
22
22
|
async function careersMultiBoxesPageOnReady(_$w,urlParams) {
|
|
23
23
|
await loadData(_$w);
|
|
24
24
|
await loadJobsRepeater(_$w);
|
|
25
|
-
await
|
|
25
|
+
await loadPrimarySearchRepeater(_$w);
|
|
26
26
|
await loadFilters(_$w);
|
|
27
27
|
await loadSelectedValuesRepeater(_$w);
|
|
28
28
|
await bindSearchInput(_$w);
|
|
@@ -42,14 +42,18 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
|
|
|
42
42
|
await handleUrlParams(_$w,urlParams);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
async function
|
|
45
|
+
async function loadPrimarySearchRepeater(_$w) {
|
|
46
46
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOB_RESULTS_REPEATER).onItemReady(async ($item, itemData) => {
|
|
47
|
-
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_POSITION_BUTTON).
|
|
47
|
+
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_POSITION_BUTTON).label = itemData.title || '';
|
|
48
48
|
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.CATEGORY_RESULTS_REPEATER).onItemReady(async ($item, itemData) => {
|
|
52
|
-
|
|
52
|
+
console.log("itemData#$@#$%@#$@#$@#$: ", itemData);
|
|
53
|
+
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_CATEGORY_BUTTON).label = itemData.title || '';
|
|
54
|
+
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_CATEGORY_BUTTON).onClick(async () => {
|
|
55
|
+
console.log("category button clicked: ", itemData._id);
|
|
56
|
+
});
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
59
|
|
|
@@ -349,7 +353,7 @@ async function loadJobsRepeater(_$w) {
|
|
|
349
353
|
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("noJobs");
|
|
350
354
|
}
|
|
351
355
|
else{
|
|
352
|
-
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("
|
|
356
|
+
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("searchResult");
|
|
353
357
|
}
|
|
354
358
|
pagination.currentPage=1;
|
|
355
359
|
handlePaginationButtons(_$w);
|
|
@@ -426,7 +430,7 @@ function primarySearch(_$w,query) {
|
|
|
426
430
|
let filteredJobs=alljobs.filter(job=>job.title.toLowerCase().includes(query));
|
|
427
431
|
if(filteredJobs.length>0) {
|
|
428
432
|
alljobs=filteredJobs;
|
|
429
|
-
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_MULTI_BOX).changeState("
|
|
433
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_MULTI_BOX).changeState("jobResults");
|
|
430
434
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOB_RESULTS_REPEATER).data = alljobs
|
|
431
435
|
}
|
|
432
436
|
else {
|
|
@@ -483,8 +487,20 @@ async function secondarySearch(_$w,query) {
|
|
|
483
487
|
categoryValues.push({title:value.title+` (${value.totalJobs})` ,_id:value._id});
|
|
484
488
|
}
|
|
485
489
|
}
|
|
490
|
+
console.log("categoryValues: ", categoryValues);
|
|
486
491
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.CATEGORY_RESULTS_REPEATER).data = categoryValues;
|
|
487
|
-
|
|
492
|
+
// let categroyFieldId;
|
|
493
|
+
// for(const field of allfields) {
|
|
494
|
+
// if(field.title==="Category") {
|
|
495
|
+
// categroyFieldId=field._id;
|
|
496
|
+
// break;
|
|
497
|
+
// }
|
|
498
|
+
// }
|
|
499
|
+
// let categorycounts=countsByFieldId.get(categroyFieldId);
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
//_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOB_RESULTS_REPEATER).data = alljobs
|
|
503
|
+
//@@@@@@@@@@@@@@@@@
|
|
488
504
|
});
|
|
489
505
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).onInput(secondarySearchDebounced);
|
|
490
506
|
|