sr-npm 1.7.764 → 1.7.765
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
|
@@ -55,17 +55,22 @@ async function loadPrimarySearchRepeater(_$w) {
|
|
|
55
55
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.CATEGORY_RESULTS_REPEATER).onItemReady(async ($item, itemData) => {
|
|
56
56
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_CATEGORY_BUTTON).label = itemData.title || '';
|
|
57
57
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_CATEGORY_BUTTON).onClick(async () => {
|
|
58
|
-
|
|
59
|
-
await location.to(`/search?category=${itemData._id}`);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
// console.log("before location.to");
|
|
59
|
+
//await location.to(`/search?category=${itemData._id}`);
|
|
60
|
+
// console.log("after location to");
|
|
61
|
+
// to(`/search?category=${itemData._id}`);
|
|
62
|
+
console.log("before handling shit")
|
|
63
|
+
let encodedCategory=encodeURIComponent(itemData._id);
|
|
64
|
+
|
|
65
|
+
await handleUrlParams(_$w,{category:encodedCategory});
|
|
66
|
+
console.log("after handling url params");
|
|
63
67
|
});
|
|
64
68
|
});
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
async function handleUrlParams(_$w,urlParams) {
|
|
68
72
|
let applyFiltering=false;
|
|
73
|
+
console.log("handleUrlParams urlParams: ", urlParams);
|
|
69
74
|
if(urlParams.brand) {
|
|
70
75
|
applyFiltering=await handleParams(_$w,"brand",urlParams.brand)
|
|
71
76
|
}
|
|
@@ -101,7 +106,9 @@ async function handleUrlParams(_$w,urlParams) {
|
|
|
101
106
|
|
|
102
107
|
async function handleParams(_$w,param,value) {
|
|
103
108
|
let applyFiltering=false;
|
|
109
|
+
console.log("handleParams param: ", param, " value: ", value);
|
|
104
110
|
const decodedValue = decodeURIComponent(value);
|
|
111
|
+
console.log("decodedValue: ", decodedValue);
|
|
105
112
|
const field=getFieldByTitle(fieldTitlesInCMS[param],allfields);
|
|
106
113
|
const options=optionsByFieldId.get(field._id);
|
|
107
114
|
console.log("all options availbe for this field: ", field.title, " are ", options);
|