@capillarytech/creatives-library 0.0.6 → 0.0.8
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 +61 -7
- package/containers/Email/actions.js +2 -1
- package/containers/Email/index.js +178 -62
- package/containers/Email/reducer.js +4 -1
- package/containers/Email/sagas.js +5 -5
- package/containers/Sms/Edit/index.js +5 -5
- package/containers/Templates/index.js +7 -1
- package/package.json +1 -1
- package/routes.js +1 -1
- package/services/api.js +4 -4
- package/utils/smscharcount.js +320 -300
|
@@ -124,6 +124,9 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
124
124
|
queryParams.wecrmId = this.props.Templates.selectedWeChatAccount.configs.wecrm_app_id;
|
|
125
125
|
queryParams.wecrmToken = this.props.Templates.selectedWeChatAccount.configs.wecrm_token;
|
|
126
126
|
}
|
|
127
|
+
if (this.state.channel.toLowerCase() === "mobilepush" && !_.isEmpty(this.props.Templates.selectedWeChatAccount)) {
|
|
128
|
+
queryParams.accountId = this.props.Templates.selectedWeChatAccount.id;
|
|
129
|
+
}
|
|
127
130
|
queryParams.page = this.state.page;
|
|
128
131
|
queryParams.perPage = this.state.perPageLimit;
|
|
129
132
|
const channel = this.state.channel;
|
|
@@ -221,6 +224,9 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
221
224
|
this.props.smsActions.clearCreateResponse();
|
|
222
225
|
}
|
|
223
226
|
if (this.state.channel.toLowerCase() === "mobilepush" && nextProps.CreateMobilePush && nextProps.CreateMobilePush.response && nextProps.CreateMobilePush.response.templateId && nextProps.CreateMobilePush.response.templateId !== '') {
|
|
227
|
+
if (this.state.channel.toLowerCase() === "mobilepush" && !_.isEmpty(nextProps.Templates.selectedWeChatAccount)) {
|
|
228
|
+
params.accountId = nextProps.Templates.selectedWeChatAccount.id;
|
|
229
|
+
}
|
|
224
230
|
const message = getMessageObject('success', `${this.state.channel} ${this.props.intl.formatMessage(messages.templateDuplicateSuccess)}`, true);
|
|
225
231
|
this.props.globalActions.addMessageToQueue(message);
|
|
226
232
|
this.getAllTemplates({params});
|
|
@@ -1299,7 +1305,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1299
1305
|
{ name: 'description', content: 'Description of Templates' },
|
|
1300
1306
|
]}
|
|
1301
1307
|
/>
|
|
1302
|
-
{templateList && templateList.length > 0 && <Pagination onPageChange={() => { this.getAllTemplates({getNextPage: true}); }} paginationSelector="pagination-container">
|
|
1308
|
+
{templateList && templateList.length > 0 && <Pagination onPageChange={() => { console.log('getting all templates pagination'); this.getAllTemplates({getNextPage: true}); }} paginationSelector="pagination-container">
|
|
1303
1309
|
<CardGrid
|
|
1304
1310
|
className={this.state.channel.toLowerCase() === "mobilepush" ? "mobilepush-templates" : ""}
|
|
1305
1311
|
listItem={templateList}
|
package/package.json
CHANGED
package/routes.js
CHANGED
package/services/api.js
CHANGED
|
@@ -273,13 +273,13 @@ export const getCmsTemplateSettings = (cmsType, projectId, cmsMode, langId) => {
|
|
|
273
273
|
return API.get(url);
|
|
274
274
|
};
|
|
275
275
|
|
|
276
|
-
export const getCmsTemplateData = (cmsType, projectId) => {
|
|
277
|
-
const url = `${API_ENDPOINT}/cms/getContent?type=${cmsType}&projectId=${projectId}`;
|
|
276
|
+
export const getCmsTemplateData = (cmsType, projectId, langId) => {
|
|
277
|
+
const url = `${API_ENDPOINT}/cms/getContent?type=${cmsType}&projectId=${projectId}&langId=${langId}`;
|
|
278
278
|
return API.get(url);
|
|
279
279
|
};
|
|
280
280
|
|
|
281
|
-
export const getCmsData = (cmsType, projectId) => {
|
|
282
|
-
const url = `${API_ENDPOINT}/cms/getCmsData?type=${cmsType}&projectId=${projectId}`;
|
|
281
|
+
export const getCmsData = (cmsType, projectId, langId) => {
|
|
282
|
+
const url = `${API_ENDPOINT}/cms/getCmsData?type=${cmsType}&projectId=${projectId}&langId=${langId}`;
|
|
283
283
|
return API.get(url);
|
|
284
284
|
};
|
|
285
285
|
|