@capillarytech/creatives-library 0.1.1 → 0.1.3
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/components/FormBuilder/index.js +18 -13
- package/containers/Email/actions.js +3 -2
- package/containers/Email/index.js +35 -25
- package/containers/Email/sagas.js +2 -2
- package/containers/MobilePush/Create/index.js +12 -10
- package/containers/MobilePush/Edit/index.js +12 -10
- package/containers/Templates/index.js +15 -10
- package/containers/Templates/messages.js +4 -0
- package/package.json +1 -1
- package/services/api.js +2 -2
|
@@ -1998,10 +1998,11 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1998
1998
|
};
|
|
1999
1999
|
this.props.iframeParent.postMessage(JSON.stringify(response), '*');
|
|
2000
2000
|
const isLanguageSupport = this.props.location.query.isLanguageSupport || false;
|
|
2001
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
2001
2002
|
const module = this.props.location.query.module ? this.props.location.query.module : 'default';
|
|
2002
2003
|
this.props.router.push({
|
|
2003
2004
|
pathname: `/${this.props.schema.channel.toLowerCase()}/`,
|
|
2004
|
-
query: type === 'embedded' ? {type: 'embedded', module, isLanguageSupport} : {module, isLanguageSupport},
|
|
2005
|
+
query: type === 'embedded' ? {type: 'embedded', module, isLanguageSupport, isEdmSupport} : {module, isLanguageSupport, isEdmSupport},
|
|
2005
2006
|
});
|
|
2006
2007
|
} else if (id === "email-language-delete-modal") {
|
|
2007
2008
|
console.log('Delete languages ');
|
|
@@ -2085,26 +2086,30 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2085
2086
|
temp.id = template._id;
|
|
2086
2087
|
if (this.props.schema.channel.toLowerCase() === 'email') {
|
|
2087
2088
|
// console.log('Data Prepare');
|
|
2089
|
+
const imgSrc = template && template.versions && template.versions.base ? template.versions.base.preview_http_url : '';
|
|
2090
|
+
const ifPreviewGenerated = template && template.versions && template.versions.base ? template.versions.base.isPreviewGenerated : 0;
|
|
2091
|
+
const content = <img src={imgSrc || ''} alt="" />;
|
|
2092
|
+
console.log('qwerty template preview', imgSrc, template, ifPreviewGenerated, content);
|
|
2088
2093
|
temp.content = (
|
|
2089
2094
|
<div
|
|
2090
2095
|
className="sms-template-content">
|
|
2091
2096
|
<div className={`sms-text ${this.state.clickedItem === template._id ? 'sms-text-blurred' : ''}`}>
|
|
2092
|
-
|
|
2097
|
+
{content}
|
|
2093
2098
|
</div>
|
|
2094
2099
|
{/*template._id === this.state.clickedItem ? <CapButton onClick={(e) => this.handleEditClick(e, template._id)} className="edit-button" type="secondary">{type === 'embedded' ? this.props.intl.formatMessage(messages.selectButton) : this.props.intl.formatMessage(messages.editButton)}</CapButton> : ''*/}
|
|
2095
2100
|
{/*template._id === this.state.clickedItem ? <CapButton onClick={() => this.handlePreviewClick(template)} className="preview-button" type="cancel">{this.props.intl.formatMessage(messages.previewButton)}</CapButton> : ''*/}
|
|
2096
2101
|
</div>);
|
|
2097
2102
|
}
|
|
2098
|
-
temp.footer = (
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
);
|
|
2103
|
+
// temp.footer = (
|
|
2104
|
+
// <div className="footer-container">
|
|
2105
|
+
// <div className="card-title">
|
|
2106
|
+
// <span className="template-name" style={{ fontWeight: `${this.props.schema.channel.toLowerCase() === 'wechat' ? '400' : '600'}` }}>
|
|
2107
|
+
// { template && template.versions && template.versions.history && template.versions.history.length > 1 && this.props.schema.channel.toLowerCase() !== 'mobilepush' && <i style={{fontSize: '16px', margin: '0 8px 0 0', verticalAlign: 'middle'}} className="material-icons">filter_none</i>}
|
|
2108
|
+
// {template.name}
|
|
2109
|
+
// </span>
|
|
2110
|
+
// </div>
|
|
2111
|
+
// </div>
|
|
2112
|
+
// );
|
|
2108
2113
|
items.push(temp);
|
|
2109
2114
|
return true;
|
|
2110
2115
|
});
|
|
@@ -3134,7 +3139,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3134
3139
|
this.props.schema ? this.renderForm() : ''
|
|
3135
3140
|
}
|
|
3136
3141
|
<SlideBox
|
|
3137
|
-
header={(<h3>
|
|
3142
|
+
header={(<h3>Layout Selection</h3>)}
|
|
3138
3143
|
width={60}
|
|
3139
3144
|
content={cmsTemplateSelectionContent}
|
|
3140
3145
|
show={this.props.showEdmEmailTemplates}
|
|
@@ -30,14 +30,15 @@ export function getAllAssets(assetType, queryParams) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export function getCmsSetting(cmsType, projectId, cmsMode, langId) {
|
|
34
|
-
console.log('cms actions', langId);
|
|
33
|
+
export function getCmsSetting(cmsType, projectId, cmsMode, langId, isEdmSupport) {
|
|
34
|
+
console.log('cms actions', langId, isEdmSupport);
|
|
35
35
|
return {
|
|
36
36
|
type: types.GET_CMS_EDITOR_DETAILS_REQUEST,
|
|
37
37
|
cmsType,
|
|
38
38
|
projectId,
|
|
39
39
|
cmsMode,
|
|
40
40
|
langId,
|
|
41
|
+
isEdmSupport,
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -715,12 +715,13 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
715
715
|
// "template-content": (this.props.Templates.selectedEmailLayout ? this.props.Templates.selectedEmailLayout : ''),
|
|
716
716
|
// };
|
|
717
717
|
// if (this.props.Templates.CmsSettings) {}
|
|
718
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
718
719
|
if (!_.isEmpty(this.props.Templates.edmTemplate) && this.props.Templates.edmTemplate.versions.base.is_drag_drop) {
|
|
719
720
|
this.setState({isDragDrop: true});
|
|
720
721
|
if (this.props.params.id) {
|
|
721
|
-
this.props.actions.getCmsSetting('edm', this.props.Templates.edmTemplate.versions.base.drag_drop_id, 'open');
|
|
722
|
+
this.props.actions.getCmsSetting('edm', this.props.Templates.edmTemplate.versions.base.drag_drop_id, 'open', undefined, isEdmSupport);
|
|
722
723
|
} else {
|
|
723
|
-
this.props.actions.getCmsSetting('edm', this.props.Templates.edmTemplate.versions.base.drag_drop_id, 'create');
|
|
724
|
+
this.props.actions.getCmsSetting('edm', this.props.Templates.edmTemplate.versions.base.drag_drop_id, 'create', undefined, isEdmSupport);
|
|
724
725
|
}
|
|
725
726
|
}
|
|
726
727
|
console.log('Form Data ', formData);
|
|
@@ -934,9 +935,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
934
935
|
const module = this.props.location.query.module ? this.props.location.query.module : 'default';
|
|
935
936
|
const type = this.props.location.query.type;
|
|
936
937
|
const isLanguageSupport = this.props.location.query.isLanguageSupport || false;
|
|
938
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
937
939
|
this.props.router.push({
|
|
938
940
|
pathname: `/email`,
|
|
939
|
-
query: type === 'embedded' ? {type: 'embedded', module, isLanguageSupport} : {module, isLanguageSupport},
|
|
941
|
+
query: type === 'embedded' ? {type: 'embedded', module, isLanguageSupport, isEdmSupport} : {module, isLanguageSupport, isEdmSupport},
|
|
940
942
|
});
|
|
941
943
|
}
|
|
942
944
|
if (nextProps.Email.createTemplateError && !_.isEqual(nextProps.Email.createTemplateError, this.props.Email.createTemplateError)) {
|
|
@@ -1015,7 +1017,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1015
1017
|
if ( !_.isEqual(nextProps.Email.uploadAssetSuccess, this.props.Email.uploadAssetSuccess) && nextProps.Email.uploadAssetSuccess) {
|
|
1016
1018
|
console.log('Post on will receive props');
|
|
1017
1019
|
const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
|
|
1018
|
-
|
|
1020
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
1021
|
+
if (isDragDrop && isEdmSupport) {
|
|
1019
1022
|
console.log('Handle EDM ', this.edmEvent, JSON.parse(this.edmEvent.data)._dynId, nextProps.Email.uploadedAssetData.metaInfo.secure_file_path);
|
|
1020
1023
|
const evtData = JSON.parse(this.edmEvent.data);
|
|
1021
1024
|
if (evtData.action === 'editBackground') {
|
|
@@ -1140,7 +1143,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1140
1143
|
console.log('On Tag selection ', data, currentTab, value);
|
|
1141
1144
|
const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
|
|
1142
1145
|
const formData = _.cloneDeep(this.state.formData);
|
|
1143
|
-
|
|
1146
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
1147
|
+
console.log('isEdmsupport', isEdmSupport);
|
|
1148
|
+
if (isDragDrop && isEdmSupport) {
|
|
1144
1149
|
const msg = {
|
|
1145
1150
|
action: "InsertToCursor",
|
|
1146
1151
|
content: `{{${data}}}`,
|
|
@@ -1244,6 +1249,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1244
1249
|
|
|
1245
1250
|
setEditData(editData) {
|
|
1246
1251
|
console.log('Edit Data is ', editData);
|
|
1252
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
1247
1253
|
const formData = _.cloneDeep(this.state.formData);
|
|
1248
1254
|
|
|
1249
1255
|
const tabIndex = this.state.currentTab + 1;
|
|
@@ -1389,7 +1395,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1389
1395
|
// }
|
|
1390
1396
|
if (language && editData.versions.base[language].is_drag_drop) {
|
|
1391
1397
|
console.log('making edm calls again');
|
|
1392
|
-
this.props.actions.getCmsSetting('edm', editData.versions.base[language].drag_drop_id, 'open', language);
|
|
1398
|
+
this.props.actions.getCmsSetting('edm', editData.versions.base[language].drag_drop_id, 'open', language, isEdmSupport);
|
|
1393
1399
|
}
|
|
1394
1400
|
});
|
|
1395
1401
|
console.log('final form data edit', formData);
|
|
@@ -1609,6 +1615,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1609
1615
|
}
|
|
1610
1616
|
|
|
1611
1617
|
copyPrimaryLanguage = () => {
|
|
1618
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
1612
1619
|
console.log('copy primary language');
|
|
1613
1620
|
this.setState({addLanguageType: "copyPrimaryLanguage"}, () => {
|
|
1614
1621
|
this.setState({showModal: false});
|
|
@@ -1616,7 +1623,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1616
1623
|
const currentTab = this.state.currentTab - 1;
|
|
1617
1624
|
const baseLanguage = this.props.Global.currentOrgDetails.basic_details.base_language ? this.props.Global.currentOrgDetails.basic_details.base_language : 'en';
|
|
1618
1625
|
if (formData[currentTab][baseLanguage].is_drag_drop) {
|
|
1619
|
-
this.props.actions.getCmsSetting('edm', formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage);
|
|
1626
|
+
this.props.actions.getCmsSetting('edm', formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport);
|
|
1620
1627
|
}
|
|
1621
1628
|
});
|
|
1622
1629
|
}
|
|
@@ -1776,8 +1783,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1776
1783
|
};
|
|
1777
1784
|
// const baseData = {};
|
|
1778
1785
|
_.forEach(formData.base, (content, index) => {
|
|
1779
|
-
|
|
1780
|
-
if (content.constructor === Object) {
|
|
1786
|
+
if (content && content.constructor === Object) {
|
|
1781
1787
|
const tmpData = {};
|
|
1782
1788
|
if (_.isEmpty(content)) {
|
|
1783
1789
|
return;
|
|
@@ -1818,24 +1824,24 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1818
1824
|
this.startTemplateCreation(type.value);
|
|
1819
1825
|
break;
|
|
1820
1826
|
case "edit":
|
|
1827
|
+
this.edmEvent = e;
|
|
1821
1828
|
if (type.elementJson.type === "IMAGE") {
|
|
1822
1829
|
console.log('Data Inside ', type);
|
|
1823
1830
|
this.onImageSelect();
|
|
1824
1831
|
}
|
|
1825
|
-
this.edmEvent = e;
|
|
1826
1832
|
break;
|
|
1827
1833
|
case "editBackground":
|
|
1834
|
+
this.edmEvent = e;
|
|
1828
1835
|
if (type.elementJson.type === "BOX" || type.elementJson.type === "BUTTON" || type.elementJson.type === "GENERAL") {
|
|
1829
1836
|
console.log('Data Inside ', type);
|
|
1830
1837
|
this.onImageSelect();
|
|
1831
1838
|
}
|
|
1832
|
-
this.edmEvent = e;
|
|
1833
1839
|
break;
|
|
1834
1840
|
case "create":
|
|
1835
1841
|
this.edmEvent = e;
|
|
1836
1842
|
break;
|
|
1837
1843
|
case "select":
|
|
1838
|
-
this.edmEvent = e;
|
|
1844
|
+
//this.edmEvent = e;
|
|
1839
1845
|
break;
|
|
1840
1846
|
case "startLoading":
|
|
1841
1847
|
this.startLoading(type.edit);
|
|
@@ -1904,7 +1910,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1904
1910
|
} else if (this.state.mode === 'preview' || this.state.mode === 'switchEditor') {
|
|
1905
1911
|
this.props.actions.getCmsData('edm', this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].drag_drop_id);
|
|
1906
1912
|
if (this.state.mode === 'switchEditor') {
|
|
1907
|
-
|
|
1913
|
+
let schema = _.cloneDeep(this.state.schema);
|
|
1908
1914
|
const formData = _.cloneDeep(this.state.formData);
|
|
1909
1915
|
_.forEach(schema.containers, (container, index) => {
|
|
1910
1916
|
if (parseInt(index, 10) === (this.state.currentTab - 1)) {
|
|
@@ -1916,7 +1922,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1916
1922
|
temp.tabBarExtraContent.sections[0].inputFields[0].cols[4].content.sections[0].inputFields[3].cols[0].style = {display: "none"};
|
|
1917
1923
|
}
|
|
1918
1924
|
});
|
|
1919
|
-
|
|
1925
|
+
schema = this.showInsertImageButton(schema);
|
|
1920
1926
|
console.log('Handle OK ', schema);
|
|
1921
1927
|
this.setState({ schema, showConfirmationModal: false, isSchemaChanged: true }, () => {
|
|
1922
1928
|
this.injectEvents(schema);
|
|
@@ -1975,14 +1981,14 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1975
1981
|
this.setState({schema, isSchemaChanged: true});
|
|
1976
1982
|
}
|
|
1977
1983
|
|
|
1978
|
-
|
|
1979
|
-
const schema = _.cloneDeep(this.state.schema);
|
|
1984
|
+
showInsertImageButton = (passedSchema) => {
|
|
1985
|
+
const schema = passedSchema || _.cloneDeep(this.state.schema);
|
|
1980
1986
|
_.forEach(schema.containers, (container) => {
|
|
1981
1987
|
if (container.isActive) {
|
|
1982
1988
|
_.forEach(container.tabBarExtraContent.sections[0].inputFields[0].cols, (containerInputFieldCol) => {
|
|
1983
|
-
if (containerInputFieldCol.id === '
|
|
1989
|
+
if (containerInputFieldCol.id === 'insert-image') {
|
|
1984
1990
|
const newContainerInputFieldCol = containerInputFieldCol;
|
|
1985
|
-
newContainerInputFieldCol.style.display = "
|
|
1991
|
+
newContainerInputFieldCol.style.display = "";
|
|
1986
1992
|
}
|
|
1987
1993
|
});
|
|
1988
1994
|
}
|
|
@@ -2004,11 +2010,12 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2004
2010
|
handleOnItemClick = (isSelected, id) => {
|
|
2005
2011
|
console.log('Dummy ', isSelected, id, event);
|
|
2006
2012
|
const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
|
|
2013
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
2007
2014
|
if (isSelected) {
|
|
2008
2015
|
const data = _.find(this.props.Email.assetList, {_id: id});
|
|
2009
2016
|
console.log('Found Data ', data, this.state.isDragDrop);
|
|
2010
2017
|
if (data) {
|
|
2011
|
-
if (isDragDrop) {
|
|
2018
|
+
if (isDragDrop && isEdmSupport) {
|
|
2012
2019
|
console.log('Handle EDM ', isSelected, id, this.edmEvent, JSON.parse(this.edmEvent.data)._dynId, data.metaInfo.secure_file_path);
|
|
2013
2020
|
const evtData = JSON.parse(this.edmEvent.data);
|
|
2014
2021
|
if (evtData.action === 'editBackground') {
|
|
@@ -2401,9 +2408,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2401
2408
|
const type = this.props.location.query.type;
|
|
2402
2409
|
const module = this.props.location.query.module ? this.props.location.query.module : 'default';
|
|
2403
2410
|
const isLanguageSupport = this.props.location.query.isLanguageSupport || false;
|
|
2411
|
+
const isEdmSupport = this.props.location.query.isEdmSupport !== false || false;
|
|
2404
2412
|
this.props.router.push({
|
|
2405
2413
|
pathname: `/email/`,
|
|
2406
|
-
query: type === 'embedded' ? {type: 'embedded', module, isLanguageSupport} : {module, isLanguageSupport},
|
|
2414
|
+
query: type === 'embedded' ? {type: 'embedded', module, isLanguageSupport, isEdmSupport} : {module, isLanguageSupport, isEdmSupport},
|
|
2407
2415
|
});
|
|
2408
2416
|
}
|
|
2409
2417
|
|
|
@@ -2480,11 +2488,11 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2480
2488
|
if (hideLang && !ifLangSupported) {
|
|
2481
2489
|
const newContainerInputFieldCol = containerInputFieldCol;
|
|
2482
2490
|
hideLang = false;
|
|
2483
|
-
newContainerInputFieldCol.offset =
|
|
2491
|
+
newContainerInputFieldCol.offset = 16;
|
|
2484
2492
|
} else if (hideLang) {
|
|
2485
2493
|
const newContainerInputFieldCol = containerInputFieldCol;
|
|
2486
2494
|
hideLang = false;
|
|
2487
|
-
newContainerInputFieldCol.offset =
|
|
2495
|
+
newContainerInputFieldCol.offset = 13;
|
|
2488
2496
|
}
|
|
2489
2497
|
if (containerInputFieldCol.id === 'add-language-button' && !ifLangSupported) {
|
|
2490
2498
|
const newContainerInputFieldCol = containerInputFieldCol;
|
|
@@ -2584,6 +2592,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2584
2592
|
if (_.isEmpty(data)) {
|
|
2585
2593
|
return;
|
|
2586
2594
|
}
|
|
2595
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
2587
2596
|
|
|
2588
2597
|
//const data = {"base":{"subject":"deded","html_content":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html> <head> \t<title>Scheduled Report</title> \t<meta http-equiv=\"Content-Type\" content=\"text/html charset=UTF-8\"/> \t<style type=\"text/css\">.container-main p{line-height: 1.6;}@media screen and (max-width: 480px){a.brand{font-size: 35px;}}@media screen and (max-width: 480px){.container-main a{text-align: center;}a.brand{text-align: center;}}a.brand img{vertical-align: middle; padding: 0 8px 0 0; width: 250px;}@media screen and (max-width: 480px){a.brand img{width: 220px !important;}}@media screen and (max-width: 480px){.container-content{padding: 15px 20px; font-size: 12px !important;} .email-footer{font-size: 12px !important;}}.container-content table{border-collapse: collapse;}.container-content table tr td p{margin: 5px;}.container-content table tr td p span{font-weight: bold; padding: 0 3px 0 0;}@media screen and (max-width: 480px){a.btn-view-reports{margin: 25px auto 10px;}}a.btn-view-reports:hover{background: grey; color: #fff;}.email-footer p{text-align: center; font-size: 12px; color: grey;}.email-footer p a{color: blue; cursor: pointer;}.email-footer p a:hover{color: grey;} \t</style> </head> <body><center>\n\t\t\t\t\t\t\t\t\t\tIf you have difficulties viewing this mail, click\n\t\t\t\t\t\t\t\t\t\t<a href=\"https://nightly.capillary.in/business_controller/campaigns/emails/links/view.php?utrack={{user_id_b64}}&mtrack={{outbox_id_b64}}\" style = \"text-decoration: underline;color: #369;\" target=\"_blank\">here</a><br/>\n\t\t\t\t\t\t\t\t\t</center> <table class=\"container-main\" style=\"background:#eeeeee; color:#000000; font-family:'Open Sans',sans-serif; font-size:16px; font-weight:400; margin:0 auto; max-width:978px; padding:15px; width:100%\"> \t<tbody> \t\t<tr> \t\t\t<td> \t\t\t<table class=\"email-header\" style=\"background:#ffffff; margin:0 0 5px; padding:17px 0; width:100%\"> \t\t\t\t<tbody> \t\t\t\t\t<tr> \t\t\t\t\t\t<td style=\"width:100%\"><a class=\"brand\" href=\"#\" style=\"display: table; margin: 0 auto; text-decoration: none; font-size: 37px; color: grey;\"><img alt=\"Capillary Technologies\" src=\"https://s3.amazonaws.com/fileservice.in/intouch_creative_assets/60221e2020ba572f6787.png\" /> </a></td> \t\t\t\t\t</tr> \t\t\t\t</tbody> \t\t\t</table> \t\t\t<div class=\"container-content\" style=\"background:#ffffff; padding:20px 35px\"> \t\t\t<p>Hi Ashish Karan,</p> \t\t\t<p>You've received a new scheduled report. {{unsubscribe}}</p> \t\t\t<table> \t\t\t\t<tbody> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Org Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>autotest1</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Scheduled Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>Schedule Test</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Time Period: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>1st Jan, 2017 to 24th Sep, 2017</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Report Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>redDart Report</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t</tbody> \t\t\t</table> \t\t\t<p style=\"font-size:15px; margin-top:25px\">By clicking "View Report" you will be redirected to Capillary Analytics to view the automated report.</p> \t\t\t<a href=\"https://nightly.capillary.in/analytics/v2/report/59c37820e626a10df78c8d91?snapshot=59c8bce750f4e75ec8b0d24c\" style=\"background: #009e0f; text-align: center; color: #fff; font-size: 16px; padding: 10px 25px; cursor: pointer; text-decoration: none; display: block; width: 120px; margin: 25px auto 15px;\" target=\"_blank\">View Report</a></div> \t\t\t<div class=\"email-footer\"> \t\t\t<p style=\"color:grey; font-size:12px; text-align:center\">You've received this mail because you subscribed to Schedule Test schedule of redDart Report. <a href=\"https://nightly.capillary.in/analytics/v2/report/59c37820e626a10df78c8d91/schedule/59c8bce750f4e75ec8b0d24c/unsubscribeSchedule\" style=\"color: blue; cursor: pointer;\" target=\"_blank\">Unsubscribe</a></p> \t\t\t<p><a href=\"http://capillarytech.com/privacy-policy/\" target=\"_blank\">Privacy Policy</a> | <a href=\"http://capillarytech.com/about-us/\" target=\"_blank\">About Capillary</a></p> \t\t\t</div> \t\t\t</td> \t\t</tr> \t</tbody> </table> </body> </html> ","is_drag_drop":false,"drag_drop_id":null},"secondary_templates":[{"is_preview_generated":null,"preview_url":null,"is_favourite":null,"is_drag_drop":false,"drag_drop_id":null,"scope":null,"tag":null,"is_default":null,"html_content":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html> <head> \t<title>Scheduled Report</title> \t<meta http-equiv=\"Content-Type\" content=\"text/html charset=UTF-8\"/> \t<style type=\"text/css\">.container-main p{line-height: 1.6;}@media screen and (max-width: 480px){a.brand{font-size: 35px;}}@media screen and (max-width: 480px){.container-main a{text-align: center;}a.brand{text-align: center;}}a.brand img{vertical-align: middle; padding: 0 8px 0 0; width: 250px;}@media screen and (max-width: 480px){a.brand img{width: 220px !important;}}@media screen and (max-width: 480px){.container-content{padding: 15px 20px; font-size: 12px !important;} .email-footer{font-size: 12px !important;}}.container-content table{border-collapse: collapse;}.container-content table tr td p{margin: 5px;}.container-content table tr td p span{font-weight: bold; padding: 0 3px 0 0;}@media screen and (max-width: 480px){a.btn-view-reports{margin: 25px auto 10px;}}a.btn-view-reports:hover{background: grey; color: #fff;}.email-footer p{text-align: center; font-size: 12px; color: grey;}.email-footer p a{color: blue; cursor: pointer;}.email-footer p a:hover{color: grey;} \t</style> </head> <body><center>\n\t\t\t\t\t\t\t\t\t\tIf you have difficulties viewing this mail, click\n\t\t\t\t\t\t\t\t\t\t<a href=\"https://nightly.capillary.in/business_controller/campaigns/emails/links/view.php?utrack={{user_id_b64}}&mtrack={{outbox_id_b64}}\" style = \"text-decoration: underline;color: #369;\" target=\"_blank\">here</a><br/>\n\t\t\t\t\t\t\t\t\t</center> <table class=\"container-main\" style=\"background:#eeeeee; color:#000000; font-family:'Open Sans',sans-serif; font-size:16px; font-weight:400; margin:0 auto; max-width:978px; padding:15px; width:100%\"> \t<tbody> \t\t<tr> \t\t\t<td> \t\t\t<table class=\"email-header\" style=\"background:#ffffff; margin:0 0 5px; padding:17px 0; width:100%\"> \t\t\t\t<tbody> \t\t\t\t\t<tr> \t\t\t\t\t\t<td style=\"width:100%\"><a class=\"brand\" href=\"#\" style=\"display: table; margin: 0 auto; text-decoration: none; font-size: 37px; color: grey;\"><img alt=\"Capillary Technologies\" src=\"https://s3.amazonaws.com/fileservice.in/intouch_creative_assets/60221e2020ba572f6787.png\" /> </a></td> \t\t\t\t\t</tr> \t\t\t\t</tbody> \t\t\t</table> \t\t\t<div class=\"container-content\" style=\"background:#ffffff; padding:20px 35px\"> \t\t\t<p>Hi Ashish Karan,</p> \t\t\t<p>You've received a new scheduled report. {{unsubscribe}}</p> \t\t\t<table> \t\t\t\t<tbody> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Org Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>autotest1</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Scheduled Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>Schedule Test</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Time Period: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>1st Jan, 2017 to 24th Sep, 2017</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Report Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>redDart Report</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t</tbody> \t\t\t</table> \t\t\t<p style=\"font-size:15px; margin-top:25px\">By clicking "View Report" you will be redirected to Capillary Analytics to view the automated report.</p> \t\t\t<a href=\"https://nightly.capillary.in/analytics/v2/report/59c37820e626a10df78c8d91?snapshot=59c8bce750f4e75ec8b0d24c\" style=\"background: #009e0f; text-align: center; color: #fff; font-size: 16px; padding: 10px 25px; cursor: pointer; text-decoration: none; display: block; width: 120px; margin: 25px auto 15px;\" target=\"_blank\">View Report</a></div> \t\t\t<div class=\"email-footer\"> \t\t\t<p style=\"color:grey; font-size:12px; text-align:center\">You've received this mail because you subscribed to Schedule Test schedule of redDart Report. <a href=\"https://nightly.capillary.in/analytics/v2/report/59c37820e626a10df78c8d91/schedule/59c8bce750f4e75ec8b0d24c/unsubscribeSchedule\" style=\"color: blue; cursor: pointer;\" target=\"_blank\">Unsubscribe</a></p> \t\t\t<p><a href=\"http://capillarytech.com/privacy-policy/\" target=\"_blank\">Privacy Policy</a> | <a href=\"http://capillarytech.com/about-us/\" target=\"_blank\">About Capillary</a></p> \t\t\t</div> \t\t\t</td> \t\t</tr> \t</tbody> </table> </body> </html> ","secondary_template_id":"9500","is_base_template":1,"language_name":"English","language":"English","lang_id":"69"}],"edit":true,"tags":[]};
|
|
2589
2598
|
// const data = {edit: true, "base":{"subject":"testsubject","html_content":"<html> <head> \t<meta charset=\"utf-8\" /> \t<title>Aster Secure</title> \t<style type=\"text/css\">#outlook a { padding: 0; } body { width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 0; padding: 0;} .ExternalClass { width: 100%; } .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } #backgroundTable { margin: 0; padding: 0; width: 100% !important; line-height: 100% !important; } img { outline: none; text-decoration: none; border: none; -ms-interpolation-mode: bicubic; } a img { border: none; } .image_fix { display: block; } p { margin: 0px 0px !important; } table td { border-collapse: collapse; } table { border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } table[class=full] { width: 100%; clear: both; } table[class=spacetable] { height: 176px; } table[class=spacetable1] { height: 431px; } table[class=spacetable2] { height: 50px; } table[class=spacetable3] { height: 55px; } \t @media only screen and (min-width: 320px) and (max-width: 540px) { a[href^=\"tel\"], a[href^=\"sms\"] { text-decoration: none; color: #ffffff; pointer-events: none; cursor: default; } .mobile_link a[href^=\"tel\"], .mobile_link a[href^=\"sms\"] { text-decoration: default; color: #ffffff !important; pointer-events: auto; cursor: default; } img[class=logo] { width: 132px!important; } img[class=shop] { width:53px!important; text-align: center!important; } table[class=innerlayer] { width: 300px !important; text-align: center; } img[class=spot] { width: 65px!important; } img[class=banner] { width: 290px !important; text-align: center; } img[class=banner1] { width: 229px!important; } img[class=click] { width:55px!important; } img[class=border] { width: 290px!important; } td[class=txtfont] { font-size:11px!important; height:50px!important; line-height: 15px!important; } \t span[class=txtfont] { font-size:9px!important; height:98px!important; line-height:23px!important; } \t td[class=txtfont1] { font-size:11px!important; height:40px!important; line-height: 14px!important; } img[class=left] { width:195px!important; } img[class=right] { width:46px!important; } \t \t td[class=txtfont3] { font-size:8px!important;} \ttd[class=txtfont2] { font-size:6px!important; line-height:9px!important; } td[class=txtbold] { font-size: 21px!important; } img[class=gap] { width:92px!important; } img[class=gap1] { width: 20px!important; } table[class=social] { width: 99% !important; } img[class=fb] { width:20px!important; } img[class=in] { width:21px!important; } img[class=tw] { width:20px!important; } img[class=pin] { width:41px!important; } \t img[class=and] { width:81px!important; } img[class=my] { width: 44px!important; } \t img[class=you] { width:21px!important; } img[class=store] { width:65px!important; } \t \t img[class=snap] { width:24px!important; } td[class=textlen] { height:52px!important; } \ttd[class=tdlen] \t{ \theight:35px!important;font-size: 10px !important; \t} \t\t\timg[class=a] { width: 42px!important; } \t\t\timg[class=b] { width: 22px!important; } \t\t\timg[class=c] { width: 72px!important; } \t\t\timg[class=d] { width: 50px!important; } \t\t\timg[class=e] { width: 56px!important; } \t\t\timg[class=f] { width: 56px!important; } \t\t\t} \t</style> </head> <body><center>\n\t\t\t\t\t\t\t\t\t\tIf you have difficulties viewing this mail, click\n\t\t\t\t\t\t\t\t\t\t<a href=\"https://nightly.capillary.in/business_controller/campaigns/emails/links/view.php?utrack={{user_id_b64}}&mtrack={{outbox_id_b64}}\" style = \"text-decoration: underline;color: #369;\" target=\"_blank\">here</a><br/>\n\t\t\t\t\t\t\t\t\t</center> <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"outerlayer\" style=\"width:650px\"> \t<tbody> \t\t<tr> \t\t\t<td> \t\t\t<table align=\"center\" bgcolor=\"#fff\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"outerlayer\" style=\"width:650px\"> \t\t\t\t<tbody> \t\t\t\t\t<tr> \t\t\t\t\t\t<td class=\"txtfont2\" height=\"40\" style=\"font-family: Verdana, Geneva, sans-serif; text-align:center; font-size:11px; color:gray; line-height:13px;\" width=\"600\">Shop at Aster Pharmacy this month and You could be the next lucky winner!</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><a href=\"#\" style=\"pointer-events:none;\"><img class=\"banner\" src=\"https://s3-eu-west-1.amazonaws.com/fs.capillary.eu/intouch_creative_assets/890bdffee3b2322d8ec7.jpg\" style=\"border:none; display:block\" /></a></td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td class=\"txtfont2\" height=\"40\" style=\"font-family: Verdana, Geneva, sans-serif; text-align:center; font-size:11px; color:gray; line-height:13px;\" width=\"600\">To remove your email address from our mailing list , please click on {{unsubscribe}}</td> \t\t\t\t\t</tr> \t\t\t\t</tbody> \t\t\t</table> \t\t\t</td> \t\t</tr> \t</tbody> </table> </body> </html> ","is_drag_drop":0,"drag_drop_id":null},"secondary_templates":[{"is_preview_generated":null,"preview_url":null,"is_favourite":null,"is_drag_drop":false,"drag_drop_id":null,"scope":null,"tag":null,"is_default":null,"html_content":"<html>\r\n<head>\r\n\t<meta charset=\"utf-8\" />\r\n\t<title>Aster Secure</title>\r\n\t<style type=\"text/css\">#outlook a { padding: 0; } body { width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 0; padding: 0;} .ExternalClass { width: 100%; } .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } #backgroundTable { margin: 0; padding: 0; width: 100% !important; line-height: 100% !important; } img { outline: none; text-decoration: none; border: none; -ms-interpolation-mode: bicubic; } a img { border: none; } .image_fix { display: block; } p { margin: 0px 0px !important; } table td { border-collapse: collapse; } table { border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } table[class=full] { width: 100%; clear: both; } table[class=spacetable] { height: 176px; } table[class=spacetable1] { height: 431px; } table[class=spacetable2] { height: 50px; } table[class=spacetable3] { height: 55px; } \t @media only screen and (min-width: 320px) and (max-width: 540px) { a[href^=\"tel\"], a[href^=\"sms\"] { text-decoration: none; color: #ffffff; pointer-events: none; cursor: default; } .mobile_link a[href^=\"tel\"], .mobile_link a[href^=\"sms\"] { text-decoration: default; color: #ffffff !important; pointer-events: auto; cursor: default; } img[class=logo] { width: 132px!important; } img[class=shop] { width:53px!important; text-align: center!important; } table[class=innerlayer] { width: 300px !important; text-align: center; } img[class=spot] { width: 65px!important; } img[class=banner] { width: 290px !important; text-align: center; } img[class=banner1] { width: 229px!important; } img[class=click] { width:55px!important; } img[class=border] { width: 290px!important; } td[class=txtfont] { font-size:11px!important; height:50px!important; line-height: 15px!important; } \t span[class=txtfont] { font-size:9px!important; height:98px!important; line-height:23px!important; } \t td[class=txtfont1] { font-size:11px!important; height:40px!important; line-height: 14px!important; } img[class=left] { width:195px!important; } img[class=right] { width:46px!important; } \t \t td[class=txtfont3] { font-size:8px!important;} \ttd[class=txtfont2] { font-size:6px!important; line-height:9px!important; } td[class=txtbold] { font-size: 21px!important; } img[class=gap] { width:92px!important; } img[class=gap1] { width: 20px!important; } table[class=social] { width: 99% !important; } img[class=fb] { width:20px!important; } img[class=in] { width:21px!important; } img[class=tw] { width:20px!important; } img[class=pin] { width:41px!important; } \t img[class=and] { width:81px!important; } img[class=my] { width: 44px!important; } \t img[class=you] { width:21px!important; } img[class=store] { width:65px!important; } \t \t img[class=snap] { width:24px!important; } td[class=textlen] { height:52px!important; } \ttd[class=tdlen] \t{ \theight:35px!important;font-size: 10px !important; \t} \t\t\timg[class=a] { width: 42px!important; } \t\t\timg[class=b] { width: 22px!important; } \t\t\timg[class=c] { width: 72px!important; } \t\t\timg[class=d] { width: 50px!important; } \t\t\timg[class=e] { width: 56px!important; } \t\t\timg[class=f] { width: 56px!important; } \t\t\t}\r\n\t</style>\r\n</head>\r\n<body>\r\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"outerlayer\" style=\"width:650px\">\r\n\t<tbody>\r\n\t\t<tr>\r\n\t\t\t<td>\r\n\t\t\t<table align=\"center\" bgcolor=\"#fff\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"outerlayer\" style=\"width:650px\">\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"txtfont2\" height=\"40\" style=\"font-family: Verdana, Geneva, sans-serif; text-align:center; font-size:11px; color:gray; line-height:13px;\" width=\"600\">Shop at Aster Pharmacy this month and You could be the next lucky winner!</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td><a href=\"#\" style=\"pointer-events:none;\"><img class=\"banner\" src=\"https://s3-eu-west-1.amazonaws.com/fs.capillary.eu/intouch_creative_assets/890bdffee3b2322d8ec7.jpg\" style=\"border:none; display:block\" /></a></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"txtfont2\" height=\"40\" style=\"font-family: Verdana, Geneva, sans-serif; text-align:center; font-size:11px; color:gray; line-height:13px;\" width=\"600\">To remove your email address from our mailing list , please click on {{unsubscribe}}</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n</body>\r\n</html>\r\n","secondary_template_id":"9584","is_base_template":1,"language_name":"English","language":"English","lang_id":"69"}, {"is_preview_generated":null,"preview_url":null,"is_favourite":null,"is_drag_drop":false,"drag_drop_id":null,"scope":null,"tag":null,"is_default":null,"html_content":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html> <head> \t<title>Scheduled Report</title> \t<meta http-equiv=\"Content-Type\" content=\"text/html charset=UTF-8\"/> \t<style type=\"text/css\">.container-main p{line-height: 1.6;}@media screen and (max-width: 480px){a.brand{font-size: 35px;}}@media screen and (max-width: 480px){.container-main a{text-align: center;}a.brand{text-align: center;}}a.brand img{vertical-align: middle; padding: 0 8px 0 0; width: 250px;}@media screen and (max-width: 480px){a.brand img{width: 220px !important;}}@media screen and (max-width: 480px){.container-content{padding: 15px 20px; font-size: 12px !important;} .email-footer{font-size: 12px !important;}}.container-content table{border-collapse: collapse;}.container-content table tr td p{margin: 5px;}.container-content table tr td p span{font-weight: bold; padding: 0 3px 0 0;}@media screen and (max-width: 480px){a.btn-view-reports{margin: 25px auto 10px;}}a.btn-view-reports:hover{background: grey; color: #fff;}.email-footer p{text-align: center; font-size: 12px; color: grey;}.email-footer p a{color: blue; cursor: pointer;}.email-footer p a:hover{color: grey;} \t</style> </head> <body><center>\n\t\t\t\t\t\t\t\t\t\tIf you have difficulties viewing this mail, click\n\t\t\t\t\t\t\t\t\t\t<a href=\"https://nightly.capillary.in/business_controller/campaigns/emails/links/view.php?utrack={{user_id_b64}}&mtrack={{outbox_id_b64}}\" style = \"text-decoration: underline;color: #369;\" target=\"_blank\">here</a><br/>\n\t\t\t\t\t\t\t\t\t</center> <table class=\"container-main\" style=\"background:#eeeeee; color:#000000; font-family:'Open Sans',sans-serif; font-size:16px; font-weight:400; margin:0 auto; max-width:978px; padding:15px; width:100%\"> \t<tbody> \t\t<tr> \t\t\t<td> \t\t\t<table class=\"email-header\" style=\"background:#ffffff; margin:0 0 5px; padding:17px 0; width:100%\"> \t\t\t\t<tbody> \t\t\t\t\t<tr> \t\t\t\t\t\t<td style=\"width:100%\"><a class=\"brand\" href=\"#\" style=\"display: table; margin: 0 auto; text-decoration: none; font-size: 37px; color: grey;\"><img alt=\"Capillary Technologies\" src=\"https://s3.amazonaws.com/fileservice.in/intouch_creative_assets/60221e2020ba572f6787.png\" /> </a></td> \t\t\t\t\t</tr> \t\t\t\t</tbody> \t\t\t</table> \t\t\t<div class=\"container-content\" style=\"background:#ffffff; padding:20px 35px\"> \t\t\t<p>Hi Ashish Karan,</p> \t\t\t<p>You've received a new scheduled report. {{unsubscribe}}</p> \t\t\t<table> \t\t\t\t<tbody> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Org Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>autotest1</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Scheduled Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>Schedule Test</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Time Period: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>1st Jan, 2017 to 24th Sep, 2017</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t\t<tr> \t\t\t\t\t\t<td><strong>Report Name: </strong></td> \t\t\t\t\t\t<td> \t\t\t\t\t\t<p>redDart Report</p> \t\t\t\t\t\t</td> \t\t\t\t\t</tr> \t\t\t\t</tbody> \t\t\t</table> \t\t\t<p style=\"font-size:15px; margin-top:25px\">By clicking "View Report" you will be redirected to Capillary Analytics to view the automated report.</p> \t\t\t<a href=\"https://nightly.capillary.in/analytics/v2/report/59c37820e626a10df78c8d91?snapshot=59c8bce750f4e75ec8b0d24c\" style=\"background: #009e0f; text-align: center; color: #fff; font-size: 16px; padding: 10px 25px; cursor: pointer; text-decoration: none; display: block; width: 120px; margin: 25px auto 15px;\" target=\"_blank\">View Report</a></div> \t\t\t<div class=\"email-footer\"> \t\t\t<p style=\"color:grey; font-size:12px; text-align:center\">You've received this mail because you subscribed to Schedule Test schedule of redDart Report. <a href=\"https://nightly.capillary.in/analytics/v2/report/59c37820e626a10df78c8d91/schedule/59c8bce750f4e75ec8b0d24c/unsubscribeSchedule\" style=\"color: blue; cursor: pointer;\" target=\"_blank\">Unsubscribe</a></p> \t\t\t<p><a href=\"http://capillarytech.com/privacy-policy/\" target=\"_blank\">Privacy Policy</a> | <a href=\"http://capillarytech.com/about-us/\" target=\"_blank\">About Capillary</a></p> \t\t\t</div> \t\t\t</td> \t\t</tr> \t</tbody> </table> </body> </html> ","secondary_template_id":"9500","is_base_template":false,"language_name":"Hindi","language":"Hindi","lang_id":"151"},{"is_preview_generated":null,"preview_url":null,"is_favourite":null,"is_drag_drop":1,"drag_drop_id":"55acf47048a85bbf7681a35a","scope":null,"tag":null,"is_default":null,"html_content":"","secondary_template_id":"9500","is_base_template":0,"language_name":"Japanese","language":"Japanese","lang_id":"100"}]};
|
|
@@ -2634,7 +2643,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2634
2643
|
};
|
|
2635
2644
|
if (templates.drag_drop_id) {
|
|
2636
2645
|
tempData.drag_drop_id = templates.drag_drop_id;
|
|
2637
|
-
this.props.actions.getCmsSetting('edm', tempData.drag_drop_id, 'open', tempData.iso_code);
|
|
2646
|
+
this.props.actions.getCmsSetting('edm', tempData.drag_drop_id, 'open', tempData.iso_code, isEdmSupport);
|
|
2638
2647
|
}
|
|
2639
2648
|
// formData.usingTabContainer = true;
|
|
2640
2649
|
// formData.tabCount = 1;
|
|
@@ -2660,7 +2669,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2660
2669
|
// this.setState({tabKey: ''});
|
|
2661
2670
|
_.forEach(formData[0].selectedLanguages, (language) => {
|
|
2662
2671
|
if (formData[0][language].is_drag_drop) {
|
|
2663
|
-
this.props.actions.getCmsSetting('edm', formData[0][language].drag_drop_id, 'open', language);
|
|
2672
|
+
this.props.actions.getCmsSetting('edm', formData[0][language].drag_drop_id, 'open', language, isEdmSupport);
|
|
2664
2673
|
}
|
|
2665
2674
|
});
|
|
2666
2675
|
});
|
|
@@ -2987,8 +2996,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2987
2996
|
// const isLanguageSupport = (this.props.location.query.isLanguageSupport) ? this.props.location.query.isLanguageSupport : true;
|
|
2988
2997
|
// const isEdmSupport = (this.props.location.query.isEdmSupport) ? this.props.location.query.isEdmSupport : true;
|
|
2989
2998
|
// let getQuery = '';
|
|
2999
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
2990
3000
|
console.log('Selected EDM Data ', data, this.state.formData[this.state.currentTab - 1].activeTab);
|
|
2991
|
-
this.props.actions.getCmsSetting('edm', data.versions.base.drag_drop_id, 'create', this.state.formData[this.state.currentTab - 1].activeTab);
|
|
3001
|
+
this.props.actions.getCmsSetting('edm', data.versions.base.drag_drop_id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport);
|
|
2992
3002
|
// this.props.templatesActions.setEdmTemplate(data);
|
|
2993
3003
|
this.toggleEdmEmailTemplateSelection();
|
|
2994
3004
|
// if (type && type.toLowerCase() === 'email') {
|
|
@@ -38,10 +38,10 @@ export function* getAllAssets(assetType, queryParams) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export function* getCmsSetting({cmsType, projectId, cmsMode, langId}) {
|
|
41
|
+
export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport}) {
|
|
42
42
|
try {
|
|
43
43
|
console.log('cms sagas', langId);
|
|
44
|
-
const result = yield call(Api.getCmsTemplateSettings, cmsType, projectId, cmsMode, langId);
|
|
44
|
+
const result = yield call(Api.getCmsTemplateSettings, cmsType, projectId, cmsMode, langId, isEdmSupport);
|
|
45
45
|
console.log('CMS Setting ', result);
|
|
46
46
|
yield put({ type: types.GET_CMS_EDITOR_DETAILS_SUCCESS, settings: result.data.response.cmsDetails });
|
|
47
47
|
} catch (error) {
|
|
@@ -332,7 +332,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
332
332
|
_.forEach(inputField.cols, (col) => {
|
|
333
333
|
if (col.id === field.id && paneIndex === this.state.currentTab - 1) {
|
|
334
334
|
console.log(child, fieldIndex, this.state.formData);
|
|
335
|
-
const deeplinks = this.props.Templates.selectedWeChatAccount && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
335
|
+
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
336
336
|
const deepLinkOptions = this.props.Templates.selectedWeChatAccount ? _.map(JSON.parse(deeplinks), (link) => ({label: link.name, value: link.link, title: link.link }) ) : [];
|
|
337
337
|
const deeplinkValue = formData[this.state.currentTab - 1][field.id];
|
|
338
338
|
const componentIndex = fieldIndex + 1;
|
|
@@ -468,7 +468,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
470
|
getLinkName = (link) => {
|
|
471
|
-
const ck = !!this.props.Templates.selectedWeChatAccount.configs.deeplink;
|
|
471
|
+
const ck = this.props.Templates.selectedWeChatAccount.configs ? !!this.props.Templates.selectedWeChatAccount.configs.deeplink : false;
|
|
472
472
|
const deeplinks = ck ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
473
473
|
const deepLinkOptions = _.filter(JSON.parse(deeplinks), (l) => l.link === link);
|
|
474
474
|
if (deepLinkOptions[0]) {
|
|
@@ -779,7 +779,9 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
779
779
|
|
|
780
780
|
injectEvents = (schema) => {
|
|
781
781
|
const temp = schema;
|
|
782
|
-
|
|
782
|
+
if (temp.standalone) {
|
|
783
|
+
temp.standalone.sections = this.injectSections(temp.standalone.sections);
|
|
784
|
+
}
|
|
783
785
|
_.forEach(temp.containers, (container) => {
|
|
784
786
|
let tempContainer = container;
|
|
785
787
|
tempContainer = this.injectContainer(tempContainer);
|
|
@@ -1158,7 +1160,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1158
1160
|
showSelectedIosCta = (selectedConfig) => {
|
|
1159
1161
|
const currentTab = this.state.currentTab;
|
|
1160
1162
|
const schema = _.cloneDeep(this.state.schema);
|
|
1161
|
-
const deeplinks = this.props.Templates.selectedWeChatAccount && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount : '[]';
|
|
1163
|
+
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount : '[]';
|
|
1162
1164
|
const deepLinkOptions = this.props.Templates.selectedWeChatAccount ? _.map(JSON.parse(deeplinks), (link) => ({label: link.name, value: link.link, title: link.link }) ) : [];
|
|
1163
1165
|
_.forEach(schema.containers, (container) => {
|
|
1164
1166
|
_.forEach(container.panes, (pane, paneIndex) => {
|
|
@@ -1371,7 +1373,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1371
1373
|
addPrimaryCta = (ev) => {
|
|
1372
1374
|
const id = ev.target.id;
|
|
1373
1375
|
const schema = _.cloneDeep(this.state.schema);
|
|
1374
|
-
const deeplinks = this.props.Templates.selectedWeChatAccount && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1376
|
+
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1375
1377
|
const deepLinkOptions = this.props.Templates.selectedWeChatAccount ? _.map(JSON.parse(deeplinks), (link) => ({label: link.name, value: link.link, title: link.link }) ) : [];
|
|
1376
1378
|
// const eventsMap = _.cloneDeep(this.state.eventsMap);
|
|
1377
1379
|
_.forEach(schema.containers, (container) => {
|
|
@@ -1496,7 +1498,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1496
1498
|
addSecondoryCta = (ev) => {
|
|
1497
1499
|
const id = ev.target.id;
|
|
1498
1500
|
const schema = _.cloneDeep(this.state.schema);
|
|
1499
|
-
const ck = !!this.props.Templates.selectedWeChatAccount.configs.deeplink;
|
|
1501
|
+
const ck = this.props.Templates.selectedWeChatAccount.configs ? !!this.props.Templates.selectedWeChatAccount.configs.deeplink : false;
|
|
1500
1502
|
const deeplinks = ck ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1501
1503
|
const deepLinkOptions = this.props.Templates.selectedWeChatAccount ? _.map(JSON.parse(deeplinks), (link) => ({label: link.name, value: link.link, title: link.link }) ) : [];
|
|
1502
1504
|
// const eventsMap = _.cloneDeep(this.state.eventsMap);
|
|
@@ -1725,7 +1727,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1725
1727
|
_.forEach(inputField.cols, (col) => {
|
|
1726
1728
|
if (col.id === field.id) {
|
|
1727
1729
|
const formDataKey = col.id.replace("-show-keys", "");
|
|
1728
|
-
const deeplinks = this.props.Templates.selectedWeChatAccount && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1730
|
+
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1729
1731
|
let keys = this.props.Templates.selectedWeChatAccount ? _.filter(JSON.parse(deeplinks), (dl) => dl.link === formData[this.state.currentTab - 1][formDataKey]) : [];
|
|
1730
1732
|
if (keys[0]) {
|
|
1731
1733
|
keys = keys[0].keys;
|
|
@@ -1852,7 +1854,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1852
1854
|
child.inputFields.splice(fieldIndex, 1);
|
|
1853
1855
|
}
|
|
1854
1856
|
if (child.inputFields[fieldIndex] && child.inputFields[fieldIndex].id === "cta-deeplink-select-section") {
|
|
1855
|
-
const deeplinks = this.props.Templates.selectedWeChatAccount && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1857
|
+
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1856
1858
|
const configkeys = this.props.Templates.selectedWeChatAccount ? _.filter(JSON.parse(deeplinks), (dl) => dl.link === selectedDeeplink) : [];
|
|
1857
1859
|
if (configkeys.length) {
|
|
1858
1860
|
const options = configkeys[0].keys;
|
|
@@ -1932,7 +1934,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1932
1934
|
child.inputFields.splice(fieldIndex, 1);
|
|
1933
1935
|
}
|
|
1934
1936
|
if (child.inputFields[fieldIndex] && child.inputFields[fieldIndex].id === "cta-deeplink-select-section") {
|
|
1935
|
-
const deeplinks = this.props.Templates.selectedWeChatAccount && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1937
|
+
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
1936
1938
|
const configkeys = this.props.Templates.selectedWeChatAccount ? _.filter(JSON.parse(deeplinks), (dl) => dl.link === selectedDeeplink) : [];
|
|
1937
1939
|
if (configkeys.length) {
|
|
1938
1940
|
const options = configkeys[0].keys;
|
|
@@ -2022,7 +2024,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
2022
2024
|
child.inputFields.splice(fieldIndex, 1);
|
|
2023
2025
|
}
|
|
2024
2026
|
if (child.inputFields[fieldIndex] && child.inputFields[fieldIndex].id === "cta-deeplink-select-section") {
|
|
2025
|
-
const ck = !!this.props.Templates.selectedWeChatAccount.configs.deeplink;
|
|
2027
|
+
const ck = this.props.Templates.selectedWeChatAccount.configs ? !!this.props.Templates.selectedWeChatAccount.configs.deeplink : false;
|
|
2026
2028
|
const deeplinks = ck ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
2027
2029
|
const configkeys = this.props.Templates.selectedWeChatAccount ? _.filter(JSON.parse(deeplinks), (dl) => dl.link === selectedDeeplink) : [];
|
|
2028
2030
|
if (configkeys.length) {
|
|
@@ -349,7 +349,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
349
349
|
_.forEach(inputField.cols, (col) => {
|
|
350
350
|
if (col.id === field.id && currentTab === paneIndex + 1) {
|
|
351
351
|
console.log(child, fieldIndex, this.state.formData);
|
|
352
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
352
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
353
353
|
const deepLinkOptions = _.map(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (link) => ({label: link.name, value: link.link, title: link.link }) );
|
|
354
354
|
const deeplinkValue = formData[currentTab - 1][field.id];
|
|
355
355
|
const componentIndex = fieldIndex + 1;
|
|
@@ -779,7 +779,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
779
779
|
|
|
780
780
|
getLinkName = (link) => {
|
|
781
781
|
const selectedWeChatAccount = (!_.isEmpty(this.props.Templates.selectedWeChatAccount) ? this.props.Templates.selectedWeChatAccount : this.props.Edit.selectedWeChatAccount);
|
|
782
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
782
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
783
783
|
const deepLinkOptions = _.filter(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (l) => l.link === link);
|
|
784
784
|
if (deepLinkOptions[0]) {
|
|
785
785
|
return deepLinkOptions[0].name;
|
|
@@ -1084,7 +1084,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1084
1084
|
const currentTab = tab || this.state.currentTab;
|
|
1085
1085
|
const schema = inputSchema ? _.cloneDeep(inputSchema) : _.cloneDeep(this.state.schema);
|
|
1086
1086
|
const selectedWeChatAccount = (!_.isEmpty(this.props.Templates.selectedWeChatAccount) ? this.props.Templates.selectedWeChatAccount : this.props.Edit.selectedWeChatAccount);
|
|
1087
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
1087
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
1088
1088
|
const deepLinkOptions = _.map(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (link) => ({label: link.name, value: link.link, title: link.link }) );
|
|
1089
1089
|
|
|
1090
1090
|
_.forEach(schema.containers, (container) => {
|
|
@@ -1324,7 +1324,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1324
1324
|
delete formData[self.state.currentTab - 1][`${id.replace('-delete', '')}`];
|
|
1325
1325
|
}
|
|
1326
1326
|
if (child.inputFields[fieldIndex] && child.inputFields[fieldIndex].id === "cta-deeplink-select-section") {
|
|
1327
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
1327
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
1328
1328
|
const configkeys = selectedWeChatAccount ? _.filter(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (dl) => dl.link === selectedDeeplink) : [];
|
|
1329
1329
|
if (configkeys.length) {
|
|
1330
1330
|
const options = configkeys[0].keys;
|
|
@@ -1414,7 +1414,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1414
1414
|
delete formData[self.state.currentTab - 1][`cta-deeplink-secondary-cta-1-text2`];
|
|
1415
1415
|
}
|
|
1416
1416
|
if (child.inputFields[fieldIndex] && child.inputFields[fieldIndex].id === "cta-deeplink-select-section") {
|
|
1417
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
1417
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
1418
1418
|
const configkeys = selectedWeChatAccount ? _.filter(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (dl) => dl.link === selectedDeeplink) : [];
|
|
1419
1419
|
if (configkeys.length) {
|
|
1420
1420
|
const options = configkeys[0].keys;
|
|
@@ -1515,7 +1515,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1515
1515
|
delete formData[self.state.currentTab - 1][`cta-deeplink-${id.replace('delete', 'text')}`];
|
|
1516
1516
|
}
|
|
1517
1517
|
if (child.inputFields[fieldIndex] && child.inputFields[fieldIndex].id === "cta-deeplink-select-section") {
|
|
1518
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
1518
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
1519
1519
|
const configkeys = selectedWeChatAccount ? _.filter(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (dl) => dl.link === selectedDeeplink) : [];
|
|
1520
1520
|
|
|
1521
1521
|
if (configkeys.length) {
|
|
@@ -1845,7 +1845,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1845
1845
|
_.forEach(inputField.cols, (col) => {
|
|
1846
1846
|
if (col.id === field.id) {
|
|
1847
1847
|
const formDataKey = col.id.replace("-show-keys", "");
|
|
1848
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
1848
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
1849
1849
|
let keys = selectedWeChatAccount ? _.filter(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (dl) => dl.link === formData[currentTab - 1][formDataKey]) : [];
|
|
1850
1850
|
if (keys[0]) {
|
|
1851
1851
|
keys = keys[0].keys;
|
|
@@ -1953,7 +1953,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1953
1953
|
const selectedWeChatAccount = (!_.isEmpty(this.props.Templates.selectedWeChatAccount) ? this.props.Templates.selectedWeChatAccount : this.props.Edit.selectedWeChatAccount);
|
|
1954
1954
|
const id = field ? field.id : ev.target.id;
|
|
1955
1955
|
const schema = inputSchema ? _.cloneDeep(inputSchema) : _.cloneDeep(this.state.schema);
|
|
1956
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
1956
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
1957
1957
|
const deepLinkOptions = selectedWeChatAccount ? _.map(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (link) => ({label: link.name, value: link.link, title: link.link }) ) : [];
|
|
1958
1958
|
// const eventsMap = _.cloneDeep(this.state.eventsMap);
|
|
1959
1959
|
_.forEach(schema.containers, (container) => {
|
|
@@ -2086,7 +2086,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2086
2086
|
const id = field ? field.id : ev.target.id;
|
|
2087
2087
|
const schema = inputSchema ? _.cloneDeep(inputSchema) : _.cloneDeep(this.state.schema);
|
|
2088
2088
|
const selectedWeChatAccount = (!_.isEmpty(this.props.Templates.selectedWeChatAccount) ? this.props.Templates.selectedWeChatAccount : this.props.Edit.selectedWeChatAccount);
|
|
2089
|
-
const ck = !!selectedWeChatAccount.configs.deeplink;
|
|
2089
|
+
const ck = selectedWeChatAccount.configs ? !!selectedWeChatAccount.configs.deeplink : false;
|
|
2090
2090
|
const deepLinkOptions = selectedWeChatAccount ? _.map(JSON.parse(ck ? selectedWeChatAccount.configs.deeplink : '[]'), (link) => ({label: link.name, value: link.link, title: link.link }) ) : [];
|
|
2091
2091
|
|
|
2092
2092
|
// const eventsMap = _.cloneDeep(this.state.eventsMap);
|
|
@@ -2407,7 +2407,9 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2407
2407
|
|
|
2408
2408
|
injectEvents = (schema) => {
|
|
2409
2409
|
const temp = schema;
|
|
2410
|
-
|
|
2410
|
+
if (this.injectSections) {
|
|
2411
|
+
temp.standalone.sections = this.injectSections(temp.standalone.sections);
|
|
2412
|
+
}
|
|
2411
2413
|
_.forEach(temp.containers, (container) => {
|
|
2412
2414
|
let tempContainer = container;
|
|
2413
2415
|
tempContainer = this.injectContainer(tempContainer);
|
|
@@ -221,7 +221,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
221
221
|
if (this.state.channel.toLowerCase() === "sms" && nextProps.Create && nextProps.Create.response && nextProps.Create.response.templateId && nextProps.Create.response.templateId !== '') {
|
|
222
222
|
const message = getMessageObject('success', `${this.state.channel} ${this.props.intl.formatMessage(messages.templateDuplicateSuccess)}`, true);
|
|
223
223
|
this.props.globalActions.addMessageToQueue(message);
|
|
224
|
-
this.getAllTemplates({params});
|
|
224
|
+
this.getAllTemplates({params, resetPage: true});
|
|
225
225
|
this.props.smsActions.clearCreateResponse();
|
|
226
226
|
}
|
|
227
227
|
if (this.state.channel.toLowerCase() === "mobilepush" && nextProps.CreateMobilePush && nextProps.CreateMobilePush.response && nextProps.CreateMobilePush.response.templateId && nextProps.CreateMobilePush.response.templateId !== '') {
|
|
@@ -237,8 +237,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
237
237
|
if (this.state.channel.toLowerCase() === "ebill" && nextProps.CreateEbill && nextProps.CreateEbill.createResponse && nextProps.CreateEbill.createResponse.templateId && nextProps.CreateEbill.createResponse.templateId !== '') {
|
|
238
238
|
const message = getMessageObject('success', `${this.state.channel} ${this.props.intl.formatMessage(messages.templateDuplicateSuccess)}`, true);
|
|
239
239
|
this.props.globalActions.addMessageToQueue(message);
|
|
240
|
-
this.getAllTemplates({params});
|
|
241
|
-
this.props.ebillActions.
|
|
240
|
+
this.getAllTemplates({params, resetPage: true});
|
|
241
|
+
this.props.ebillActions.clearStoreValues();
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
if (this.state.channel.toLowerCase() === "email" && nextProps.EmailCreate && nextProps.EmailCreate.createResponse && nextProps.EmailCreate.createResponse.templateId && nextProps.EmailCreate.createResponse.templateId !== '') {
|
|
@@ -275,7 +275,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
275
275
|
console.log('Got html Content ', nextProps.Templates.selectedEmailLayout);
|
|
276
276
|
const module = this.props.location.query.module ? this.props.location.query.module : 'default';
|
|
277
277
|
const isLanguageSupport = (this.props.location.query.isLanguageSupport) ? this.props.location.query.isLanguageSupport : true;
|
|
278
|
-
const isEdmSupport = (this.props.location.query.isEdmSupport
|
|
278
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
279
279
|
const type = this.props.location.query.type;
|
|
280
280
|
this.props.router.push({
|
|
281
281
|
pathname: `/${nextProps.route.name.toLowerCase()}/create`,
|
|
@@ -445,7 +445,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
445
445
|
const supportedZipFormats = ['zip'];
|
|
446
446
|
const module = this.props.location.query.module ? this.props.location.query.module : 'default';
|
|
447
447
|
const isLanguageSupport = (this.props.location.query.isLanguageSupport) ? this.props.location.query.isLanguageSupport : true;
|
|
448
|
-
const isEdmSupport = (this.props.location.query.isEdmSupport
|
|
448
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
449
449
|
console.log('File Params ', fileExtension);
|
|
450
450
|
if (supportedZipFormats.indexOf(fileExtension.toLowerCase()) !== -1) {
|
|
451
451
|
console.log('Zip Format got');
|
|
@@ -769,7 +769,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
769
769
|
const type = this.props.location.query.type;
|
|
770
770
|
const module = this.props.location.query.module ? this.props.location.query.module : 'default';
|
|
771
771
|
const isLanguageSupport = (this.props.location.query.isLanguageSupport) ? this.props.location.query.isLanguageSupport : true;
|
|
772
|
-
const isEdmSupport = (this.props.location.query.isEdmSupport
|
|
772
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
773
773
|
let getQuery = '';
|
|
774
774
|
console.log('Selected EDM Data ', data);
|
|
775
775
|
this.props.actions.setEdmTemplate(data);
|
|
@@ -794,7 +794,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
794
794
|
const type = this.props.location.query.type;
|
|
795
795
|
const module = this.props.location.query.module;
|
|
796
796
|
const isLanguageSupport = (this.props.location.query.isLanguageSupport) ? this.props.location.query.isLanguageSupport : false;
|
|
797
|
-
const isEdmSupport = (this.props.location.query.isEdmSupport
|
|
797
|
+
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
798
798
|
let getQuery = "";
|
|
799
799
|
console.log('type**** ', type);
|
|
800
800
|
e.stopPropagation();
|
|
@@ -808,7 +808,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
808
808
|
pathName = `/email/edit/${id}`;
|
|
809
809
|
}
|
|
810
810
|
if (this.state.channel.toLowerCase() === 'email') {
|
|
811
|
-
getQuery = type === 'embedded' ? {type: 'embedded', module, isLanguageSupport, isEdmSupport} : {module};
|
|
811
|
+
getQuery = type === 'embedded' ? {type: 'embedded', module, isLanguageSupport, isEdmSupport} : {module, isEdmSupport};
|
|
812
812
|
} else {
|
|
813
813
|
getQuery = type === 'embedded' ? {type: 'embedded', module, account_id: this.props.location.query.account_id} : {module};
|
|
814
814
|
}
|
|
@@ -946,13 +946,18 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
946
946
|
{template._id === this.state.hoveredItem ? <CapButton onClick={(e) => this.handleEditClick(e, template._id)} className="edit-button" type="secondary">{type === 'embedded' ? this.props.intl.formatMessage(messages.selectButton) : this.props.intl.formatMessage(messages.editButton)}</CapButton> : ''}
|
|
947
947
|
{template._id === this.state.hoveredItem ? <CapButton onClick={() => this.handlePreviewClick(template)} className="preview-button" type="cancel">{this.props.intl.formatMessage(messages.previewButton)}</CapButton> : ''}
|
|
948
948
|
</div>);
|
|
949
|
-
} else if (this.state.channel.toLowerCase() === 'email') {
|
|
949
|
+
} else if (this.state.channel.toLowerCase() === 'email' || this.state.channel.toLowerCase() === 'ebill') {
|
|
950
950
|
// console.log('Data Prepare');
|
|
951
|
+
console.log('Data Prepare');
|
|
952
|
+
const imgSrc = template && template.versions && template.versions.base ? template.versions.base.preview_http_url : '';
|
|
953
|
+
const ifPreviewGenerated = template && template.versions && template.versions.base ? template.versions.base.isPreviewGenerated : 0;
|
|
954
|
+
content = <img src={imgSrc || ''} alt={this.props.intl.formatMessage(messages.previewGenerateText)} />;
|
|
955
|
+
console.log('qwerty template preview', imgSrc, template, ifPreviewGenerated, content);
|
|
951
956
|
temp.content = (
|
|
952
957
|
<div
|
|
953
958
|
className="sms-template-content">
|
|
954
959
|
<div className={`sms-text ${this.state.hoveredItem === template._id ? 'sms-text-blurred' : ''}`}>
|
|
955
|
-
|
|
960
|
+
{content}
|
|
956
961
|
</div>
|
|
957
962
|
{!layoutSelection && template._id === this.state.hoveredItem ? <CapButton onClick={(e) => this.handleEditClick(e, template._id)} className="edit-button" type="secondary">{type === 'embedded' ? this.props.intl.formatMessage(messages.selectButton) : this.props.intl.formatMessage(messages.editButton)}</CapButton> : ''}
|
|
958
963
|
{layoutSelection && template._id === this.state.hoveredItem ? <CapButton onClick={() => this.handleEdmDefaultTemplateSelection(true, template._id)} className="select-button" type="secondary">{type === 'embedded' ? this.props.intl.formatMessage(messages.selectDefaultButton) : this.props.intl.formatMessage(messages.selectDefaultButton)}</CapButton> : ''}
|
|
@@ -222,4 +222,8 @@ export default defineMessages({
|
|
|
222
222
|
id: 'app.containers.Templates.selectDefaultButton',
|
|
223
223
|
defaultMessage: 'Select',
|
|
224
224
|
},
|
|
225
|
+
previewGenerateText: {
|
|
226
|
+
id: 'app.containers.Templates.previewGenerateText',
|
|
227
|
+
defaultMessage: 'Preview is being generated...',
|
|
228
|
+
},
|
|
225
229
|
});
|
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -268,8 +268,8 @@ export const sendZippedFile = (file) => {
|
|
|
268
268
|
return request(url, getAPICallObject('POST', data, true));
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
-
export const getCmsTemplateSettings = (cmsType, projectId, cmsMode, langId) => {
|
|
272
|
-
const url = `${API_ENDPOINT}/cms/getDetails?type=${cmsType}&projectId=${projectId}&cmsMode=${cmsMode}&langId=${langId}`;
|
|
271
|
+
export const getCmsTemplateSettings = (cmsType, projectId, cmsMode, langId, isEdmSupport) => {
|
|
272
|
+
const url = `${API_ENDPOINT}/cms/getDetails?type=${cmsType}&projectId=${projectId}&cmsMode=${cmsMode}&langId=${langId}&isEdmSupport=${isEdmSupport ? 1 : 0}`;
|
|
273
273
|
return API.get(url);
|
|
274
274
|
};
|
|
275
275
|
|