sr-npm 1.7.163 → 1.7.165
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/backend/data.js +2 -2
- package/package.json +1 -1
- package/pages/careersPage.js +2 -5
- package/pages/homePage.js +1 -3
package/backend/data.js
CHANGED
|
@@ -27,12 +27,12 @@ function validatePosition(position) {
|
|
|
27
27
|
async function saveJobsDataToCMS() {
|
|
28
28
|
const positions = await fetchPositionsFromSRAPI();
|
|
29
29
|
// bulk insert to jobs collection without descriptions first
|
|
30
|
+
console.log("positions@@@@@", positions);
|
|
30
31
|
const jobsData = positions.content.map(position => {
|
|
31
|
-
validatePosition(position);
|
|
32
32
|
const basicJob = {
|
|
33
33
|
_id: position.id,
|
|
34
34
|
title: position.title,
|
|
35
|
-
department: position.department.label
|
|
35
|
+
department: position.department.label,
|
|
36
36
|
cityText: normalizeCityName(position.location.city),
|
|
37
37
|
location: position.location,
|
|
38
38
|
country: position.location.country,
|
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -169,8 +169,6 @@ function init(_$w) {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
172
|
-
console.log("applyFilters");
|
|
173
|
-
console.log("after applyFilters_$w('#dropdownDepartment').value", _$w('#dropdownDepartment').value);
|
|
174
172
|
const dropdownFiltersMapping = [
|
|
175
173
|
{ elementId: '#dropdownDepartment', field: 'department', value: _$w('#dropdownDepartment').value },
|
|
176
174
|
{ elementId: '#dropdownLocation', field: 'cityText', value: _$w('#dropdownLocation').value },
|
|
@@ -200,7 +198,7 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
200
198
|
queryParams.add({ keyWord: filter.value });
|
|
201
199
|
}
|
|
202
200
|
if(filter.field === 'department'){
|
|
203
|
-
queryParams.add({ department: filter.value });
|
|
201
|
+
queryParams.add({ department: encodeURIComponent(filter.value) });
|
|
204
202
|
}
|
|
205
203
|
}
|
|
206
204
|
if(filter.field === 'remote') {
|
|
@@ -258,8 +256,7 @@ async function updateCount(_$w) {
|
|
|
258
256
|
}
|
|
259
257
|
|
|
260
258
|
async function handleDepartmentParam(_$w,department) {
|
|
261
|
-
|
|
262
|
-
const departmentValue = department.replace('-', ' ');
|
|
259
|
+
const departmentValue = decodeURIComponent(department);
|
|
263
260
|
|
|
264
261
|
|
|
265
262
|
|
package/pages/homePage.js
CHANGED
|
@@ -16,9 +16,7 @@ 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
|
-
const department=itemData.title.replace(' ', '-');
|
|
21
|
-
console.log("department##########", department);
|
|
19
|
+
const department = encodeURIComponent(itemData.title);
|
|
22
20
|
location.to(`/positions?department=${department}`);
|
|
23
21
|
});
|
|
24
22
|
});
|