sr-npm 1.7.353 → 1.7.355
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/careersPage.js +2 -68
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -21,7 +21,6 @@ const {
|
|
|
21
21
|
let queryLocationVar;
|
|
22
22
|
let queryJobTypeVar;
|
|
23
23
|
let searchInputBlurredFirstTime=true;
|
|
24
|
-
let deletedParam=false;
|
|
25
24
|
async function careersPageOnReady(_$w,thisObject,queryParams) {
|
|
26
25
|
console.log("queryParams: ", queryParams);
|
|
27
26
|
const { page, keyWord, department, location,jobType } = queryParams;
|
|
@@ -88,10 +87,6 @@ async function setPageParamInUrl() {
|
|
|
88
87
|
|
|
89
88
|
}
|
|
90
89
|
async function handleUrlParams(_$w) {
|
|
91
|
-
console.log("queryKeyWordVar: ", queryKeyWordVar);
|
|
92
|
-
console.log("queryPageVar: ", queryPageVar);
|
|
93
|
-
console.log("queryDepartmentVar: ", queryDepartmentVar);
|
|
94
|
-
console.log("queryLocationVar: ", queryLocationVar);
|
|
95
90
|
if (queryKeyWordVar) {
|
|
96
91
|
await handleKeyWordParam(_$w,queryKeyWordVar);
|
|
97
92
|
}
|
|
@@ -113,7 +108,7 @@ async function handleUrlParams(_$w) {
|
|
|
113
108
|
async function handleKeyWordParam(_$w,keyWord) {
|
|
114
109
|
_$w('#searchInput').value = keyWord;
|
|
115
110
|
// Use applyFilters to maintain consistency instead of directly setting filter
|
|
116
|
-
|
|
111
|
+
|
|
117
112
|
}
|
|
118
113
|
|
|
119
114
|
async function handlePageParam(_$w) {
|
|
@@ -176,10 +171,7 @@ function init(_$w) {
|
|
|
176
171
|
searchInputBlurredFirstTime=false;
|
|
177
172
|
}
|
|
178
173
|
});
|
|
179
|
-
_$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(()
|
|
180
|
-
console.log("onChange triggering on dropdown@@@@@@");
|
|
181
|
-
applyFilters(_$w);
|
|
182
|
-
});
|
|
174
|
+
_$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(applyFilters(_$w));
|
|
183
175
|
_$w('#resetFiltersButton, #clearSearch').onClick(()=>resetFilters(_$w));
|
|
184
176
|
|
|
185
177
|
_$w('#openFiltersButton').onClick(()=>{
|
|
@@ -193,59 +185,6 @@ function init(_$w) {
|
|
|
193
185
|
//URL onChange
|
|
194
186
|
onChange(async ()=>{
|
|
195
187
|
await handleBackAndForth(_$w);
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
//try onready first
|
|
203
|
-
//try location to
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
// handleBackAndForth(_$w);
|
|
210
|
-
// const newQueryParams=await location.query();
|
|
211
|
-
// console.log("location.query(): ", newQueryParams);
|
|
212
|
-
// if(newQueryParams.keyWord){
|
|
213
|
-
// console.log("setting querykeyparam")
|
|
214
|
-
// queryKeyWordVar=newQueryParams.keyWord;
|
|
215
|
-
// }
|
|
216
|
-
// else
|
|
217
|
-
// {
|
|
218
|
-
// queryKeyWordVar=undefined;
|
|
219
|
-
// _$w('#searchInput').value = '';
|
|
220
|
-
// deletedParam=true;
|
|
221
|
-
// }
|
|
222
|
-
// if(newQueryParams.department){
|
|
223
|
-
// console.log("setting queryDepartmentVar")
|
|
224
|
-
// queryDepartmentVar=newQueryParams.department;
|
|
225
|
-
// }
|
|
226
|
-
// else
|
|
227
|
-
// {
|
|
228
|
-
// queryDepartmentVar=undefined;
|
|
229
|
-
// _$w('#dropdownDepartment').value = '';
|
|
230
|
-
// deletedParam=true;
|
|
231
|
-
// }
|
|
232
|
-
// if(newQueryParams.location){
|
|
233
|
-
// console.log("setting queryLocationVar")
|
|
234
|
-
// queryLocationVar=newQueryParams.location;
|
|
235
|
-
// }
|
|
236
|
-
// else
|
|
237
|
-
// {
|
|
238
|
-
// queryLocationVar=undefined;
|
|
239
|
-
// _$w('#dropdownLocation').value = '';
|
|
240
|
-
// deletedParam=true;
|
|
241
|
-
// }
|
|
242
|
-
|
|
243
|
-
// await handleUrlParams(_$w);
|
|
244
|
-
// if(deletedParam)
|
|
245
|
-
// {
|
|
246
|
-
// await applyFilters(_$w,true);
|
|
247
|
-
// deletedParam=false;
|
|
248
|
-
// }
|
|
249
188
|
});
|
|
250
189
|
|
|
251
190
|
|
|
@@ -290,9 +229,6 @@ async function handleBackAndForth(_$w){
|
|
|
290
229
|
_$w('#dropdownJobType').value = '';
|
|
291
230
|
}
|
|
292
231
|
await handleUrlParams(_$w);
|
|
293
|
-
// if(deletedParam){
|
|
294
|
-
// await applyFilters(_$w,true);
|
|
295
|
-
// }
|
|
296
232
|
|
|
297
233
|
}
|
|
298
234
|
|
|
@@ -429,7 +365,6 @@ async function handleDepartmentParam(_$w,department) {
|
|
|
429
365
|
{
|
|
430
366
|
console.log("department value found in dropdown options ",departmentValue);
|
|
431
367
|
_$w('#dropdownDepartment').value = departmentValue;
|
|
432
|
-
// await applyFilters(_$w, true); // Skip URL update since we're handling initial URL params
|
|
433
368
|
}
|
|
434
369
|
else{
|
|
435
370
|
console.warn("department value not found in dropdown options");
|
|
@@ -470,7 +405,6 @@ async function handleLocationParam(_$w,location) {
|
|
|
470
405
|
|
|
471
406
|
if(option){
|
|
472
407
|
_$w('#dropdownLocation').value = option.value;
|
|
473
|
-
// await applyFilters(_$w, true); // Skip URL update since we're handling initial URL params
|
|
474
408
|
}
|
|
475
409
|
else{
|
|
476
410
|
console.warn("location value not found in dropdown options");
|