@capillarytech/creatives-library 6.3.3 → 6.3.4

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.
@@ -1,3 +1,5 @@
1
1
  export const GET_SIDEBAR_REQUEST = 'app/App/GET_SIDEBAR_REQUEST';
2
2
  export const GET_SIDEBAR_SUCCESS = 'app/App/GET_SIDEBAR_SUCCESS';
3
3
  export const GET_SIDEBAR_FAILURE = 'app/App/GET_SIDEBAR_FAILURE';
4
+
5
+ export const STORE2DOOR_PLUS_ENABLED = 'STORE2DOOR_PLUS_ENABLED';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "6.3.3",
4
+ "version": "6.3.4",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/utils/common.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import _ from 'lodash';
2
+ import { Auth } from '@capillarytech/cap-ui-utils';
3
+ import { STORE2DOOR_PLUS_ENABLED } from '../containers/App/constants';
2
4
 
3
5
  export function getUserNameById(userId, allUserList) {
4
6
  let userName = "";
@@ -30,3 +32,8 @@ export function removeLinksFromHtmlContent(content) {
30
32
  doc.remove();
31
33
  return copyContent;
32
34
  }
35
+
36
+ export const hasStore2DoorFeature = Auth.hasFeatureAccess.bind(
37
+ null,
38
+ STORE2DOOR_PLUS_ENABLED,
39
+ );
@@ -15,6 +15,7 @@ import TagList from '../../v2Containers/TagList';
15
15
  import CallTaskPreview from '../CallTaskPreview';
16
16
  import messages from './messages';
17
17
  import './_newCallTask.scss';
18
+ import { hasStore2DoorFeature } from '../../utils/common';
18
19
 
19
20
  const CALL = 'CALL';
20
21
  const STOREMAX_WHATSAPP = 'STOREMAX_WHATSAPP';
@@ -102,6 +103,7 @@ class NewCallTask extends React.Component { // eslint-disable-line react/prefer-
102
103
  const { formatMessage } = intl;
103
104
  const { subject, messageBody, description, callTaskActionType } = this.state;
104
105
  const tags = metaEntities && metaEntities.tags ? metaEntities.tags.standard : [];
106
+ const isStore2DoorEnabled = hasStore2DoorFeature();
105
107
  return (
106
108
  <CapSpin spinning={isLoading}>
107
109
  <CapRow gutter={16}>
@@ -138,13 +140,13 @@ class NewCallTask extends React.Component { // eslint-disable-line react/prefer-
138
140
  value={description}
139
141
  isRequired
140
142
  />
141
- <CapCheckbox
143
+ {isStore2DoorEnabled && <CapCheckbox
142
144
  onChange={this.onS2DCheckChange}
143
145
  checked={callTaskActionType === STOREMAX_WHATSAPP}
144
146
  style={{marginTop: FONT_SIZE_S}}
145
147
  >
146
148
  <FormattedMessage {...messages.useInS2D}/>
147
- </CapCheckbox>
149
+ </CapCheckbox>}
148
150
  </div>
149
151
  <CapButton
150
152
  disabled={!subject || !messageBody || !description}