@capillarytech/creatives-library 7.6.2 → 7.6.4

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.
Files changed (112) hide show
  1. package/components/CapTagList/index.js +5 -5
  2. package/components/Card/index.js +1 -1
  3. package/components/Ckeditor/index.js +5 -5
  4. package/components/CustomPopOver/index.js +3 -3
  5. package/components/Edmeditor/index.js +4 -4
  6. package/components/EmailPreview/index.js +1 -1
  7. package/components/PreviewSideBar/index.js +3 -3
  8. package/components/Sidebar/index.js +1 -1
  9. package/components/SmsTest/index.js +4 -4
  10. package/components/TemplatePreview/index.js +2 -2
  11. package/components/Toastr/index.js +1 -1
  12. package/containers/Assets/Gallery/index.js +2 -2
  13. package/containers/Assets/Gallery/sagas.js +1 -1
  14. package/containers/Cap/actions.js +2 -2
  15. package/containers/Cap/reducer.js +1 -1
  16. package/containers/Cap/sagas.js +3 -3
  17. package/containers/Cap/selectors.js +1 -1
  18. package/containers/Ebill/actions.js +1 -1
  19. package/containers/Ebill/index.js +34 -34
  20. package/containers/Ebill/sagas.js +3 -3
  21. package/containers/Email/actions.js +2 -2
  22. package/containers/Email/index.js +171 -171
  23. package/containers/Email/reducer.js +1 -1
  24. package/containers/Email/sagas.js +6 -6
  25. package/containers/LanguageProvider/actions.js +1 -1
  26. package/containers/Line/Create/actions.js +5 -5
  27. package/containers/Line/Create/index.js +37 -37
  28. package/containers/Line/Create/sagas.js +7 -7
  29. package/containers/Line/Edit/actions.js +3 -3
  30. package/containers/Line/Edit/index.js +24 -24
  31. package/containers/Line/Edit/sagas.js +4 -4
  32. package/containers/MobilePush/Create/actions.js +2 -2
  33. package/containers/MobilePush/Create/index.js +35 -35
  34. package/containers/MobilePush/Create/sagas.js +2 -2
  35. package/containers/MobilePush/Edit/actions.js +3 -3
  36. package/containers/MobilePush/Edit/index.js +32 -32
  37. package/containers/MobilePush/Edit/sagas.js +5 -5
  38. package/containers/Sms/Create/actions.js +2 -2
  39. package/containers/Sms/Create/index.js +57 -57
  40. package/containers/Sms/Create/sagas.js +2 -2
  41. package/containers/Sms/Edit/actions.js +3 -3
  42. package/containers/Sms/Edit/index.js +44 -44
  43. package/containers/Sms/Edit/sagas.js +3 -3
  44. package/containers/TagList/index.js +9 -9
  45. package/containers/Templates/actions.js +5 -5
  46. package/containers/Templates/index.js +44 -44
  47. package/containers/Templates/sagas.js +5 -5
  48. package/containers/WeChat/MapTemplates/actions.js +1 -1
  49. package/containers/WeChat/MapTemplates/index.js +34 -34
  50. package/containers/WeChat/MapTemplates/sagas.js +2 -2
  51. package/containers/WeChat/RichmediaTemplates/Create/index.js +9 -9
  52. package/containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
  53. package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
  54. package/package.json +1 -1
  55. package/services/api.js +13 -13
  56. package/utils/authWrapper.js +2 -2
  57. package/utils/smsCharCount.js +5 -5
  58. package/v2Components/CapTagList/index.js +1 -1
  59. package/v2Components/Card/index.js +1 -1
  60. package/v2Components/Ckeditor/index.js +5 -5
  61. package/v2Components/CustomPopOver/index.js +3 -3
  62. package/v2Components/Edmeditor/index.js +4 -4
  63. package/v2Components/EmailMobilePreview/index.js +4 -4
  64. package/v2Components/EmailPreviewV2/index.js +4 -4
  65. package/v2Components/FormBuilder/index.js +3 -3
  66. package/v2Components/PreviewSideBar/index.js +3 -3
  67. package/v2Components/SmsTest/index.js +4 -4
  68. package/v2Components/TemplatePreview/index.js +1 -1
  69. package/v2Components/Toastr/index.js +1 -1
  70. package/v2Containers/Assets/Gallery/sagas.js +1 -1
  71. package/v2Containers/Cap/actions.js +1 -1
  72. package/v2Containers/Cap/index.js +2 -2
  73. package/v2Containers/Cap/reducer.js +1 -1
  74. package/v2Containers/Cap/sagas.js +3 -3
  75. package/v2Containers/Cap/selectors.js +1 -1
  76. package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -1
  77. package/v2Containers/CreativesContainer/index.js +10 -3
  78. package/v2Containers/Ebill/actions.js +1 -1
  79. package/v2Containers/Ebill/index.js +34 -34
  80. package/v2Containers/Ebill/sagas.js +3 -3
  81. package/v2Containers/Email/reducer.js +1 -1
  82. package/v2Containers/EmailWrapper/index.js +4 -4
  83. package/v2Containers/Facebook/Advertisement/index.js +0 -1
  84. package/v2Containers/Facebook/Facebook.style.js +1 -1
  85. package/v2Containers/Facebook/constants.js +4 -0
  86. package/v2Containers/Facebook/index.js +189 -121
  87. package/v2Containers/Facebook/messages.js +20 -4
  88. package/v2Containers/Facebook/sagas.js +1 -1
  89. package/v2Containers/LanguageProvider/actions.js +1 -1
  90. package/v2Containers/Line/Container/actions.js +5 -5
  91. package/v2Containers/Line/Container/sagas.js +4 -4
  92. package/v2Containers/MobilePush/Create/actions.js +2 -2
  93. package/v2Containers/MobilePush/Create/index.js +1 -1
  94. package/v2Containers/MobilePush/Create/sagas.js +2 -2
  95. package/v2Containers/MobilePush/Edit/actions.js +3 -3
  96. package/v2Containers/MobilePush/Edit/index.js +26 -26
  97. package/v2Containers/MobilePush/Edit/sagas.js +5 -5
  98. package/v2Containers/Sms/Create/index.js +4 -4
  99. package/v2Containers/TagList/index.js +6 -6
  100. package/v2Containers/Templates/actions.js +5 -5
  101. package/v2Containers/Templates/index.js +6 -2
  102. package/v2Containers/Templates/sagas.js +4 -4
  103. package/v2Containers/TemplatesV2/index.js +9 -4
  104. package/v2Containers/Viber/actions.js +2 -2
  105. package/v2Containers/Viber/sagas.js +2 -2
  106. package/v2Containers/WeChat/MapTemplates/actions.js +1 -1
  107. package/v2Containers/WeChat/MapTemplates/index.js +19 -19
  108. package/v2Containers/WeChat/MapTemplates/sagas.js +3 -3
  109. package/v2Containers/WeChat/RichmediaTemplates/Create/actions.js +1 -1
  110. package/v2Containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
  111. package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
  112. package/assets/DeviceForEmail.png +0 -0
