sr-npm 1.7.351 → 1.7.353

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.351",
3
+ "version": "1.7.353",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -323,15 +323,20 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
323
323
  if (!skipUrlUpdate) {
324
324
  if(filter.field === 'title'){
325
325
  queryParams.add({ keyWord: filter.value });
326
- // queryKeyWordVar=filter.value;
327
326
  }
328
327
  if(filter.field === 'department'){
329
328
  queryParams.add({ department: encodeURIComponent(filter.value) });
330
- //queryDepartmentVar=filter.value;
331
329
  }
332
330
  if(filter.field === 'cityText'){
333
331
  queryParams.add({ location: encodeURIComponent(filter.value) });
334
- //queryLocationVar=filter.value;
332
+ }
333
+ if(filter.field === 'remote'){
334
+ if(filter.value === 'true'){
335
+ queryParams.add({ jobType: encodeURIComponent("remote") });
336
+ }
337
+ else{
338
+ queryParams.add({ jobType: encodeURIComponent("onsite") });
339
+ }
335
340
  }
336
341
  }
337
342
  if(filter.field === 'remote') {
@@ -345,17 +350,18 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
345
350
  if (!skipUrlUpdate) {
346
351
  if(filter.field === 'title'){
347
352
  queryParams.remove(["keyWord" ]);
348
- // queryKeyWordVar=undefined;
349
353
  }
350
354
  if(filter.field === 'department'){
351
355
  console.log("removing department from url")
352
356
  queryParams.remove(["department" ]);
353
- // queryDepartmentVar=undefined;
354
357
  }
355
358
  if(filter.field === 'cityText'){
356
359
  console.log("removing location from url")
357
360
  queryParams.remove(["location" ]);
358
- // queryLocationVar=undefined;
361
+ }
362
+ if(filter.field === 'remote'){
363
+ console.log("removing jobType from url")
364
+ queryParams.remove(["jobType" ]);
359
365
  }
360
366
  }
361
367
  }