@capillarytech/creatives-library 7.0.5 → 7.0.6
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.
package/package.json
CHANGED
|
@@ -292,7 +292,7 @@ function SlideBoxContent(props) {
|
|
|
292
292
|
<TemplatePreview
|
|
293
293
|
content={getChannelPreviewContent(templateData)}
|
|
294
294
|
viberBrandName={selectedAccount || ""}
|
|
295
|
-
viberAccountName={selectedAccount[0]}
|
|
295
|
+
viberAccountName={(selectedAccount || "")[0]}
|
|
296
296
|
unicodeEnabled={get(templateData, `versions.base['unicode-validity']`)}
|
|
297
297
|
channel={(templateData.type || '').toLowerCase()}
|
|
298
298
|
charCounterEnabled={channel === constants.SMS}
|
|
@@ -292,10 +292,12 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
294
294
|
selectedAccount = nextProps.Templates.weCrmAccounts[0];
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
params.
|
|
295
|
+
const { configs = {}, name = "" } = selectedAccount;
|
|
296
|
+
const { wecrm_app_id = "", wecrm_token = "", sourceAccountIdentifier = "" } = configs;
|
|
297
|
+
this.setState({selectedAccount: name}, () => {
|
|
298
|
+
params.wecrmId = wecrm_app_id;
|
|
299
|
+
params.wecrmToken = wecrm_token;
|
|
300
|
+
params.originalId = sourceAccountIdentifier;
|
|
299
301
|
this.props.actions.setViberAccount(nextProps.Templates.weCrmAccounts[0]);
|
|
300
302
|
this.getAllTemplates({params});
|
|
301
303
|
});
|
|
@@ -1838,7 +1840,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1838
1840
|
render() {
|
|
1839
1841
|
const isFullMode = this.isFullMode();
|
|
1840
1842
|
const { activeMode, channel, wechatFilter, lineFilter } = this.state;
|
|
1841
|
-
const showForViber = (channel.toLowerCase() !== VIBER_CHANNEL ||
|
|
1843
|
+
const showForViber = (channel.toLowerCase() !== VIBER_CHANNEL ||
|
|
1844
|
+
(channel.toLowerCase() === VIBER_CHANNEL && !this.props.isFullMode && isEmpty(get(this.props, 'Templates.selectedViberAccount', {}))));
|
|
1842
1845
|
if (activeMode === ACCOUNT_SELECTION_MODE && showForViber ) {
|
|
1843
1846
|
return this.renderAccountSelection();
|
|
1844
1847
|
}
|
|
@@ -14,10 +14,6 @@ export default defineMessages({
|
|
|
14
14
|
id: `${scope}.viberCreativeTitle`,
|
|
15
15
|
defaultMessage: "Viber creative",
|
|
16
16
|
},
|
|
17
|
-
viberCreativeDesc: {
|
|
18
|
-
id: `${scope}.viberCreativeDesc`,
|
|
19
|
-
defaultMessage: "Select any of the existing templates or create new",
|
|
20
|
-
},
|
|
21
17
|
message: {
|
|
22
18
|
id: `${scope}.message`,
|
|
23
19
|
defaultMessage: 'Message',
|