@@ -4,7 +4,7 @@
4
4
  *
5
5
  */
6
6
  import PropTypes from "prop-types";
7
- import React, { useState, useEffect } from "react";
7
+ import React, { useState, useEffect, useCallback } from "react";
8
8
  import { injectIntl, FormattedMessage, intlShape } from "react-intl";
9
9
  import {
10
10
  CapHeading,
@@ -15,7 +15,9 @@ import {
15
15
  CapDrawer,
16
16
  CapCustomCard,
17
17
  CapIcon,
18
+ CapRadioGroup,
18
19
  } from '@capillarytech/cap-ui-library';
20
+ import Templates from '../Templates';
19
21
  import { createStructuredSelector } from 'reselect';
20
22
  import { connect } from 'react-redux';
21
23
  import { bindActionCreators } from 'redux';
@@ -38,6 +40,8 @@ import {
38
40
  VALUE_REACH,
39
41
  VALUE_VIDEO_VIEWS,
40
42
  VALUE_LINK_CLICKS,
43
+ AD_MANAGER,
44
+ CREATIVE,
41
45
  } from './constants';
42
46
 
43
47
  const StyledCampaignDetailCapColumn = withStyles(CapColumn, CampaignDetailCapColumn);
@@ -183,12 +187,22 @@ const Facebook = (props) => {
183
187
  onCreateComplete,
184
188
  params,
185
189
  facebookTemplateData,
190
+ messageStrategy,
191
+ router,
192
+ handlePeviewTemplate,
193
+ renderNewCardGrid,
194
+ onSelectTemplate,
195
+ createNew,
196
+ fbAdManger,
186
197
  } = props;
187
198
  const {
188
199
  selectedMarketingObjective: fbMarketingObjectiveValue = VALUE_REACH,
189
200
  } = templateData || {};
190
201
  const [isDrawerVisible, setDrawerVisibility] = useState(false);
191
202
  const [selectedMarketingObjective, setMarketingObjective] = useState(socialObjective || fbMarketingObjectiveValue);
203
+ const [adManager, setAdManager] = useState(AD_MANAGER);
204
+ const [showTemplateList, setTemplateList] = useState(false);
205
+
192
206
 
193
207
  useEffect(() => {
194
208
  if (!isFullMode) {
@@ -225,131 +239,184 @@ const Facebook = (props) => {
225
239
 
226
240
  const onMarketingObjectiveSelect = (value) => setMarketingObjective(value);
227
241
 
228
- return (
229
- !isFullMode ? (<div className={className}>
230
- <div className="is-scrollable-section" >
231
- <div className="account-details-wrapper">
232
- <div className="account-name-section">
233
- <CapHeading type="h4">
234
- <FormattedMessage {...messages.fbAccount} />
235
- </CapHeading>
236
- <CapHeading type="h3">{accountName}</CapHeading>
237
- </div>
242
+ const radioOptions = [{
243
+ label: intl.formatMessage(messages.capFbAdManager), value: CREATIVE,
244
+ }, {
245
+ label: intl.formatMessage(messages.fbAdManager), value: AD_MANAGER,
246
+ }];
238
247
 
239
- <div className="account-section-container">
240
- <CapHeading type="h3">
241
- <FormattedMessage {...messages.fbAdCampaignSetDetailsTitle} />
242
- </CapHeading>
243
- <CapLabel type="label1">
244
- <FormattedMessage
245
- {...messages.fbAdCampaignSetDetailsDescription}
246
- />
247
- </CapLabel>
248
- </div>
248
+ const onChangeAdManager = useCallback(({ target: { value } }) => {
249
+ setAdManager(value);
250
+ }, [setAdManager]);
249
251
 
250
- <CapRow span={12} type="flex">
251
- {campaignDataList.map(({ label, value, onChange }, index) => (
252
- <StyledCampaignDetailCapColumn
253
- span={index % 2 === 0 ? 6 : 14}
254
- key={label}
255
- >
256
- <CapRow>
257
- <CapLabel type="label2">
258
- <FormattedMessage {...messages[label]} />
259
- </CapLabel>
260
- <CapHeading type="h4">
261
- {value}
262
- {!socialRemoteCampaignId && onChange && (
263
- <CapButton
264
- type="flat"
265
- className="marketingObjective-change-button facebook-marketing-objective-change"
266
- onClick={onChange}
267
- >
268
- <FormattedMessage {...messages.fbChange} />
269
- </CapButton>
270
- )}
271
- </CapHeading>
272
- </CapRow>
273
- </StyledCampaignDetailCapColumn>
274
- ))}
275
- </CapRow>
276
- <CapDrawer
277
- content={
278
- <MarketingObjective
279
- selectedMarketingObjective={selectedMarketingObjective}
280
- onMarketingObjectiveSelect={onMarketingObjectiveSelect}
281
- defaultmarketingObjective={socialObjective || fbMarketingObjectiveValue}
282
- onSubmit={setDrawerVisibility}
283
- marketingObjectiveList={categorizedMarketingObjectiveList}
284
- />
285
- }
286
- visible={isDrawerVisible}
287
- width={380}
288
- onClose={() => setDrawerVisibility(false)}
289
- />
290
- </div>
252
+ const onFacebookAdManagerContinue = useCallback(() => {
253
+ if (adManager === AD_MANAGER) {
254
+ onFacebookSubmit({ channel: "FACEBOOK", selectedMarketingObjective, accountId });
255
+ } else {
256
+ setTemplateList(true);
257
+ }
258
+ }, [
259
+ selectedMarketingObjective,
260
+ accountId,
261
+ adManager,
262
+ setAdManager,
263
+ setTemplateList,
264
+ showTemplateList,
265
+ ]);
266
+ const query = {type: 'embedded', module: 'library'};
267
+ const location = {pathname: `/FACEBOOK`, search: '', query};
268
+ return (showTemplateList ? (
269
+ <Templates
270
+ key={"FACEBOOK"}
271
+ location={location}
272
+ route={{name: "FACEBOOK"}}
273
+ router={router}
274
+ isFullMode={isFullMode}
275
+ createNew={createNew}
276
+ onSelectTemplate={onSelectTemplate}
277
+ renderNewCardGrid={renderNewCardGrid}
278
+ handlePeviewTemplate={handlePeviewTemplate}
279
+ fbAdManger={CREATIVE}
280
+ />
281
+ ) :
282
+ (!isFullMode && messageStrategy !== "X_ENGAGE" && fbAdManger !== CREATIVE) ?
283
+ (<div className={className}>
284
+
285
+ <div className="is-scrollable-section" >
286
+ <div className="account-details-wrapper">
287
+ <div className="account-name-section">
288
+ <CapHeading type="h4">
289
+ <FormattedMessage {...messages.fbAccount} />
290
+ </CapHeading>
291
+ <CapHeading type="h3">{accountName}</CapHeading>
292
+ </div>
291
293
 
292
- <div className="ad-section">
293
- <div className="account-section-container">
294
- <CapHeading type="h3">
295
- <FormattedMessage {...messages.fbAdsTitle} />
296
- </CapHeading>
297
- <CapLabel type="label1">
298
- <FormattedMessage {...messages.fbAdsDescription} />
299
- </CapLabel>
300
- </div>
294
+ <div className="account-section-container">
295
+ <CapHeading type="h3">
296
+ <FormattedMessage {...messages.fbAdCampaignSetDetailsTitle} />
297
+ </CapHeading>
298
+ <CapLabel type="label1">
299
+ <FormattedMessage
300
+ {...messages.fbAdCampaignSetDetailsDescription}
301
+ />
302
+ </CapLabel>
303
+ </div>
301
304
 
302
- <div>
303
- <CapRow span={12} type="flex">
304
- <CapColumn span={6}>
305
- <CapCustomCard
306
- type="Facebook"
307
- FBDynamicComponent={() => (
308
- <CapIcon
309
- size="l"
310
- type="scenery"
311
- className="facebook-dynamic-content"
312
- />
313
- )}
305
+ <CapRow span={12} type="flex">
306
+ {campaignDataList.map(({ label, value, onChange }, index) => (
307
+ <StyledCampaignDetailCapColumn
308
+ span={index % 2 === 0 ? 6 : 14}
309
+ key={label}
310
+ >
311
+ <CapRow>
312
+ <CapLabel type="label2">
313
+ <FormattedMessage {...messages[label]} />
314
+ </CapLabel>
315
+ <CapHeading type="h4">
316
+ {value}
317
+ {!socialRemoteCampaignId && onChange && (
318
+ <CapButton
319
+ type="flat"
320
+ className="marketingObjective-change-button facebook-marketing-objective-change"
321
+ onClick={onChange}
322
+ >
323
+ <FormattedMessage {...messages.fbChange} />
324
+ </CapButton>
325
+ )}
326
+ </CapHeading>
327
+ </CapRow>
328
+ </StyledCampaignDetailCapColumn>
329
+ ))}
330
+ </CapRow>
331
+ <CapDrawer
332
+ content={
333
+ <MarketingObjective
334
+ selectedMarketingObjective={selectedMarketingObjective}
335
+ onMarketingObjectiveSelect={onMarketingObjectiveSelect}
336
+ defaultmarketingObjective={socialObjective || fbMarketingObjectiveValue}
337
+ onSubmit={setDrawerVisibility}
338
+ marketingObjectiveList={categorizedMarketingObjectiveList}
314
339
  />
315
- </CapColumn>
316
- <CapColumn span={16}>
317
- <ul className="parameter-list">
318
- {adSetParameters.map((parameter, index) => (
319
- <li key={parameter} className="parameter-list-item">
320
- <CapLabel type="label2" className="parameter-index">
321
- {index + 1}
322
- </CapLabel>
323
- <CapHeading type="h5">
324
- <FormattedMessage {...messages[parameter]} />
325
- </CapHeading>
326
- </li>
327
- ))}
328
- </ul>
329
- </CapColumn>
330
- </CapRow>
331
- </div>
332
- </div>
333
- </div>
334
- <CapButton
335
- className="facebook-confirm-button"
336
- type="primary"
337
- onClick={() =>
338
- onFacebookSubmit({ channel: "FACEBOOK", selectedMarketingObjective, accountId })
339
- }
340
- >
341
- <FormattedMessage {...messages.fbConfirm} />
342
- </CapButton>
343
- </div>) : <div style={{height: '1200px'}}>
344
- <Advertisement
345
- isFullMode={isFullMode}
346
- actions={facebookActions}
347
- fbADData={fbADData}
348
- onCreateComplete={onCreateComplete}
349
- templateData={templateData}
350
- params={params}
351
- facebookTemplateData={facebookTemplateData}
352
- /></div>
340
+ }
341
+ visible={isDrawerVisible}
342
+ width={380}
343
+ onClose={() => setDrawerVisibility(false)}
344
+ />
345
+ </div>
346
+
347
+ <div className="ad-section">
348
+ <CapHeading type="h4" style={{marginBottom: 17}}>
349
+ <FormattedMessage
350
+ {...messages.adManagerHeading}
351
+ />
352
+ </CapHeading>
353
+ <CapRadioGroup
354
+ style={{paddingBottom: '18px'}}
355
+ options={radioOptions}
356
+ onChange={onChangeAdManager}
357
+ value={adManager}
358
+ key={`fb-ad-creatives`}
359
+ />
360
+ {adManager === AD_MANAGER ? <>
361
+ <div className="account-section-container">
362
+ <CapLabel type="label1">
363
+ <FormattedMessage {...messages.fbAdsDescription} />
364
+ </CapLabel>
365
+ </div>
366
+
367
+
368
+ <CapRow span={12} type="flex">
369
+ <CapColumn span={6}>
370
+ <CapCustomCard
371
+ type="Facebook"
372
+ FBDynamicComponent={() => (
373
+ <CapIcon
374
+ size="l"
375
+ type="scenery"
376
+ className="facebook-dynamic-content"
377
+ />
378
+ )}
379
+ />
380
+ </CapColumn>
381
+ <CapColumn span={16}>
382
+ <ul className="parameter-list">
383
+ {adSetParameters.map((parameter, index) => (
384
+ <li key={parameter} className="parameter-list-item">
385
+ <CapLabel type="label2" className="parameter-index">
386
+ {index + 1}
387
+ </CapLabel>
388
+ <CapHeading type="h5">
389
+ <FormattedMessage {...messages[parameter]} />
390
+ </CapHeading>
391
+ </li>
392
+ ))}
393
+ </ul>
394
+ </CapColumn>
395
+ </CapRow></> : <CapLabel type="label1"><FormattedMessage {...messages.capAdManagerHeading}/></CapLabel>}
396
+
397
+ </div>
398
+ </div>
399
+ <CapButton
400
+ className="facebook-confirm-button"
401
+ type="primary"
402
+ onClick={onFacebookAdManagerContinue}
403
+ >
404
+ <FormattedMessage {...messages.fbContinue} />
405
+ </CapButton>
406
+ </div>
407
+ ) :
408
+ <div style={{height: '1200px'}}>
409
+ <Advertisement
410
+ isFullMode={isFullMode}
411
+ actions={facebookActions}
412
+ fbADData={fbADData}
413
+ onCreateComplete={onCreateComplete}
414
+ templateData={templateData}
415
+ params={params}
416
+ facebookTemplateData={facebookTemplateData}
417
+ messageStrategy={messageStrategy}
418
+ />
419
+ </div>
353
420
  );
354
421
  };
355
422
 
@@ -367,6 +434,7 @@ Facebook.propTypes = {
367
434
  fbADData: PropTypes.object,
368
435
  onCreateComplete: PropTypes.func,
369
436
  facebookTemplateData: PropTypes.object,
437
+ messageStrategy: PropTypes.string,
370
438
  };
371
439
 
372
440
  Facebook.defaultProps = {
@@ -42,7 +42,7 @@ export default defineMessages({
42
42
  },
43
43
  fbAdsDescription: {
44
44
  id: `${messagePrefix}.fbAdsDescription`,
45
- defaultMessage: 'You may create ads in Facebook Ad Manager under the below mentioned ad set. The performance of these ads will be reported here in Engage+.',
45
+ defaultMessage: 'Proceed with empty content block & you can create ads in Facebook Ad Manager under the mentioned ad set.',
46
46
  },
47
47
  fbAdsDetailOne: {
48
48
  id: `${messagePrefix}.fbAdsDetailOne`,
@@ -56,9 +56,9 @@ export default defineMessages({
56
56
  id: `${messagePrefix}.fbAdsDetailThree`,
57
57
  defaultMessage: 'You can create ads later in Facebook ad manager.',
58
58
  },
59
- fbConfirm: {
60
- id: `${messagePrefix}.fbConfirm`,
61
- defaultMessage: 'Confirm',
59
+ fbContinue: {
60
+ id: `${messagePrefix}.fbContinue`,
61
+ defaultMessage: 'Continue',
62
62
  },
63
63
  fbChange: {
64
64
  id: `${messagePrefix}.fbChange`,
@@ -164,4 +164,20 @@ export default defineMessages({
164
164
  id: `${messagePrefix}.fbMarketingObjectiveStoreTrafficDescription`,
165
165
  defaultMessage: 'Drive visits to your physical stores by showing ads to people who are nearby.',
166
166
  },
167
+ capFbAdManager: {
168
+ id: `${messagePrefix}.capFbAdManager`,
169
+ defaultMessage: 'Capillary Facebook ad manager',
170
+ },
171
+ fbAdManager: {
172
+ id: `${messagePrefix}.fbAdManager`,
173
+ defaultMessage: 'Facebook ad manager',
174
+ },
175
+ adManagerHeading:{
176
+ id: `${messagePrefix}.adManagerHeading`,
177
+ defaultMessage: "Where do you want to create your Facebook ad creative?"
178
+ },
179
+ capAdManagerHeading:{
180
+ id: `${messagePrefix}.capAdManagerHeading`,
181
+ defaultMessage: "You can create Facebook ads creative in Engage+ Facebook ad Manager."
182
+ }
167
183
  });
@@ -76,7 +76,7 @@ export function* uploadFbAdAsset(file, assetType, fileParams) {
76
76
  }
77
77
  if (result.status.isError) {
78
78
  yield put({ type: UPLOAD_FB_AD_ASSET_FAILURE, error: result.status.message });
79
- } else if (videoIdResponse.status?.isError) {
79
+ } else if (videoIdResponse.status.isError) {
80
80
  yield put({ type: UPLOAD_FB_AD_ASSET_FAILURE, error: result.status });
81
81
  } else {
82
82
  yield put({
@@ -7,7 +7,7 @@
7
7
  import * as types from './constants';
8
8
 
9
9
  export function changeLocale(languageLocale) {
10
-
10
+ console.log('trying to change locale', languageLocale);
11
11
  return {
12
12
  type: types.CHANGE_LOCALE,
13
13
  locale: languageLocale,
@@ -7,7 +7,7 @@
7
7
  import * as types from './constants';
8
8
 
9
9
  export function createTemplate(template, callback) {
10
-
10
+ console.log('action trigereed createtemplate');
11
11
  return {
12
12
  type: types.CREATE_TEMPLATE_REQUEST,
13
13
  template,
@@ -16,7 +16,7 @@ export function createTemplate(template, callback) {
16
16
  }
17
17
 
18
18
  export function clearCreateResponse() {
19
-
19
+ console.log('clearCreateResponse');
20
20
  return {
21
21
  type: types.CLEAR_CREATE_RESPONSE_REQUEST,
22
22
  };
@@ -50,7 +50,7 @@ export function clearAsset(templateType) {
50
50
 
51
51
 
52
52
  export function editTemplate(template, callback) {
53
-
53
+ console.log('action trigereed editTemplate line @@@');
54
54
  return {
55
55
  type: types.EDIT_TEMPLATE_REQUEST,
56
56
  template,
@@ -59,7 +59,7 @@ export function editTemplate(template, callback) {
59
59
  }
60
60
 
61
61
  export function getTemplateDetails(id, callback) {
62
-
62
+ console.log('getting template line @@@', id);
63
63
  return {
64
64
  type: types.GET_TEMPLATE_DETAILS_REQUEST,
65
65
  id,
@@ -69,7 +69,7 @@ export function getTemplateDetails(id, callback) {
69
69
  }
70
70
 
71
71
  export function clearEditResponse() {
72
-
72
+ console.log('clearEditResponse');
73
73
  return {
74
74
  type: types.CLEAR_EDIT_RESPONSE_REQUEST,
75
75
  };
@@ -34,13 +34,13 @@ export function* uploadAsset(file, assetType, fileParams ) {
34
34
  }
35
35
 
36
36
  function* watchCreateTemplate() {
37
-
37
+ console.log('inside watch line saga createTemplate@@@');
38
38
  const watcher = yield takeLatest(types.CREATE_TEMPLATE_REQUEST, createTemplate);
39
39
  yield take(LOCATION_CHANGE);
40
40
  yield cancel(watcher);
41
41
  }
42
42
  function* watchUploadAsset() {
43
-
43
+ console.log("inside watchUploadAsset");
44
44
  const watcher = yield takeLatest(types.UPLOAD_ASSET_REQUEST, uploadAsset);
45
45
  yield take(LOCATION_CHANGE);
46
46
  yield cancel(watcher);
@@ -70,7 +70,7 @@ export function* editTemplate({ template, callback }) {
70
70
 
71
71
  export function* getTemplateDetails(id) {
72
72
  try {
73
-
73
+ console.log('saga get Template details line', id);
74
74
  const result = yield call(Api.getTemplateDetails, id);
75
75
  // const sidebar = result.response.sidebar;
76
76
  yield put({ type: types.GET_TEMPLATE_DETAILS_SUCCESS, data: result.response });
@@ -84,7 +84,7 @@ export function* getTemplateDetails(id) {
84
84
 
85
85
  export function* getLineTemplatesList(params) {
86
86
  try {
87
-
87
+ console.log('Saga param line ', params.channel, params.queryParams);
88
88
  const result = yield call(Api.getAllTemplates, {channel: params.channel, queryParams: params.queryParams});
89
89
  yield put({ type: types.GET_LINE_TEMPLATES_LIST_SUCCESS, data: result.response.templates, templateData: result.response.mapped});
90
90
  } catch (error) {
@@ -7,14 +7,14 @@
7
7
  import * as types from './constants';
8
8
 
9
9
  export function createTemplate(template, callback) {
10
-
10
+ console.log('action trigereed createtemplate');
11
11
  return {
12
12
  type: types.CREATE_TEMPLATE_REQUEST, template, callback,
13
13
  };
14
14
  }
15
15
 
16
16
  export function clearCreateResponse() {
17
-
17
+ console.log('clearCreateResponse');
18
18
  return {
19
19
  type: types.CLEAR_CREATE_RESPONSE_REQUEST,
20
20
  };
@@ -197,7 +197,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
197
197
  this.setState({currentTab: data});
198
198
  };
199
199
  onTemplateNameChange = () => {
200
- //
200
+ // console.log('Template name changed to ', name);
201
201
  };
202
202
 
203
203
 
@@ -9,7 +9,7 @@ import * as types from './constants';
9
9
  export function* createTemplate(template) {
10
10
  let errorMsg;
11
11
  try {
12
-
12
+ console.log('saga createTemplate mobilepush', template);
13
13
  const result = yield call(Api.createMobilePushTemplate, template);
14
14
  if (result.message) {
15
15
  errorMsg = result.message;
@@ -43,7 +43,7 @@ export function* getIosCtas(licenseCode) {
43
43
  }
44
44
 
45
45
  function* watchCreateTemplate() {
46
-
46
+ console.log('inside watch');
47
47
  const watcher = yield takeLatest(types.CREATE_TEMPLATE_REQUEST, createTemplate);
48
48
  yield take(LOCATION_CHANGE);
49
49
  yield cancel(watcher);
@@ -14,14 +14,14 @@ export function defaultAction() {
14
14
  }
15
15
 
16
16
  export function editTemplate(template, callback) {
17
-
17
+ console.log('action trigereed');
18
18
  return {
19
19
  type: types.EDIT_TEMPLATE_REQUEST, template, callback,
20
20
  };
21
21
  }
22
22
 
23
23
  export function getTemplateDetails(id) {
24
-
24
+ console.log('getting template', id);
25
25
  return {
26
26
  type: types.GET_TEMPLATE_DETAILS_REQUEST, id,
27
27
  };
@@ -41,7 +41,7 @@ export function uploadAsset(file, assetType, fileParams, mode) {
41
41
  };
42
42
  }
43
43
  export function clearEditResponse() {
44
-
44
+ console.log('clearEditResponse');
45
45
  return {
46
46
  type: types.CLEAR_EDIT_RESPONSE_REQUEST,
47
47
  };