sr-npm 1.7.512 → 1.7.514

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.
@@ -94,6 +94,7 @@ const COLLECTIONS_FIELDS = {
94
94
  COMPANY_ID: 'companyId',
95
95
  SMART_TOKEN: 'x-smarttoken',
96
96
  DESIRED_BRAND: 'desiredBrand',
97
+ DISABLE_MULTI_BRAND: 'disableMultiBrand',
97
98
  }
98
99
 
99
100
 
package/backend/data.js CHANGED
@@ -373,7 +373,8 @@ async function clearCollections() {
373
373
  await Promise.all([
374
374
  wixData.truncate(COLLECTIONS.CITIES),
375
375
  wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT),
376
- wixData.truncate(COLLECTIONS.JOBS)
376
+ wixData.truncate(COLLECTIONS.JOBS),
377
+ wixData.truncate(COLLECTIONS.BRANDS)
377
378
  ]);
378
379
  console.log("cleared collections successfully");
379
380
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.512",
3
+ "version": "1.7.514",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,7 +4,7 @@ const { window } = require('@wix/site-window');
4
4
  const { query,queryParams,onChange} = require("wix-location-frontend");
5
5
  const { location } = require("@wix/site-location");
6
6
  const { COLLECTIONS } = require('../backend/collectionConsts');
7
-
7
+ const { getTokenFromCMS } = require('../backend/secretsData');
8
8
  const {
9
9
  debounce,
10
10
  getFilter,
@@ -495,12 +495,19 @@ async function updateMapMarkers(_$w){
495
495
 
496
496
  }
497
497
 
498
- async function handleBrandDropdown(_$w){
498
+ async function handleBrandDropdown(_$w){
499
499
  const brands=await wixData.query(COLLECTIONS.BRANDS).find();
500
+ const disableMultiBrand=await getTokenFromCMS(TOKEN_NAME.DISABLE_MULTI_BRAND)
501
+ if(disableMultiBrand==='true'){
502
+ console.log("disabling brand dropdown because disableMultiBrand is true");
503
+ _$w('#dropdownBrand').hide();
504
+ }
505
+ else{
500
506
  if(brands.items.length>1){
501
507
  console.log("showing brand dropdown");
502
508
  _$w('#dropdownBrand').show();
503
509
  }
510
+ }
504
511
  }
505
512
  module.exports = {
506
513
  careersPageOnReady,
@@ -1,8 +1,9 @@
1
+ const { query } = require("wix-location-frontend");
1
2
  const {
2
3
  htmlToText,
3
4
  appendQueryParams
4
5
  } = require('../public/utils');
5
- const { query } = require("wix-location-frontend");
6
+
6
7
 
7
8
  async function positionPageOnReady(_$w) {
8
9
 
@@ -42,10 +43,8 @@ const {
42
43
 
43
44
  function handleApplyButton(_$w,item) {
44
45
  _$w('#applyButton').target="_blank";//so it can open in new tab
45
- console.log("query is: ", query);
46
46
  const url=appendQueryParams(item.applyLink,query);
47
47
  _$w('#applyButton').link=url; //so it can be clicked
48
- console.log("url is: ", url);
49
48
  }
50
49
 
51
50
  module.exports = {
@@ -59,7 +59,6 @@ describe('fetchPositionsFromSRAPI error handling', () => {
59
59
  });
60
60
 
61
61
 
62
-
63
62
  });
64
63
 
65
64
  describe('fetchJobDescription error handling', () => {