sr-npm 1.7.129 → 1.7.131
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 +13 -3
- package/pages/homePage.js +2 -18
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -15,13 +15,15 @@ const {
|
|
|
15
15
|
let thisObjectVar;
|
|
16
16
|
let queryPageVar;
|
|
17
17
|
let queryKeyWordVar;
|
|
18
|
-
|
|
18
|
+
let queryDepartmentVar;
|
|
19
19
|
|
|
20
20
|
async function careersPageOnReady(_$w,thisObject,query) {
|
|
21
21
|
queryPageVar=query.page;
|
|
22
22
|
queryKeyWordVar=query.keyWord;
|
|
23
|
+
queryDepartmentVar=query.department;
|
|
23
24
|
console.log("query", query);
|
|
24
25
|
console.log("query.department", query.department);
|
|
26
|
+
console.log("queryDepartmentVar", queryDepartmentVar);
|
|
25
27
|
thisObjectVar=thisObject;
|
|
26
28
|
allJobs=await getAllPositions();
|
|
27
29
|
await handleUrlParams(_$w);
|
|
@@ -86,8 +88,10 @@ async function handleUrlParams(_$w) {
|
|
|
86
88
|
await handleKeyWordParam(_$w,queryKeyWordVar);
|
|
87
89
|
}
|
|
88
90
|
if (queryPageVar) {
|
|
89
|
-
await handlePageParam(_$w);
|
|
90
|
-
|
|
91
|
+
await handlePageParam(_$w);
|
|
92
|
+
}
|
|
93
|
+
if (queryDepartmentVar) {
|
|
94
|
+
await handleDepartmentParam(_$w,queryDepartmentVar);
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
|
|
@@ -238,6 +242,12 @@ async function updateCount(_$w) {
|
|
|
238
242
|
return count;
|
|
239
243
|
}
|
|
240
244
|
|
|
245
|
+
async function handleDepartmentParam(_$w,department) {
|
|
246
|
+
console.log("department inside handleDepartmentParam", department.replace('-', ' '));
|
|
247
|
+
_$w('#dropdownDepartment').value = department.replace('-', ' ');
|
|
248
|
+
await applyFilters(_$w);
|
|
249
|
+
}
|
|
250
|
+
|
|
241
251
|
|
|
242
252
|
|
|
243
253
|
|
package/pages/homePage.js
CHANGED
|
@@ -16,24 +16,8 @@ async function homePageOnReady(_$w,thisObject) {
|
|
|
16
16
|
_$w('#teamRepeater').onItemReady(($item, itemData) => {
|
|
17
17
|
$item('#teamButton').label = `View ${itemData.count} Open Positions`;
|
|
18
18
|
$item('#teamButton').onClick(()=>{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
console.log("department length", department.length);
|
|
22
|
-
const trimmedDepartment = department.trim();
|
|
23
|
-
|
|
24
|
-
console.log("trimmedDepartment length", trimmedDepartment.length);
|
|
25
|
-
location.to(`/positions?department=${trimmedDepartment}`);
|
|
26
|
-
|
|
27
|
-
// const currentUrl = await location.url();
|
|
28
|
-
// console.log("currentUrl@@@@@@@@", currentUrl);
|
|
29
|
-
|
|
30
|
-
// // Get existing query params from current URL
|
|
31
|
-
// const urlObj = new URL(currentUrl);
|
|
32
|
-
// const existingParams = urlObj.search;
|
|
33
|
-
|
|
34
|
-
// // Navigate to /positions with existing params + department
|
|
35
|
-
// const separator = existingParams ? '&' : '?';
|
|
36
|
-
// await location.to(`/positions${existingParams}${separator}department=${itemData._id}`);
|
|
19
|
+
const department=itemData.title.replace(' ', '-');
|
|
20
|
+
location.to(`/positions?department=${department}`);
|
|
37
21
|
});
|
|
38
22
|
});
|
|
39
23
|
|