sr-npm 1.7.513 → 1.7.515

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
@@ -357,7 +357,6 @@ async function syncJobsFast() {
357
357
  await createCollections();
358
358
  await clearCollections();
359
359
  await fillSecretManagerMirror();
360
-
361
360
  console.log("saving jobs data to CMS");
362
361
  await saveJobsDataToCMS();
363
362
  console.log("saved jobs data to CMS successfully");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.513",
3
+ "version": "1.7.515",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3,7 +3,8 @@ const {wixData} = require('wix-data');
3
3
  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
- const { COLLECTIONS } = require('../backend/collectionConsts');
6
+ const { COLLECTIONS, TOKEN_NAME } = require('../backend/collectionConsts');
7
+ const { getTokenFromCMS } = require('../backend/secretsData');
7
8
 
8
9
  const {
9
10
  debounce,
@@ -495,12 +496,19 @@ async function updateMapMarkers(_$w){
495
496
 
496
497
  }
497
498
 
498
- async function handleBrandDropdown(_$w){
499
+ async function handleBrandDropdown(_$w){
499
500
  const brands=await wixData.query(COLLECTIONS.BRANDS).find();
501
+ const disableMultiBrand=await getTokenFromCMS(TOKEN_NAME.DISABLE_MULTI_BRAND)
502
+ if(disableMultiBrand==='true'){
503
+ console.log("disabling brand dropdown because disableMultiBrand is true");
504
+ _$w('#dropdownBrand').hide();
505
+ }
506
+ else{
500
507
  if(brands.items.length>1){
501
508
  console.log("showing brand dropdown");
502
509
  _$w('#dropdownBrand').show();
503
510
  }
511
+ }
504
512
  }
505
513
  module.exports = {
506
514
  careersPageOnReady,
@@ -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', () => {