@capillarytech/creatives-library 2.0.58 → 2.0.60
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.
|
@@ -51,7 +51,7 @@ function SlideBoxContent(props) {
|
|
|
51
51
|
let channel = currentChannel;//for create mode
|
|
52
52
|
const isCreateSms = slidBoxContent === 'createTemplate' && channel === constants.SMS;
|
|
53
53
|
const isCreateMPush = slidBoxContent === 'createTemplate' && channel === constants.MOBILE_PUSH;
|
|
54
|
-
const isCreateCallTask = slidBoxContent === 'createTemplate' && channel ===
|
|
54
|
+
const isCreateCallTask = slidBoxContent === 'createTemplate' && channel === constants.CALL_TASK;
|
|
55
55
|
let isEditSms = false;
|
|
56
56
|
let isEditEmailWithId = false;
|
|
57
57
|
let isEmailEditWithContent = false;
|
|
@@ -236,7 +236,7 @@ class Creatives extends React.Component {
|
|
|
236
236
|
if (!isFullMode ) {
|
|
237
237
|
const isEmailCreate = slidBoxContent === 'createTemplate' && channel === constants.EMAIL && currentStep !== 'createTemplateContent';
|
|
238
238
|
const isCreate = (slidBoxContent === 'editTemplate' || slidBoxContent === 'createTemplate') && !isEmailCreate;
|
|
239
|
-
const isCallTask = channel ===
|
|
239
|
+
const isCallTask = channel === constants.CALL_TASK;
|
|
240
240
|
showFooter = (isCreate || (isEmailCreate && emailCreateMode) || slidBoxContent === 'preview') && !isCallTask;
|
|
241
241
|
} else if (channel === constants.EMAIL && isFullMode) {
|
|
242
242
|
const isEmailCreate = slidBoxContent === 'createTemplate' && channel === constants.EMAIL && currentStep !== 'createTemplateContent';
|
|
@@ -50,14 +50,16 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
50
50
|
constructor(props) {
|
|
51
51
|
super(props);
|
|
52
52
|
const defaultChannel = get(this, 'props.channel') || get(this, 'props.params.channel') || 'sms';
|
|
53
|
-
const
|
|
53
|
+
const defaultPanes = [
|
|
54
54
|
{content: <div></div>, tab: 'Sms', key: 'sms'},
|
|
55
55
|
{content: <div></div>, tab: 'Email', key: 'email'},
|
|
56
|
-
{content: <div></div>, tab: 'Call Task', key: 'calltask'},
|
|
57
56
|
// {content: this.getTemplatesComponent('wechat'), tab: 'Wechat', key: 'wechat'},
|
|
58
57
|
{content: <div></div>, tab: 'Mpush', key: 'mobilepush'},
|
|
59
58
|
];
|
|
60
|
-
|
|
59
|
+
if (!props.isFullMode) {
|
|
60
|
+
defaultPanes.push({content: <div></div>, tab: 'Call Task', key: 'call_task'});
|
|
61
|
+
}
|
|
62
|
+
const panes = this.setChannelContent(defaultChannel, defaultPanes);
|
|
61
63
|
this.state = {
|
|
62
64
|
selectedChannel: defaultChannel,
|
|
63
65
|
panes,
|
|
@@ -105,7 +107,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
105
107
|
if (!this.props.isFullMode) {
|
|
106
108
|
query = {type: 'embedded', module: 'library'};
|
|
107
109
|
}
|
|
108
|
-
return (channel === '
|
|
110
|
+
return (channel === 'call_task' ?
|
|
109
111
|
this.getCallTaskComponent() :
|
|
110
112
|
<Templates
|
|
111
113
|
key={channel}
|
|
@@ -124,13 +126,10 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
124
126
|
const panes = argsPanes.map((p) => {
|
|
125
127
|
const pane = p;
|
|
126
128
|
if (pane.key === selectedChannel) {
|
|
127
|
-
let channel =
|
|
129
|
+
let channel = selectedChannel;
|
|
128
130
|
if (channel === "mpush") {
|
|
129
131
|
channel = "mobilepush";
|
|
130
132
|
}
|
|
131
|
-
if (channel === 'call task') {
|
|
132
|
-
channel = "calltask";
|
|
133
|
-
}
|
|
134
133
|
pane.content = this.getTemplatesComponent(channel);
|
|
135
134
|
return pane;
|
|
136
135
|
}
|