@capillarytech/creatives-library 7.17.100 → 7.17.102
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.
|
@@ -14,6 +14,7 @@ export const CUSTOMER_EXTENDED_FIELD = 'Customer extended fields';
|
|
|
14
14
|
export const EXTENDED_TAG = 'ExtendedTagMessage';
|
|
15
15
|
export const BADGES_UI_ENABLED = 'BADGES_UI_ENABLED';
|
|
16
16
|
export const JP_LOCALE_HIDE_FEATURE = 'JP_LOCALE_HIDE_FEATURE';
|
|
17
|
+
export const ENABLE_WECHAT = 'ENABLE_WECHAT';
|
|
17
18
|
export const ENABLE_CUSTOMER_BARCODE_TAG = "ENABLE_CUSTOMER_BARCODE_TAG";
|
|
18
19
|
|
|
19
20
|
export const CARD_RELATED_TAGS = [
|
package/package.json
CHANGED
package/utils/common.js
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
BADGES_UI_ENABLED,
|
|
19
19
|
BADGES_ENROLL,
|
|
20
20
|
BADGES_ISSUE,
|
|
21
|
+
ENABLE_WECHAT,
|
|
21
22
|
} from '../containers/App/constants';
|
|
22
23
|
import { apiMessageFormatHandler } from './commonUtils';
|
|
23
24
|
|
|
@@ -100,6 +101,11 @@ export const hasJPLocaleHideFeatureEnabled = Auth.hasFeatureAccess.bind(
|
|
|
100
101
|
JP_LOCALE_HIDE_FEATURE,
|
|
101
102
|
);
|
|
102
103
|
|
|
104
|
+
export const hasWechatFeatureEnabled = Auth.hasFeatureAccess.bind(
|
|
105
|
+
null,
|
|
106
|
+
ENABLE_WECHAT,
|
|
107
|
+
);
|
|
108
|
+
|
|
103
109
|
export const hasCustomerBarcodeFeatureEnabled = Auth.hasFeatureAccess.bind(
|
|
104
110
|
null,
|
|
105
111
|
ENABLE_CUSTOMER_BARCODE_TAG,
|
|
@@ -708,14 +708,16 @@ export const InApp = (props) => {
|
|
|
708
708
|
<CapHeading type="h6" className="inapp-creative-layout-desc">
|
|
709
709
|
<FormattedMessage {...messages.creativeLayoutDesc} />
|
|
710
710
|
</CapHeading>
|
|
711
|
-
</CapRow
|
|
711
|
+
</CapRow>
|
|
712
|
+
<CapRadioGroup
|
|
712
713
|
id="inapp-layout-radio"
|
|
713
714
|
options={LAYOUT_RADIO_OPTIONS}
|
|
714
715
|
value={templateLayoutType}
|
|
715
716
|
onChange={onTemplateLayoutTypeChange}
|
|
716
|
-
className="inapp-layout-radio"
|
|
717
|
-
|
|
718
|
-
|
|
717
|
+
className="inapp-layout-radio"
|
|
718
|
+
/>
|
|
719
|
+
</>
|
|
720
|
+
)}
|
|
719
721
|
{/* device tab */}
|
|
720
722
|
<CapTab
|
|
721
723
|
panes={PANES.filter(
|
|
@@ -263,7 +263,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
263
263
|
case WECHAT:
|
|
264
264
|
channel = 'wechat';
|
|
265
265
|
activeMode = ACCOUNT_SELECTION_MODE;
|
|
266
|
-
this.props.actions.getWeCrmAccounts();
|
|
266
|
+
commonUtil.hasWechatFeatureEnabled() && this.props.actions.getWeCrmAccounts();
|
|
267
267
|
break;
|
|
268
268
|
case EMAIL:
|
|
269
269
|
channel = 'Email';
|
|
@@ -373,7 +373,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
373
373
|
} else if (nextProps.route.name.toLowerCase() === 'wechat') {
|
|
374
374
|
this.setState({defaultAccount: true});
|
|
375
375
|
channel = 'wechat';
|
|
376
|
-
nextProps.actions.getWeCrmAccounts();
|
|
376
|
+
commonUtil.hasWechatFeatureEnabled() && nextProps.actions.getWeCrmAccounts();
|
|
377
377
|
} else if (nextProps.route.name.toLowerCase() === 'email') {
|
|
378
378
|
channel = 'Email';
|
|
379
379
|
} else if (nextProps.route.name.toLowerCase() === "mobilepush" || nextProps.route.name === INAPP) {
|
|
@@ -2604,6 +2604,9 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
2604
2604
|
showNoAccountHeader = true;
|
|
2605
2605
|
}
|
|
2606
2606
|
}
|
|
2607
|
+
if (channel === WECHAT && commonUtil.hasWechatFeatureEnabled()) {
|
|
2608
|
+
showNoAccountHeader = true;
|
|
2609
|
+
}
|
|
2607
2610
|
return (<CapSpin spinning={fetchingWeCrmAccounts}>
|
|
2608
2611
|
{showNoAccountHeader ? <FormattedMessage {...noAccountHeader} /> :
|
|
2609
2612
|
<div style={{ overflowX: "auto", paddingBottom: CAP_SPACE_16 }}>
|