@capillarytech/creatives-library 7.2.1 → 7.3.1

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.
@@ -1194,7 +1194,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1194
1194
 
1195
1195
  duplicateTemplate(template) {
1196
1196
  const duplicateObj = cloneDeep(template);
1197
- duplicateObj.name = `Copy of ${template.name} ${moment().format('MM-DD-YYYY hh:mma')}`;
1197
+ duplicateObj.name = `Copy of ${template.name} ${moment().format('MM-DD-YYYY HH:mm:ss')}`;
1198
1198
  delete duplicateObj._id;
1199
1199
  const params = {
1200
1200
  name: this.state.searchText,
@@ -24,6 +24,7 @@ import CallTask from '../CallTask';
24
24
  import Facebook from '../Facebook';
25
25
  import Viber from '../Viber';
26
26
  import Line from '../Line/Container';
27
+ import FTP from '../FTP';
27
28
  import Gallery from '../Assets/Gallery';
28
29
  import withStyles from '../../hoc/withStyles';
29
30
  import styles, { CapTabStyle } from './TemplatesV2.style';
@@ -72,6 +73,10 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
72
73
  if (!channelsToHide.includes('facebook')) {
73
74
  filteredPanes.push({content: <div></div>, tab: intl.formatMessage(messages.facebook), key: 'facebook'});
74
75
  }
76
+ if (!channelsToHide.includes('FTP')) {
77
+ filteredPanes.push({content: <></>, tab: intl.formatMessage(messages.FTP), key: 'ftp'});
78
+ defaultChannel = 'FTP';
79
+ }
75
80
  }
76
81
 
77
82
  filteredPanes = filteredPanes.map( (pane) => {
@@ -168,6 +173,10 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
168
173
  />
169
174
  )
170
175
 
176
+ getFTPComponent = () => (
177
+ <FTP mode={this.props.FTPMode} {...this.props} />
178
+ );
179
+
171
180
  getTemplatesComponent(channel) {
172
181
  // const templates = this.props.Templates[`${channel}Templates`];
173
182
  let query = {};
@@ -176,6 +185,9 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
176
185
  if (channel === 'line') {
177
186
  return this.getLineComponent();
178
187
  }
188
+ if (channel === 'ftp') {
189
+ return this.getFTPComponent();
190
+ }
179
191
  }
180
192
  const location = {pathname: `/${channel}`, search: '', query};
181
193
  switch (channel) {
@@ -274,6 +286,7 @@ TemplatesV2.propTypes = {
274
286
  messageDetails: PropTypes.object,
275
287
  cap: PropTypes.object,
276
288
  authData: PropTypes.object,
289
+ FTPMode: PropTypes.string,
277
290
  };
278
291
 
279
292
  TemplatesV2.defaultProps = {
@@ -34,6 +34,10 @@ export default defineMessages({
34
34
  id: 'creatives.containersV2.TemplatesV2.email',
35
35
  defaultMessage: 'Email',
36
36
  },
37
+ FTP: {
38
+ id: 'creatives.containersV2.TemplatesV2.FTP',
39
+ defaultMessage: 'FTP',
40
+ },
37
41
  pushNotification: {
38
42
  id: 'creatives.containersV2.TemplatesV2.pushNotification',
39
43
  defaultMessage: 'Push notification',