sr-npm 1.7.842 → 1.7.843

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.
@@ -4,7 +4,7 @@ const { items: wixData } = require('@wix/data');
4
4
  const { COLLECTIONS,TOKEN_NAME } = require('./collectionConsts');
5
5
 
6
6
  const getSecretValue = auth.elevate(secrets.getSecretValue);
7
- const elevatedQuery = auth.elevate(wixData.query);
7
+
8
8
 
9
9
  async function retrieveSecretVal(tokenName)
10
10
  {
@@ -20,7 +20,7 @@ const elevatedQuery = auth.elevate(wixData.query);
20
20
  }
21
21
 
22
22
  async function getTokenFromCMS(tokenName) {
23
- const result = await elevatedQuery(COLLECTIONS.SECRET_MANAGER_MIRROR).eq('tokenName',tokenName).find();
23
+ const result = await wixData.query(COLLECTIONS.SECRET_MANAGER_MIRROR).eq('tokenName',tokenName).find();
24
24
  if (result.items.length > 0) {
25
25
  return result.items[0].value;
26
26
  } else {
@@ -28,7 +28,7 @@ const elevatedQuery = auth.elevate(wixData.query);
28
28
  }
29
29
  }
30
30
  async function getTemplateTypeFromCMS() {
31
- const result = await elevatedQuery(COLLECTIONS.TEMPLATE_TYPE).limit(1).find();
31
+ const result = await wixData.query(COLLECTIONS.TEMPLATE_TYPE).limit(1).find();
32
32
  if (result.items.length > 0) {
33
33
  return result.items[0].templateType;
34
34
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.842",
3
+ "version": "1.7.843",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,15 +1,15 @@
1
- const { getApiKeys } = require('../backend/secretsData');
2
- const { TEMPLATE_TYPE } = require('../backend/collectionConsts');
3
-
1
+ const{isElementExistOnPage} = require('psdev-utils');
2
+ const { location } = require("@wix/site-location");
4
3
  async function masterPageOnReady(_$w) {
5
- ({ companyId, templateType } = await getApiKeys());
6
- console.log("companyId: ", companyId);
7
- console.log("templateType: ", templateType);
8
- if(templateType===TEMPLATE_TYPE.EXTERNAL){
9
- console.log("templateType is external");
4
+ if(isElementExistOnPage(_$w('#myApplicationButton'))){
5
+ _$w('#myApplicationButton').onClick(()=>{
6
+ location.to('https://www.smartrecruiters.com/app/employee-portal/68246e5512d84f4c00a19e62/job-applications');
7
+ });
10
8
  }
11
- else{
12
- console.log("templateType is internal");
9
+ if(isElementExistOnPage(_$w('#myReferralsButton'))){
10
+ _$w('#myReferralsButton').onClick(()=>{
11
+ location.to('https://www.smartrecruiters.com/app/referrals/');
12
+ });
13
13
  }
14
14
  }
15
15