@capillarytech/creatives-library 7.17.39-alpha.4 → 7.17.39-alpha.5

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.17.39-alpha.4",
4
+ "version": "7.17.39-alpha.5",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -504,6 +504,7 @@ export class Creatives extends React.Component {
504
504
  }
505
505
  case constants.ZALO: {
506
506
  creativesTemplateData = {
507
+ type: constants.ZALO,
507
508
  ...templateData,
508
509
  };
509
510
  break;
@@ -812,6 +813,7 @@ export class Creatives extends React.Component {
812
813
  templateData = {
813
814
  ...template.value,
814
815
  };
816
+ templateData?.type && delete templateData.type;
815
817
  }
816
818
  }
817
819
  break;
@@ -159,14 +159,14 @@ export const Zalo = (props) => {
159
159
  updateTextAreaId(paramsData[0]?.name);
160
160
  };
161
161
 
162
- // in creatives
163
162
  useEffect(() => {
164
- isFullMode && !isEmpty(zaloTemplateInfoValue) && setDataForEdit(false);
163
+ setDataForEdit(false);
165
164
  }, [zaloTemplateInfoValue]);
166
165
 
167
- // in campaigns
168
166
  useEffect(() => {
169
- !isFullMode && !isEmpty(varMapped) && setDataForEdit(true);
167
+ if (!isEmpty(varMapped)) {
168
+ setDataForEdit(true);
169
+ }
170
170
  }, [varMapped]);
171
171
 
172
172
  useEffect(() => {
@@ -354,7 +354,7 @@ export const Zalo = (props) => {
354
354
  accountId: oa_id,
355
355
  accountName: username,
356
356
  templateConfigs: {
357
- _id: templateId,
357
+ id: templateId.toString(),
358
358
  name: templateName,
359
359
  template: templatePreviewUrl,
360
360
  varMapped: varMap,