@capillarytech/creatives-library 7.10.34 → 7.10.36

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.
@@ -239,7 +239,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
239
239
  this.setTemplateOptions(nextProps.Edit.mobilepushTemplates);
240
240
  }
241
241
  }
242
- if (nextProps.templateDetails && nextProps.templateDetails.name && _.isEmpty(this.state.editData) && (this.props.location.query.type !== 'embedded' || (!_.isEmpty(this.state.fullSchema) && selectedWeChatAccount))) {
242
+ if (nextProps.templateDetails && nextProps.templateDetails.name && (_.isEmpty(this.state.editData) || !this.state.editData.name) && (this.props.location.query.type !== 'embedded' || (!_.isEmpty(this.state.fullSchema) && selectedWeChatAccount))) {
243
243
  this.props = nextProps;
244
244
  const mode = nextProps.templateDetails.definition ? nextProps.templateDetails.definition.mode : nextProps.templateDetails.mode;
245
245
  const schema = mode === "text" ? this.state.fullSchema.textSchema : this.state.fullSchema.imageSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.10.34",
4
+ "version": "7.10.36",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -456,3 +456,8 @@ export const createBulkSMSTemplate = ({templates}) => {
456
456
  const url = `${API_ENDPOINT}/templates/bulk/sms`;
457
457
  return request(url, getAPICallObject('POST', templates));
458
458
  };
459
+
460
+ export const checkBulkDuplicates = (data) => {
461
+ const url = `${API_ENDPOINT}/templates/bulk/sms/checkDuplicates`;
462
+ return request(url, getAPICallObject('POST', data));
463
+ };
@@ -33,7 +33,7 @@ export default css`
33
33
  max-width: 564px;
34
34
  }
35
35
 
36
- .ad-section {
36
+ .fb-ad-manager-section {
37
37
  margin-bottom: ${CAP_SPACE_44};
38
38
  }
39
39
 
@@ -357,7 +357,7 @@ const Facebook = (props) => {
357
357
  />
358
358
  </div>
359
359
 
360
- <div className="ad-section">
360
+ <div className="fb-ad-manager-section">
361
361
  <CapHeading type="h4" style={{marginBottom: 17}}>
362
362
  <FormattedMessage
363
363
  {...messages.adManagerHeading}
@@ -7,6 +7,7 @@
7
7
  import {
8
8
  CREATE_TRAI_SMS_TEMPLATE_REQUEST,
9
9
  CLEAR_TRAI_SMS_TEMPLATE_CREATE_RESPONSE_REQUEST,
10
+ CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_REQUEST,
10
11
  } from './constants';
11
12
 
12
13
  export function createSMSTRAITemplates(templates, callback) {
@@ -17,9 +18,15 @@ export function createSMSTRAITemplates(templates, callback) {
17
18
  };
18
19
  }
19
20
 
20
-
21
21
  export function clearCreateResponse() {
22
22
  return {
23
23
  type: CLEAR_TRAI_SMS_TEMPLATE_CREATE_RESPONSE_REQUEST,
24
24
  };
25
25
  }
26
+
27
+ export function checkDuplicatesInDb(payload) {
28
+ return {
29
+ type: CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_REQUEST,
30
+ payload,
31
+ };
32
+ }
@@ -66,4 +66,14 @@ export const CREATE_TRAI_SMS_TEMPLATE_SUCCESS =
66
66
  export const CREATE_TRAI_SMS_TEMPLATE_FAILURE =
67
67
  'app/v2Containers/SmsTrai/Create/CREATE_TRAI_SMS_TEMPLATE_FAILURE';
68
68
  export const CLEAR_TRAI_SMS_TEMPLATE_CREATE_RESPONSE_REQUEST =
69
- 'app/v2Containers/SmsTrai/Create/CLEAR_TRAI_SMS_TEMPLATE_CREATE_RESPONSE_REQUEST';
69
+ 'app/v2Containers/SmsTrai/Create/CLEAR_TRAI_SMS_TEMPLATE_CREATE_RESPONSE_REQUEST';
70
+ export const CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_REQUEST =
71
+ 'app/v2Containers/SmsTrai/Create/CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_REQUEST';
72
+ export const CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_SUCCESS =
73
+ 'app/v2Containers/SmsTrai/Create/CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_SUCCESS';
74
+ export const CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_FAILURE =
75
+ 'app/v2Containers/SmsTrai/Create/CHECK_TRAI_SMS_DUPLICATE_TEMPLATE_NAME_FAILURE';
76
+ export const REQUEST = 'REQUEST';
77
+ export const SUCCESS = 'SUCCESS';
78
+ export const FAILURE = 'FAILURE';
79
+ export const DUPLICATE = 'Duplicate';