sr-npm 1.7.164 → 1.7.166

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 CHANGED
@@ -27,18 +27,26 @@ 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
- title: position.title,
35
- department: position.department.label.replace('&', ' and '),
36
- cityText: normalizeCityName(position.location.city),
37
- location: position.location,
38
- country: position.location.country,
39
- remote: position.location.remote,
40
- language: position.language.label,
41
- postingStatus: position.postingStatus,
34
+ // title: position.title,
35
+ // department: position.department.label,
36
+ // cityText: normalizeCityName(position.location.city),
37
+ // location: position.location,
38
+ // country: position.location.country,
39
+ // remote: position.location.remote,
40
+ // language: position.language.label,
41
+ // postingStatus: position.postingStatus,
42
+ title: position.title || '',
43
+ department: position.department?.label || '',
44
+ cityText: normalizeCityName(position.location?.city),
45
+ location: position.location || {},
46
+ country: position.location?.country || '',
47
+ remote: position.location?.remote || false,
48
+ language: position.language?.label || '',
49
+ postingStatus: position.postingStatus || '',
42
50
  jobDescription: null, // Will be filled later
43
51
  };
44
52
  return basicJob;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.164",
3
+ "version": "1.7.166",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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 },
@@ -258,7 +256,6 @@ async function updateCount(_$w) {
258
256
  }
259
257
 
260
258
  async function handleDepartmentParam(_$w,department) {
261
- console.log("handleDepartmentParam@@@@@", department);
262
259
  const departmentValue = decodeURIComponent(department);
263
260
 
264
261
 
package/pages/homePage.js CHANGED
@@ -16,10 +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
- console.log("teamButton clicked@@@@@", itemData.title);
20
19
  const department = encodeURIComponent(itemData.title);
21
- console.log("department##########", department);
22
-
23
20
  location.to(`/positions?department=${department}`);
24
21
  });
25
22
  });