sr-npm 1.7.792 → 1.7.794
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 +14 -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,9 @@ 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
|
-
|
|
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.baseUrl();
|
|
72
|
+
console.log("url: ", url);
|
|
73
|
+
await location.to(`${url}?category=${encodeURIComponent(itemData._id)}`);
|
|
98
74
|
});
|
|
99
75
|
});
|
|
100
76
|
} catch (error) {
|
|
@@ -595,9 +571,11 @@ async function secondarySearch(_$w,query) {
|
|
|
595
571
|
}
|
|
596
572
|
else {
|
|
597
573
|
let encodedKeyWord=encodeURIComponent(_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value);
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
574
|
+
const url = await location.url();
|
|
575
|
+
await location.to(`${url}?keyword=${encodedKeyWord}`);
|
|
576
|
+
// queryParams.add({ keyword:encodedKeyWord });
|
|
577
|
+
// handleUrlParams(_$w,{keyword:encodedKeyWord});
|
|
578
|
+
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).collapse();
|
|
601
579
|
// await primarySearch(_$w, _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value.trim());
|
|
602
580
|
}
|
|
603
581
|
}
|
|
@@ -611,9 +589,11 @@ async function secondarySearch(_$w,query) {
|
|
|
611
589
|
}
|
|
612
590
|
else {
|
|
613
591
|
let encodedKeyWord=encodeURIComponent(_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value);
|
|
614
|
-
|
|
615
|
-
await
|
|
616
|
-
|
|
592
|
+
const url = await location.url();
|
|
593
|
+
await location.to(`${url}?keyword=${encodedKeyWord}`);
|
|
594
|
+
// queryParams.add({ keyword:encodedKeyWord });
|
|
595
|
+
// await primarySearch(_$w, _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value.trim());
|
|
596
|
+
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).collapse();
|
|
617
597
|
}
|
|
618
598
|
});
|
|
619
599
|
} catch (error) {
|