sr-npm 1.7.488 → 1.7.490

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.488",
3
+ "version": "1.7.490",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -106,7 +106,8 @@ async function handleUrlParams(_$w) {
106
106
  if (queryJobTypeVar) {
107
107
  await handleJobTypeParam(_$w,queryJobTypeVar);
108
108
  }
109
- if (queryBrandVar && _$w('#dropdownBrand').isVisible()) { //if it is not visible, ignore it
109
+ console.log("_$w('#dropdownBrand'): ", _$w('#dropdownBrand'));
110
+ if (queryBrandVar && _$w('#dropdownBrand').isVisible) { //if it is not visible, ignore it
110
111
  await handleBrandParam(_$w,queryBrandVar);
111
112
  }
112
113
  await applyFilters(_$w, true); // Skip URL update since we're handling initial URL params
@@ -233,7 +234,7 @@ async function handleBackAndForth(_$w){
233
234
  deletedParam=true;
234
235
  _$w('#dropdownJobType').value = '';
235
236
  }
236
- if(_$w('#dropdownBrand').isVisible()){
237
+ if(_$w('#dropdownBrand').isVisible){
237
238
  if(newQueryParams.brand){
238
239
  queryBrandVar=newQueryParams.brand;
239
240
  }
@@ -290,6 +291,9 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
290
291
  queryParams.add({ jobType: encodeURIComponent("onsite") });
291
292
  }
292
293
  }
294
+ if(filter.field === 'brand'){
295
+ queryParams.add({ brand: encodeURIComponent(filter.value) });
296
+ }
293
297
  }
294
298
  if(filter.field === 'remote') {
295
299
  value = filter.value === 'true';
@@ -492,7 +496,6 @@ async function updateMapMarkers(_$w){
492
496
 
493
497
  async function handleBrandDropdown(_$w){
494
498
  const brands=await wixData.query("Brands").find();
495
- console.log("brands: ", brands);
496
499
  if(brands.items.length>1){
497
500
  console.log("showing brand dropdown");
498
501
  _$w('#dropdownBrand').show();