sr-npm 1.7.792 → 1.7.793
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 +13 -34
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { COLLECTIONS,CUSTOM_VALUES_COLLECTION_FIELDS,JOBS_COLLECTION_FIELDS } = require('../backend/collectionConsts');
|
|
2
|
-
const { queryParams
|
|
2
|
+
const { queryParams} = require('wix-location-frontend');
|
|
3
3
|
const { location } = require("@wix/site-location");
|
|
4
4
|
const {CAREERS_MULTI_BOXES_PAGE_CONSTS,FiltersIds,fieldTitlesInCMS,CATEGORY_CUSTOM_FIELD_ID_IN_CMS} = require('../backend/careersMultiBoxesPageIds');
|
|
5
5
|
const { groupValuesByField, debounce, getAllRecords, getFieldById, getFieldByTitle,getCorrectOption,getOptionIndexFromCheckBox } = require('./pagesUtils');
|
|
@@ -68,33 +68,8 @@ async function loadPrimarySearchRepeater(_$w) {
|
|
|
68
68
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_CATEGORY_BUTTON).label = itemData.title || '';
|
|
69
69
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_CATEGORY_BUTTON).onClick(async () => {
|
|
70
70
|
console.log("primary search category button clicked#%@#%%#$#$%: ", itemData);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const url = await location.url();
|
|
74
|
-
console.log("url: ", url);
|
|
75
|
-
await location.to(`${url}?category=${encodeURIComponent(itemData._id)}`);
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
if(itemData.title==="Distribution Centres (20)") {
|
|
79
|
-
console.log("Distribution Centres (20) button clicked");
|
|
80
|
-
await location.to(`https://google.com`);
|
|
81
|
-
}
|
|
82
|
-
if(itemData.title==="Merchandise (7)")
|
|
83
|
-
{
|
|
84
|
-
console.log("Merchandise (7) button clicked");
|
|
85
|
-
myto ("https://youtube.com");
|
|
86
|
-
}
|
|
87
|
-
if(itemData.title==="People (1)")
|
|
88
|
-
{
|
|
89
|
-
console.log("People (1) button clicked");
|
|
90
|
-
myto (`/search?category=${encodeURIComponent(itemData._id)}`);
|
|
91
|
-
}
|
|
92
|
-
//await location.to(`/search?category=${encodeURIComponent(itemData._id)}`);
|
|
93
|
-
// await location.to(`/search?category=${encodeURIComponent(itemData._id)}`);
|
|
94
|
-
// await clearAll(_$w);
|
|
95
|
-
// let encodedCategory=encodeURIComponent(itemData._id);
|
|
96
|
-
// queryParams.add({ category:encodedCategory });
|
|
97
|
-
// await handleUrlParams(_$w,{category:encodedCategory});
|
|
71
|
+
const url = await location.url();
|
|
72
|
+
await location.to(`${url}?category=${encodeURIComponent(itemData._id)}`);
|
|
98
73
|
});
|
|
99
74
|
});
|
|
100
75
|
} catch (error) {
|
|
@@ -595,9 +570,11 @@ async function secondarySearch(_$w,query) {
|
|
|
595
570
|
}
|
|
596
571
|
else {
|
|
597
572
|
let encodedKeyWord=encodeURIComponent(_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value);
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
573
|
+
const url = await location.url();
|
|
574
|
+
await location.to(`${url}?keyword=${encodedKeyWord}`);
|
|
575
|
+
// queryParams.add({ keyword:encodedKeyWord });
|
|
576
|
+
// handleUrlParams(_$w,{keyword:encodedKeyWord});
|
|
577
|
+
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).collapse();
|
|
601
578
|
// await primarySearch(_$w, _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value.trim());
|
|
602
579
|
}
|
|
603
580
|
}
|
|
@@ -611,9 +588,11 @@ async function secondarySearch(_$w,query) {
|
|
|
611
588
|
}
|
|
612
589
|
else {
|
|
613
590
|
let encodedKeyWord=encodeURIComponent(_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value);
|
|
614
|
-
|
|
615
|
-
await
|
|
616
|
-
|
|
591
|
+
const url = await location.url();
|
|
592
|
+
await location.to(`${url}?keyword=${encodedKeyWord}`);
|
|
593
|
+
// queryParams.add({ keyword:encodedKeyWord });
|
|
594
|
+
// await primarySearch(_$w, _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value.trim());
|
|
595
|
+
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).collapse();
|
|
617
596
|
}
|
|
618
597
|
});
|
|
619
598
|
} catch (error) {
|