@capillarytech/creatives-library 2.0.85 → 2.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -2
- package/v2Components/FormBuilder/index.js +6 -6
- package/v2Containers/CallTask/index.js +1 -1
- package/v2Containers/CallTask/sagas.js +1 -1
- package/v2Containers/Cap/tests/selectors.test.js +1 -1
- package/v2Containers/ChannelTemplates/sagas.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +6 -0
- package/v2Containers/CreativesContainer/index.js +15 -2
- package/v2Containers/CreativesContainer/sagas.js +1 -1
- package/v2Containers/Dashboard/sagas.js +1 -1
- package/v2Containers/Ebill/constants.js +11 -11
- package/v2Containers/Ebill/index.js +1 -1
- package/v2Containers/Email/constants.js +24 -24
- package/v2Containers/Email/index.js +1 -1
- package/v2Containers/EmailWrapper/sagas.js +1 -1
- package/v2Containers/Line/Create/constants.js +22 -22
- package/v2Containers/Line/Create/index.js +1 -1
- package/v2Containers/Line/Edit/constants.js +16 -16
- package/v2Containers/Login/index.js +2 -2
- package/v2Containers/MobilePush/Create/constants.js +14 -14
- package/v2Containers/MobilePush/Create/index.js +1 -1
- package/v2Containers/MobilePush/Edit/constants.js +23 -23
- package/v2Containers/MobilepushWrapper/index.js +8 -0
- package/v2Containers/Sms/Create/constants.js +6 -6
- package/v2Containers/Sms/Create/index.js +6 -5
- package/v2Containers/Sms/Create/messages.js +8 -0
- package/v2Containers/Sms/Edit/constants.js +8 -8
- package/v2Containers/Sms/Edit/index.js +6 -6
- package/v2Containers/Sms/commonMethods.js +18 -0
- package/v2Containers/TagList/index.js +1 -1
- package/v2Containers/TagList/sagas.js +1 -1
- package/v2Containers/Templates/constants.js +37 -37
- package/v2Containers/Templates/index.js +6 -1
- package/v2Containers/TestPage/constants.js +1 -1
- package/v2Containers/TestPage/sagas.js +1 -1
- package/v2Containers/Testv2/sagas.js +1 -1
- package/v2Containers/WeChat/MapTemplates/constants.js +16 -16
- package/v2Containers/WeChat/MapTemplates/index.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Create/constants.js +9 -9
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +2 -2
- package/v2Containers/WeChat/RichmediaTemplates/Create/sagas.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Edit/constants.js +3 -3
- package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/View/sagas.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.86",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "LicenseRef-LICENSE",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@capillarytech/cap-react-ui-library": "^1.11.14",
|
|
16
15
|
"@capillarytech/cap-ui-library": "^1.0.168",
|
|
17
16
|
"antd": "3.19.6",
|
|
18
17
|
"axios": "^0.16.2",
|
|
@@ -14,14 +14,14 @@ import _ from 'lodash';
|
|
|
14
14
|
import { Tabs, Table, Modal} from 'antd';
|
|
15
15
|
import { CapButton, CapInput, CapPopover, CapCheckbox, CapRadio, CapSelect, CapTable, CapRow, CapColumn, CapNotification} from '@capillarytech/cap-ui-library';
|
|
16
16
|
import LabelHOC from '@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC';
|
|
17
|
-
import TemplatePreview from '
|
|
18
|
-
import TagList from '../../
|
|
17
|
+
import TemplatePreview from '../TemplatePreview';
|
|
18
|
+
import TagList from '../../v2Containers/TagList';
|
|
19
19
|
import SmsEditor from '../SmsEditor';
|
|
20
20
|
import SlideBox from '../SlideBox';
|
|
21
21
|
import CardGrid from '../CardGrid';
|
|
22
|
-
import CKEditor from "
|
|
23
|
-
import EDMEditor from "
|
|
24
|
-
import CustomPopOver from '
|
|
22
|
+
import CKEditor from "../Ckeditor/";
|
|
23
|
+
import EDMEditor from "../Edmeditor";
|
|
24
|
+
import CustomPopOver from '../CustomPopOver';
|
|
25
25
|
import './_formBuilder.scss';
|
|
26
26
|
import {updateCharCount, checkUnicode} from "../../utils/smsCharCountV2";
|
|
27
27
|
const TabPane = Tabs.TabPane;
|
|
@@ -451,7 +451,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
451
451
|
if (tagValidationResponse.valid) {
|
|
452
452
|
errorData[count][`sms-editor${index > 1 ? index : ''}`] = false;
|
|
453
453
|
} else {
|
|
454
|
-
|
|
454
|
+
errorData[count]['invalid-tags'] = tagValidationResponse.unsupportedTags;
|
|
455
455
|
errorData[count][`sms-editor${index > 1 ? index : ''}`] = true;
|
|
456
456
|
isValid = false;
|
|
457
457
|
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import { injectIntl, intlShape } from 'react-intl';
|
|
18
18
|
import { createStructuredSelector } from 'reselect';
|
|
19
19
|
import { makeSelectMetaEntities, isLoadingMetaEntities } from '../Cap/selectors';
|
|
20
|
-
import * as globalActions from '
|
|
20
|
+
import * as globalActions from '../Cap/actions';
|
|
21
21
|
import * as actions from "./actions";
|
|
22
22
|
import makeSelectCallTask from './selectors';
|
|
23
23
|
import NewCallTask from '../../v2Components/NewCallTask';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fromJS } from 'immutable';
|
|
2
2
|
|
|
3
|
-
import { makeSelectLocationState } from '
|
|
3
|
+
import { makeSelectLocationState } from 'v2Containers/Cap/selectors';
|
|
4
4
|
|
|
5
5
|
describe('makeSelectLocationState', () => {
|
|
6
6
|
it('should select the route as a plain JS object', () => {
|
|
@@ -6,7 +6,7 @@ import * as Api from '../../services/api';
|
|
|
6
6
|
import * as types from './constants';
|
|
7
7
|
// Individual exports for testing
|
|
8
8
|
export function* defaultSaga() {
|
|
9
|
-
// See example in
|
|
9
|
+
// See example in v2Containers/HomePage/sagas.js
|
|
10
10
|
}
|
|
11
11
|
function* getTemplates(action) {
|
|
12
12
|
try {
|
|
@@ -38,6 +38,8 @@ function SlideBoxContent(props) {
|
|
|
38
38
|
onMobilepushModeChange,
|
|
39
39
|
mobilePushCreateMode,
|
|
40
40
|
templateStep,
|
|
41
|
+
onEnterTemplateName,
|
|
42
|
+
onRemoveTemplateName,
|
|
41
43
|
onCreateNextStep,
|
|
42
44
|
cap,
|
|
43
45
|
onResetStep,
|
|
@@ -222,6 +224,8 @@ function SlideBoxContent(props) {
|
|
|
222
224
|
step={templateStep}
|
|
223
225
|
showNextStep={onCreateNextStep}
|
|
224
226
|
isFullMode={isFullMode}
|
|
227
|
+
onEnterTemplateName={onEnterTemplateName}
|
|
228
|
+
onRemoveTemplateName={onRemoveTemplateName}
|
|
225
229
|
cap={cap}
|
|
226
230
|
onResetStep={onResetStep}
|
|
227
231
|
showTemplateName={showTemplateName}
|
|
@@ -246,6 +250,8 @@ SlideBoxContent.propTypes = {
|
|
|
246
250
|
emailCreateMode: PropTypes.string,
|
|
247
251
|
templateStep: PropTypes.string,
|
|
248
252
|
onCreateNextStep: PropTypes.func,
|
|
253
|
+
onEnterTemplateName: PropTypes.func,
|
|
254
|
+
onRemoveTemplateName: PropTypes.func,
|
|
249
255
|
cap: PropTypes.object,
|
|
250
256
|
onResetStep: PropTypes.func,
|
|
251
257
|
onCallTaskSubmit: PropTypes.func,
|
|
@@ -45,6 +45,7 @@ class Creatives extends React.Component {
|
|
|
45
45
|
showSlideBox: true,
|
|
46
46
|
slidBoxContent: this.getSlideBocContent({mode: props.creativesMode, templateData: props.templateData, isFullMode: props.isFullMode}),
|
|
47
47
|
templateData: this.getTemplateData(props.templateData),
|
|
48
|
+
templateNameExists: false,
|
|
48
49
|
currentChannel: this.props.channel || 'sms',
|
|
49
50
|
};
|
|
50
51
|
this.creativesTemplateSteps = {
|
|
@@ -60,6 +61,13 @@ class Creatives extends React.Component {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
onEnterTemplateName = () => {
|
|
65
|
+
this.setState({templateNameExists: true});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
onRemoveTemplateName = () => {
|
|
69
|
+
this.setState({templateNameExists: false});
|
|
70
|
+
}
|
|
63
71
|
|
|
64
72
|
onSelectTemplate = (template) => {
|
|
65
73
|
this.setState({ slidBoxContent: 'editTemplate', templateData: template });
|
|
@@ -276,7 +284,7 @@ class Creatives extends React.Component {
|
|
|
276
284
|
}
|
|
277
285
|
shouldShowFooter = () => {
|
|
278
286
|
const {isFullMode } = this.props;
|
|
279
|
-
const {slidBoxContent, currentChannel, emailCreateMode, templateStep, mobilePushCreateMode} = this.state;
|
|
287
|
+
const {slidBoxContent, currentChannel, emailCreateMode, templateNameExists, templateStep, mobilePushCreateMode} = this.state;
|
|
280
288
|
const channel = currentChannel.toUpperCase();
|
|
281
289
|
const currentStep = this.creativesTemplateSteps[templateStep];
|
|
282
290
|
let showFooter = false;
|
|
@@ -303,7 +311,10 @@ class Creatives extends React.Component {
|
|
|
303
311
|
if (slidBoxContent === "editTemplate" && ((channel === constants.EMAIL && currentStep === 'modeSelection'))) {
|
|
304
312
|
showFooter = true;
|
|
305
313
|
}
|
|
306
|
-
if (channel === constants.MOBILE_PUSH &&
|
|
314
|
+
if (channel === constants.MOBILE_PUSH &&
|
|
315
|
+
((slidBoxContent === 'createTemplate' && !isEmpty(mobilePushCreateMode))
|
|
316
|
+
|| (slidBoxContent === 'editTemplate' && currentStep === 'modeSelection')) &&
|
|
317
|
+
templateNameExists) {
|
|
307
318
|
showFooter = true;
|
|
308
319
|
}
|
|
309
320
|
|
|
@@ -421,6 +432,8 @@ class Creatives extends React.Component {
|
|
|
421
432
|
emailCreateMode={emailCreateMode}// upload zip || use editor are values
|
|
422
433
|
templateStep={this.creativesTemplateSteps[templateStep]}
|
|
423
434
|
onCreateNextStep={this.onCreateNextStep}
|
|
435
|
+
onEnterTemplateName={this.onEnterTemplateName}
|
|
436
|
+
onRemoveTemplateName={this.onRemoveTemplateName}
|
|
424
437
|
onResetStep={this.resetStep}
|
|
425
438
|
cap={cap}
|
|
426
439
|
setIsLoadingContent={this.setIsLoadingContent}
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const CREATE_TEMPLATE_REQUEST = 'app/
|
|
8
|
-
export const CREATE_TEMPLATE_SUCCESS = 'app/
|
|
9
|
-
export const CREATE_TEMPLATE_FAILURE = 'app/
|
|
7
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Ebill/CREATE_TEMPLATE_REQUEST';
|
|
8
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Ebill/CREATE_TEMPLATE_SUCCESS';
|
|
9
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Ebill/CREATE_TEMPLATE_FAILURE';
|
|
10
10
|
|
|
11
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
12
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
13
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
11
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/Ebill/GET_TEMPLATE_DETAILS_REQUEST';
|
|
12
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/Ebill/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
13
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/Ebill/GET_TEMPLATE_DETAILS_FAILURE';
|
|
14
14
|
|
|
15
|
-
export const GET_CMS_EDITOR_DATA_REQUEST = 'app/
|
|
16
|
-
export const GET_CMS_EDITOR_DATA_SUCCESS = 'app/
|
|
17
|
-
export const GET_CMS_EDITOR_DATA_FAILURE = 'app/
|
|
15
|
+
export const GET_CMS_EDITOR_DATA_REQUEST = 'app/v2Containers/Ebill/GET_CMS_EDITOR_DATA_REQUEST';
|
|
16
|
+
export const GET_CMS_EDITOR_DATA_SUCCESS = 'app/v2Containers/Ebill/GET_CMS_EDITOR_DATA_SUCCESS';
|
|
17
|
+
export const GET_CMS_EDITOR_DATA_FAILURE = 'app/v2Containers/Ebill/GET_CMS_EDITOR_DATA_FAILURE';
|
|
18
18
|
|
|
19
|
-
export const CLEAR_EBILL_CRUD_RESPONSE_REQUEST = 'app/
|
|
20
|
-
export const CLEAR_ALL_VALUES = "app/
|
|
19
|
+
export const CLEAR_EBILL_CRUD_RESPONSE_REQUEST = 'app/v2Containers/Ebill/CLEAR_EBILL_CRUD_RESPONSE_REQUEST';
|
|
20
|
+
export const CLEAR_ALL_VALUES = "app/v2Containers/Ebill/CLEAR_ALL_VALUES";
|
|
@@ -17,7 +17,7 @@ import { createStructuredSelector } from 'reselect';
|
|
|
17
17
|
import * as actions from './actions';
|
|
18
18
|
import FormBuilder from '../../v2Components/FormBuilder';
|
|
19
19
|
import { makeSelectMetaEntities, makeSelectAuthenticated, setInjectedTags } from '../Cap/selectors';
|
|
20
|
-
import * as globalActions from '
|
|
20
|
+
import * as globalActions from '../Cap/actions';
|
|
21
21
|
import { UserIsAuthenticated } from '../../utils/authWrapper';
|
|
22
22
|
import { makeSelectTemplates } from '../Templates/selectors';
|
|
23
23
|
import {getMessageObject} from '../../utils/messageUtils';
|
|
@@ -4,34 +4,34 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const CREATE_TEMPLATE_REQUEST = 'app/
|
|
8
|
-
export const CREATE_TEMPLATE_SUCCESS = 'app/
|
|
9
|
-
export const CREATE_TEMPLATE_FAILURE = 'app/
|
|
7
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Email/CREATE_TEMPLATE_REQUEST';
|
|
8
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Email/CREATE_TEMPLATE_SUCCESS';
|
|
9
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Email/CREATE_TEMPLATE_FAILURE';
|
|
10
10
|
|
|
11
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
12
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
13
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
11
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/Email/GET_TEMPLATE_DETAILS_REQUEST';
|
|
12
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/Email/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
13
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/Email/GET_TEMPLATE_DETAILS_FAILURE';
|
|
14
14
|
|
|
15
|
-
export const GET_ALL_ASSETS_REQUEST = 'app/
|
|
16
|
-
export const GET_ALL_ASSETS_SUCCESS = 'app/
|
|
17
|
-
export const GET_ALL_ASSETS_FAILURE = 'app/
|
|
15
|
+
export const GET_ALL_ASSETS_REQUEST = 'app/v2Containers/Email/GET_ALL_ASSETS_REQUEST';
|
|
16
|
+
export const GET_ALL_ASSETS_SUCCESS = 'app/v2Containers/Email/GET_ALL_ASSETS_SUCCESS';
|
|
17
|
+
export const GET_ALL_ASSETS_FAILURE = 'app/v2Containers/Email/GET_ALL_ASSETS_FAILURE';
|
|
18
18
|
|
|
19
|
-
export const GET_CMS_EDITOR_DETAILS_REQUEST = 'app/
|
|
20
|
-
export const GET_CMS_EDITOR_DETAILS_SUCCESS = 'app/
|
|
21
|
-
export const GET_CMS_EDITOR_DETAILS_FAILURE = 'app/
|
|
19
|
+
export const GET_CMS_EDITOR_DETAILS_REQUEST = 'app/v2Containers/Email/GET_CMS_EDITOR_DETAILS_REQUEST';
|
|
20
|
+
export const GET_CMS_EDITOR_DETAILS_SUCCESS = 'app/v2Containers/Email/GET_CMS_EDITOR_DETAILS_SUCCESS';
|
|
21
|
+
export const GET_CMS_EDITOR_DETAILS_FAILURE = 'app/v2Containers/Email/GET_CMS_EDITOR_DETAILS_FAILURE';
|
|
22
22
|
|
|
23
|
-
export const GET_CMS_EDITOR_DATA_REQUEST = 'app/
|
|
24
|
-
export const GET_CMS_EDITOR_DATA_SUCCESS = 'app/
|
|
25
|
-
export const GET_CMS_EDITOR_DATA_FAILURE = 'app/
|
|
26
|
-
export const RESET_CMS_EDITOR_DATA = 'app/
|
|
23
|
+
export const GET_CMS_EDITOR_DATA_REQUEST = 'app/v2Containers/Email/GET_CMS_EDITOR_DATA_REQUEST';
|
|
24
|
+
export const GET_CMS_EDITOR_DATA_SUCCESS = 'app/v2Containers/Email/GET_CMS_EDITOR_DATA_SUCCESS';
|
|
25
|
+
export const GET_CMS_EDITOR_DATA_FAILURE = 'app/v2Containers/Email/GET_CMS_EDITOR_DATA_FAILURE';
|
|
26
|
+
export const RESET_CMS_EDITOR_DATA = 'app/v2Containers/Email/RESET_CMS_EDITOR_DATA';
|
|
27
27
|
|
|
28
|
-
export const UPLOAD_ASSET_REQUEST = 'app/
|
|
29
|
-
export const UPLOAD_ASSET_SUCCESS = 'app/
|
|
30
|
-
export const UPLOAD_ASSET_FAILURE = 'app/
|
|
28
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Email/UPLOAD_ASSET_REQUEST';
|
|
29
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Email/UPLOAD_ASSET_SUCCESS';
|
|
30
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Email/UPLOAD_ASSET_FAILURE';
|
|
31
31
|
|
|
32
|
-
export const CLEAR_EMAIL_CRUD_RESPONSE_REQUEST = "app/
|
|
33
|
-
export const CLEAR_ALL_VALUES = "app/
|
|
32
|
+
export const CLEAR_EMAIL_CRUD_RESPONSE_REQUEST = "app/v2Containers/Email/CLEAR_EMAIL_CRUD_RESPONSE_REQUEST";
|
|
33
|
+
export const CLEAR_ALL_VALUES = "app/v2Containers/Email/CLEAR_ALL_VALUES";
|
|
34
34
|
|
|
35
|
-
export const DUPLICATE_TEMPLATE_REQUEST = 'app/
|
|
36
|
-
export const DUPLICATE_TEMPLATE_SUCCESS = 'app/
|
|
37
|
-
export const DUPLICATE_TEMPLATE_FAILURE = 'app/
|
|
35
|
+
export const DUPLICATE_TEMPLATE_REQUEST = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_REQUEST';
|
|
36
|
+
export const DUPLICATE_TEMPLATE_SUCCESS = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_SUCCESS';
|
|
37
|
+
export const DUPLICATE_TEMPLATE_FAILURE = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_FAILURE';
|
|
@@ -19,7 +19,7 @@ import FormBuilder from '../../v2Components/FormBuilder';
|
|
|
19
19
|
import { makeSelectMetaEntities, selectCurrentOrgDetails, isLoadingMetaEntities, makeSelectAuthenticated, setInjectedTags } from '../Cap/selectors';
|
|
20
20
|
import * as actions from './actions';
|
|
21
21
|
import * as templatesActions from '../Templates/actions';
|
|
22
|
-
import * as globalActions from '
|
|
22
|
+
import * as globalActions from '../Cap/actions';
|
|
23
23
|
import { UserIsAuthenticated } from '../../utils/authWrapper';
|
|
24
24
|
import {makeSelectEmail} from './selectors';
|
|
25
25
|
import { makeSelectTemplates } from '../Templates/selectors';
|
|
@@ -7,33 +7,33 @@
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Create/DEFAULT_ACTION';
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
export const CREATE_TEMPLATE_REQUEST = 'app/
|
|
11
|
-
export const CREATE_TEMPLATE_SUCCESS = 'app/
|
|
12
|
-
export const CREATE_TEMPLATE_FAILURE = 'app/
|
|
13
|
-
export const UPLOAD_ASSET_REQUEST = 'app/
|
|
14
|
-
export const UPLOAD_ASSET_SUCCESS = 'app/
|
|
15
|
-
export const UPLOAD_ASSET_FAILURE = 'app/
|
|
16
|
-
export const CLEAR_ASSET = 'app/
|
|
10
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_REQUEST';
|
|
11
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_SUCCESS';
|
|
12
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_FAILURE';
|
|
13
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Line/Create/UPLOAD_ASSET_REQUEST';
|
|
14
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Line/Create/UPLOAD_ASSET_SUCCESS';
|
|
15
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Line/Create/UPLOAD_ASSET_FAILURE';
|
|
16
|
+
export const CLEAR_ASSET = 'app/v2Containers/Line/Create/CLEAR_ASSET';
|
|
17
17
|
|
|
18
|
-
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/
|
|
19
|
-
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/
|
|
20
|
-
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/
|
|
18
|
+
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_REQUEST';
|
|
19
|
+
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_SUCCESS';
|
|
20
|
+
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_FAILURE';
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
// edit
|
|
24
24
|
|
|
25
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
26
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
27
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
25
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
26
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
27
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
28
28
|
|
|
29
|
-
export const EDIT_TEMPLATE_REQUEST = 'app/
|
|
30
|
-
export const EDIT_TEMPLATE_SUCCESS = 'app/
|
|
31
|
-
export const EDIT_TEMPLATE_FAILURE = 'app/
|
|
29
|
+
export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_REQUEST';
|
|
30
|
+
export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_SUCCESS';
|
|
31
|
+
export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_FAILURE';
|
|
32
32
|
|
|
33
|
-
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/
|
|
34
|
-
export const CLEAR_DATA = 'app/
|
|
35
|
-
export const SET_SELECTED_TEMPLATE = 'app/
|
|
33
|
+
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/line/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
34
|
+
export const CLEAR_DATA = 'app/v2Containers/Line/Edit/CLEAR_DATA';
|
|
35
|
+
export const SET_SELECTED_TEMPLATE = 'app/v2Containers/Line/Edit/SET_SELECTED_TEMPLATE';
|
|
36
36
|
|
|
37
|
-
export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/
|
|
38
|
-
export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/
|
|
39
|
-
export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/
|
|
37
|
+
export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_REQUEST';
|
|
38
|
+
export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_SUCCESS';
|
|
39
|
+
export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_FAILURE';
|
|
@@ -10,7 +10,7 @@ import messages from './messages';
|
|
|
10
10
|
import * as actions from './actions';
|
|
11
11
|
import FormBuilder from '../../../v2Components/FormBuilder';
|
|
12
12
|
import { UserIsAuthenticated } from '../../../utils/authWrapper';
|
|
13
|
-
import * as globalActions from '
|
|
13
|
+
import * as globalActions from '../../Cap/actions';
|
|
14
14
|
//import { makeSelectCreate, makeSelectCreateResponse, makeSelectEdit, makeSelectEditResponse, makeSelectTemplateDetailsResponse } from './selectors';
|
|
15
15
|
import {makeSelectCreateLine} from './selectors';
|
|
16
16
|
import { makeSelectMetaEntities, setInjectedTags } from '../../Cap/selectors';
|
|
@@ -6,22 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Edit/DEFAULT_ACTION';
|
|
8
8
|
|
|
9
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
10
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
11
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
9
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
10
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
11
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
12
12
|
|
|
13
|
-
export const EDIT_TEMPLATE_REQUEST = 'app/
|
|
14
|
-
export const EDIT_TEMPLATE_SUCCESS = 'app/
|
|
15
|
-
export const EDIT_TEMPLATE_FAILURE = 'app/
|
|
13
|
+
export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_REQUEST';
|
|
14
|
+
export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_SUCCESS';
|
|
15
|
+
export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_FAILURE';
|
|
16
16
|
|
|
17
|
-
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/
|
|
18
|
-
export const UPLOAD_ASSET_REQUEST = 'app/
|
|
19
|
-
export const UPLOAD_ASSET_SUCCESS = 'app/
|
|
20
|
-
export const UPLOAD_ASSET_FAILURE = 'app/
|
|
21
|
-
export const CLEAR_DATA = 'app/
|
|
22
|
-
export const CLEAR_ASSET = 'app/
|
|
23
|
-
export const SET_SELECTED_TEMPLATE = 'app/
|
|
17
|
+
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/line/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
18
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Line/Edit/UPLOAD_ASSET_REQUEST';
|
|
19
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Line/Edit/UPLOAD_ASSET_SUCCESS';
|
|
20
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Line/Edit/UPLOAD_ASSET_FAILURE';
|
|
21
|
+
export const CLEAR_DATA = 'app/v2Containers/Line/Edit/CLEAR_DATA';
|
|
22
|
+
export const CLEAR_ASSET = 'app/v2Containers/Line/Edit/CLEAR_ASSET';
|
|
23
|
+
export const SET_SELECTED_TEMPLATE = 'app/v2Containers/Line/Edit/SET_SELECTED_TEMPLATE';
|
|
24
24
|
|
|
25
|
-
export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/
|
|
26
|
-
export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/
|
|
27
|
-
export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/
|
|
25
|
+
export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_REQUEST';
|
|
26
|
+
export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_SUCCESS';
|
|
27
|
+
export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_FAILURE';
|
|
@@ -10,8 +10,8 @@ import { createStructuredSelector } from 'reselect';
|
|
|
10
10
|
import makeSelectLogin from './selectors';
|
|
11
11
|
import messages from './messages';
|
|
12
12
|
import config from '../../config/app';
|
|
13
|
-
import LoginForm from './
|
|
14
|
-
import * as actions from '
|
|
13
|
+
import LoginForm from './components/LoginForm';
|
|
14
|
+
import * as actions from '../Cap/actions';
|
|
15
15
|
import { UserIsNotAuthenticated } from '../../utils/authWrapper';
|
|
16
16
|
import loaderGif from '../../assets/loading_img.gif';
|
|
17
17
|
const logo = require('./assets/images/capillary_logo.png');
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Create/DEFAULT_ACTION';
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
export const CREATE_TEMPLATE_REQUEST = 'app/
|
|
11
|
-
export const CREATE_TEMPLATE_SUCCESS = 'app/
|
|
12
|
-
export const CREATE_TEMPLATE_FAILURE = 'app/
|
|
13
|
-
export const UPLOAD_ASSET_REQUEST = 'app/
|
|
14
|
-
export const UPLOAD_ASSET_SUCCESS = 'app/
|
|
15
|
-
export const UPLOAD_ASSET_FAILURE = 'app/
|
|
16
|
-
export const CLEAR_ASSET = 'app/
|
|
10
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/PushMessage/Create/CREATE_TEMPLATE_REQUEST';
|
|
11
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/PushMessage/Create/CREATE_TEMPLATE_SUCCESS';
|
|
12
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/PushMessage/Create/CREATE_TEMPLATE_FAILURE';
|
|
13
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/PushMessage/Create/UPLOAD_ASSET_REQUEST';
|
|
14
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/PushMessage/Create/UPLOAD_ASSET_SUCCESS';
|
|
15
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/PushMessage/Create/UPLOAD_ASSET_FAILURE';
|
|
16
|
+
export const CLEAR_ASSET = 'app/v2Containers/PushMessage/Create/CLEAR_ASSET';
|
|
17
17
|
|
|
18
|
-
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/
|
|
19
|
-
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/
|
|
20
|
-
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/
|
|
21
|
-
export const GET_IOS_CTAS = 'app/
|
|
22
|
-
export const GET_IOS_CTAS_SUCCESS = 'app/
|
|
23
|
-
export const GET_IOS_CTAS_FAILURE = 'app/
|
|
24
|
-
export const RESET_STORE = 'app/
|
|
18
|
+
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/PushMessage/Create/CLEAR_CREATE_RESPONSE_REQUEST';
|
|
19
|
+
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/PushMessage/Create/CLEAR_CREATE_RESPONSE_SUCCESS';
|
|
20
|
+
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/PushMessage/Create/CLEAR_CREATE_RESPONSE_FAILURE';
|
|
21
|
+
export const GET_IOS_CTAS = 'app/v2Containers/PushMessage/Create/GET_IOS_CTAS';
|
|
22
|
+
export const GET_IOS_CTAS_SUCCESS = 'app/v2Containers/PushMessage/Create/GET_IOS_CTAS_SUCCESS';
|
|
23
|
+
export const GET_IOS_CTAS_FAILURE = 'app/v2Containers/PushMessage/Create/GET_IOS_CTAS_FAILURE';
|
|
24
|
+
export const RESET_STORE = 'app/v2Containers/PushMessage/Create/RESET_STORE';
|
|
@@ -17,7 +17,7 @@ import styled from 'styled-components';
|
|
|
17
17
|
import { CapSlideBox, CapHeader, CapTable, CapLink, CapRow, CapColumn, CapIcons, CapSpin, CapNotification } from '@capillarytech/cap-ui-library';
|
|
18
18
|
import { makeSelectCreate, makeSelectCreateResponse, makeSelectIosCta } from './selectors';
|
|
19
19
|
import { makeSelectMetaEntities, setInjectedTags } from '../../Cap/selectors';
|
|
20
|
-
import * as globalActions from '
|
|
20
|
+
import * as globalActions from '../../Cap/actions';
|
|
21
21
|
import FormBuilder from '../../../v2Components/FormBuilder';
|
|
22
22
|
import './_mobilePushCreate.scss';
|
|
23
23
|
import * as actions from './actions';
|
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Edit/DEFAULT_ACTION';
|
|
8
8
|
|
|
9
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
10
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
11
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
9
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/mobilePush/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
10
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/mobilePush/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
11
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/mobilePush/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
12
12
|
|
|
13
|
-
export const EDIT_TEMPLATE_REQUEST = 'app/
|
|
14
|
-
export const EDIT_TEMPLATE_SUCCESS = 'app/
|
|
15
|
-
export const EDIT_TEMPLATE_FAILURE = 'app/
|
|
13
|
+
export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/mobilePush/Edit/EDIT_TEMPLATE_REQUEST';
|
|
14
|
+
export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/mobilePush/Edit/EDIT_TEMPLATE_SUCCESS';
|
|
15
|
+
export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/mobilePush/Edit/EDIT_TEMPLATE_FAILURE';
|
|
16
16
|
|
|
17
|
-
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/
|
|
18
|
-
export const GET_IOS_CTAS = 'app/
|
|
19
|
-
export const GET_IOS_CTAS_SUCCESS = 'app/
|
|
20
|
-
export const GET_IOS_CTAS_FAILURE = 'app/
|
|
21
|
-
export const UPLOAD_ASSET_REQUEST = 'app/
|
|
22
|
-
export const UPLOAD_ASSET_SUCCESS = 'app/
|
|
23
|
-
export const UPLOAD_ASSET_FAILURE = 'app/
|
|
24
|
-
export const CLEAR_DATA = 'app/
|
|
25
|
-
export const CLEAR_ASSET = 'app/
|
|
26
|
-
export const SET_SELECTED_TEMPLATE = 'app/
|
|
17
|
+
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/mobilePush/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
18
|
+
export const GET_IOS_CTAS = 'app/v2Containers/PushMessage/Edit/GET_IOS_CTAS';
|
|
19
|
+
export const GET_IOS_CTAS_SUCCESS = 'app/v2Containers/PushMessage/Edit/GET_IOS_CTAS_SUCCESS';
|
|
20
|
+
export const GET_IOS_CTAS_FAILURE = 'app/v2Containers/PushMessage/Edit/GET_IOS_CTAS_FAILURE';
|
|
21
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/PushMessage/Edit/UPLOAD_ASSET_REQUEST';
|
|
22
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/PushMessage/Edit/UPLOAD_ASSET_SUCCESS';
|
|
23
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/PushMessage/Edit/UPLOAD_ASSET_FAILURE';
|
|
24
|
+
export const CLEAR_DATA = 'app/v2Containers/PushMessage/Edit/CLEAR_DATA';
|
|
25
|
+
export const CLEAR_ASSET = 'app/v2Containers/PushMessage/Edit/CLEAR_ASSET';
|
|
26
|
+
export const SET_SELECTED_TEMPLATE = 'app/v2Containers/PushMessage/Edit/SET_SELECTED_TEMPLATE';
|
|
27
27
|
|
|
28
|
-
export const SET_WECHAT_ACCOUNT = "app/
|
|
29
|
-
export const GET_WECRM_ACCOUNTS_REQUEST = "app/
|
|
30
|
-
export const GET_WECRM_ACCOUNTS_SUCCESS = "app/
|
|
31
|
-
export const GET_WECRM_ACCOUNTS_FAILURE = "app/
|
|
28
|
+
export const SET_WECHAT_ACCOUNT = "app/v2Containers/MobilePush/SET_WECHAT_ACCOUNT";
|
|
29
|
+
export const GET_WECRM_ACCOUNTS_REQUEST = "app/v2Containers/MobilePush/GET_WECRM_ACCOUNTS_REQUEST";
|
|
30
|
+
export const GET_WECRM_ACCOUNTS_SUCCESS = "app/v2Containers/MobilePush/GET_WECRM_ACCOUNTS_SUCCESS";
|
|
31
|
+
export const GET_WECRM_ACCOUNTS_FAILURE = "app/v2Containers/MobilePush/GET_WECRM_ACCOUNTS_FAILURE";
|
|
32
32
|
|
|
33
|
-
export const GET_MOBILEPUSH_TEMPLATES_LIST_REQUEST = 'app/
|
|
34
|
-
export const GET_MOBILEPUSH_TEMPLATES_LIST_SUCCESS = 'app/
|
|
35
|
-
export const GET_MOBILEPUSH_TEMPLATES_LIST_FAILURE = 'app/
|
|
33
|
+
export const GET_MOBILEPUSH_TEMPLATES_LIST_REQUEST = 'app/v2Containers/WeChat/GET_MOBILEPUSH_TEMPLATES_LIST_REQUEST';
|
|
34
|
+
export const GET_MOBILEPUSH_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/WeChat/GET_MOBILEPUSH_TEMPLATES_LIST_SUCCESS';
|
|
35
|
+
export const GET_MOBILEPUSH_TEMPLATES_LIST_FAILURE = 'app/v2Containers/WeChat/GET_MOBILEPUSH_TEMPLATES_LIST_FAILURE';
|
|
@@ -60,7 +60,13 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
60
60
|
this.props.onMobilepushModeChange( e.target.value );
|
|
61
61
|
};
|
|
62
62
|
onTemplateNameChange = (ev) => {
|
|
63
|
+
const {onEnterTemplateName, onRemoveTemplateName} = this.props;
|
|
63
64
|
this.setState({templateName: ev.target.value});
|
|
65
|
+
if (ev.target.value && onEnterTemplateName) {
|
|
66
|
+
onEnterTemplateName();
|
|
67
|
+
} else if (onRemoveTemplateName) {
|
|
68
|
+
onRemoveTemplateName();
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
71
|
render() {
|
|
66
72
|
const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName, type} = this.props;
|
|
@@ -121,6 +127,8 @@ MobilepushWrapper.propTypes = {
|
|
|
121
127
|
step: PropTypes.string,
|
|
122
128
|
getFormData: PropTypes.string,
|
|
123
129
|
setIsLoadingContent: PropTypes.func,
|
|
130
|
+
onEnterTemplateName: PropTypes.func,
|
|
131
|
+
onRemoveTemplateName: PropTypes.func,
|
|
124
132
|
isGetFormData: PropTypes.bool,
|
|
125
133
|
query: PropTypes.object,
|
|
126
134
|
isFullMode: PropTypes.bool,
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Create/DEFAULT_ACTION';
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
export const CREATE_TEMPLATE_REQUEST = 'app/
|
|
11
|
-
export const CREATE_TEMPLATE_SUCCESS = 'app/
|
|
12
|
-
export const CREATE_TEMPLATE_FAILURE = 'app/
|
|
10
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Sms/Create/CREATE_TEMPLATE_REQUEST';
|
|
11
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Sms/Create/CREATE_TEMPLATE_SUCCESS';
|
|
12
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Sms/Create/CREATE_TEMPLATE_FAILURE';
|
|
13
13
|
|
|
14
|
-
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/
|
|
15
|
-
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/
|
|
16
|
-
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/
|
|
14
|
+
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/Sms/Create/CLEAR_CREATE_RESPONSE_REQUEST';
|
|
15
|
+
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/Sms/Create/CLEAR_CREATE_RESPONSE_SUCCESS';
|
|
16
|
+
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/Sms/Create/CLEAR_CREATE_RESPONSE_FAILURE';
|
|
@@ -22,11 +22,11 @@ import * as actions from './actions';
|
|
|
22
22
|
import messages from './messages';
|
|
23
23
|
import * as charCount from '../../../utils/smsCharCount';
|
|
24
24
|
import {checkUnicode, updateCharCount} from '../../../utils/smsCharCountV2';
|
|
25
|
-
import * as globalActions from '
|
|
25
|
+
import * as globalActions from '../../Cap/actions';
|
|
26
26
|
import {getMessageObject} from '../../../utils/messageUtils';
|
|
27
27
|
import * as creativesContainerActions from '../../CreativesContainer/actions';
|
|
28
28
|
// import callNativeEvent from '../../../utils/callNativeEvent';
|
|
29
|
-
|
|
29
|
+
import {showError} from '../commonMethods';
|
|
30
30
|
export class Create extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
31
31
|
constructor(props) {
|
|
32
32
|
super(props);
|
|
@@ -87,6 +87,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
87
87
|
this.componentRefs = {
|
|
88
88
|
'sms-count': this.smsCount,
|
|
89
89
|
};
|
|
90
|
+
this.showError = showError.bind(this);
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
componentWillMount() {
|
|
@@ -318,8 +319,8 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
318
319
|
return map[id][event];
|
|
319
320
|
}
|
|
320
321
|
|
|
321
|
-
setFormValidity(isFormValid) {
|
|
322
|
-
this.setState({isFormValid});
|
|
322
|
+
setFormValidity(isFormValid, errorData) {
|
|
323
|
+
this.setState({isFormValid, errorData});
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
injectMessages(elem) {
|
|
@@ -921,7 +922,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
921
922
|
this.setState({startValidation: false});
|
|
922
923
|
}
|
|
923
924
|
startValidation = () => {
|
|
924
|
-
this.setState({startValidation: true});
|
|
925
|
+
this.setState({startValidation: true}, this.showError);
|
|
925
926
|
}
|
|
926
927
|
render() {
|
|
927
928
|
console.log("this.props sms create: ", this.props);
|
|
@@ -82,4 +82,12 @@ export default defineMessages({
|
|
|
82
82
|
id: 'app.containers.Create.somethingWentWrong',
|
|
83
83
|
defaultMessage: "Something Went Wrong!!",
|
|
84
84
|
},
|
|
85
|
+
"invalidTags": {
|
|
86
|
+
id: 'app.containers.Create.invalidTags',
|
|
87
|
+
defaultMessage: 'Invalid tags',
|
|
88
|
+
},
|
|
89
|
+
"validationError": {
|
|
90
|
+
id: 'app.containers.Create.validationError',
|
|
91
|
+
defaultMessage: 'Validation error',
|
|
92
|
+
},
|
|
85
93
|
});
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Edit/DEFAULT_ACTION';
|
|
8
8
|
|
|
9
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
10
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
11
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
9
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/Sms/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
10
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/Sms/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
11
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/Sms/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
12
12
|
|
|
13
|
-
export const EDIT_TEMPLATE_REQUEST = 'app/
|
|
14
|
-
export const EDIT_TEMPLATE_SUCCESS = 'app/
|
|
15
|
-
export const EDIT_TEMPLATE_FAILURE = 'app/
|
|
13
|
+
export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/Sms/Edit/EDIT_TEMPLATE_REQUEST';
|
|
14
|
+
export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/Sms/Edit/EDIT_TEMPLATE_SUCCESS';
|
|
15
|
+
export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/Sms/Edit/EDIT_TEMPLATE_FAILURE';
|
|
16
16
|
|
|
17
|
-
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/
|
|
18
|
-
export const RESET_EDIT_TEMPLATE = 'app/
|
|
17
|
+
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/Sms/Create/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
18
|
+
export const RESET_EDIT_TEMPLATE = 'app/v2Containers/Sms/Create/RESET_EDIT_TEMPLATE';
|
|
@@ -22,11 +22,11 @@ import * as actions from './actions';
|
|
|
22
22
|
import {checkUnicode, updateCharCount} from '../../../utils/smsCharCountV2';
|
|
23
23
|
import '../Create/_smsCreate.scss';
|
|
24
24
|
import messages from './messages';
|
|
25
|
-
import * as globalActions from '
|
|
25
|
+
import * as globalActions from '../../Cap/actions';
|
|
26
26
|
import {getMessageObject} from '../../../utils/messageUtils';
|
|
27
27
|
import * as creativesContainerActions from '../../CreativesContainer/actions';
|
|
28
28
|
// import callNativeEvent from '../../../utils/callNativeEvent';
|
|
29
|
-
|
|
29
|
+
import {showError} from '../commonMethods';
|
|
30
30
|
export class Edit extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
31
31
|
constructor(props) {
|
|
32
32
|
super(props);
|
|
@@ -83,7 +83,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
83
83
|
this.showNext = this.showNext.bind(this);
|
|
84
84
|
this.injectMessages = this.injectMessages.bind(this);
|
|
85
85
|
this.smsCount = React.createRef();
|
|
86
|
-
|
|
86
|
+
this.showError = showError.bind(this);
|
|
87
87
|
this.componentRefs = {
|
|
88
88
|
'sms-count': this.smsCount,
|
|
89
89
|
};
|
|
@@ -291,8 +291,8 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
setFormValidity(isFormValid) {
|
|
295
|
-
this.setState({isFormValid});
|
|
294
|
+
setFormValidity(isFormValid, errorData) {
|
|
295
|
+
this.setState({isFormValid, errorData});
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
getFormData(e, value) {
|
|
@@ -322,7 +322,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
322
322
|
validity: this.state.isFormValid,
|
|
323
323
|
type: 'SMS',
|
|
324
324
|
};
|
|
325
|
-
this.setState({checkValidation: true});
|
|
325
|
+
this.setState({checkValidation: true}, this.showError);
|
|
326
326
|
|
|
327
327
|
if (e) {
|
|
328
328
|
e.source.postMessage(JSON.stringify(response), e.origin);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import isEmpty from 'lodash/isEmpty';
|
|
2
|
+
import { CapNotification } from '@capillarytech/cap-ui-library';
|
|
3
|
+
import messages from './Create/messages';
|
|
4
|
+
export function showError() {
|
|
5
|
+
const {intl} = this.props;
|
|
6
|
+
const {errorData} = this.state;
|
|
7
|
+
const errorMessage = {key: 'validation-error', message: intl.formatMessage(messages.validationError)};
|
|
8
|
+
if (!isEmpty(this.state.formData) && !this.state.isFormValid) {
|
|
9
|
+
const isSmsInvalid = Object.values(errorData[0]).includes(true);
|
|
10
|
+
if (isSmsInvalid) {
|
|
11
|
+
const invalidTags = errorData[0]['invalid-tags'];
|
|
12
|
+
if (!isEmpty(invalidTags)) {
|
|
13
|
+
errorMessage.description = `${intl.formatMessage(messages.invalidTags)}: ${invalidTags.join(',')} `;
|
|
14
|
+
}
|
|
15
|
+
CapNotification.error(errorMessage);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -15,7 +15,7 @@ import { bindActionCreators } from 'redux';
|
|
|
15
15
|
import makeSelectTagList from './selectors';
|
|
16
16
|
import { UserIsAuthenticated } from '../../utils/authWrapper';
|
|
17
17
|
import * as actions from './actions';
|
|
18
|
-
import * as globalActions from '
|
|
18
|
+
import * as globalActions from '../Cap/actions';
|
|
19
19
|
// import styled from styled-components;
|
|
20
20
|
import CapTagList from '../../v2Components/CapTagList';
|
|
21
21
|
import './_tagList.scss';
|
|
@@ -6,40 +6,40 @@
|
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Templates/DEFAULT_ACTION';
|
|
8
8
|
|
|
9
|
-
export const GET_ALL_TEMPLATES_REQUEST = 'app/
|
|
10
|
-
export const GET_ALL_TEMPLATES_SUCCESS = 'app/
|
|
11
|
-
export const GET_ALL_TEMPLATES_FAILURE = 'app/
|
|
12
|
-
|
|
13
|
-
export const DELETE_TEMPLATE_REQUEST = 'app/
|
|
14
|
-
export const DELETE_TEMPLATE_SUCCESS = 'app/
|
|
15
|
-
export const DELETE_TEMPLATE_FAILURE = 'app/
|
|
16
|
-
|
|
17
|
-
export const GET_USER_LIST_REQUEST = "app/
|
|
18
|
-
export const GET_USER_LIST_SUCCESS = "app/
|
|
19
|
-
export const GET_USER_LIST_FAILURE = "app/
|
|
20
|
-
|
|
21
|
-
export const GET_WECRM_ACCOUNTS_REQUEST = "app/
|
|
22
|
-
export const GET_WECRM_ACCOUNTS_SUCCESS = "app/
|
|
23
|
-
export const GET_WECRM_ACCOUNTS_FAILURE = "app/
|
|
24
|
-
export const SET_WECHAT_ACCOUNT = "app/
|
|
25
|
-
|
|
26
|
-
export const SET_SELECTED_LAYOUT = "app/
|
|
27
|
-
export const SEND_ZIPPED_FILE_REQUEST = "app/
|
|
28
|
-
export const SEND_ZIPPED_FILE_SUCCESS = "app/
|
|
29
|
-
export const SEND_ZIPPED_FILE_FAILURE = "app/
|
|
30
|
-
|
|
31
|
-
export const GET_EDM_DEAFULT_TEMPLATES_REQUEST = 'app/
|
|
32
|
-
export const GET_EDM_DEAFULT_TEMPLATES_SUCCESS = 'app/
|
|
33
|
-
export const GET_EDM_DEAFULT_TEMPLATES_FAILURE = 'app/
|
|
34
|
-
|
|
35
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
36
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
37
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export const SET_EDM_TEMPLATE = "app/
|
|
41
|
-
export const RESET_ACCOUNT = "app/
|
|
42
|
-
export const RESET_TEMPLATE = "app/
|
|
43
|
-
export const RESET_TEMPLATE_DATA = "app/
|
|
44
|
-
export const RESET_UPLOAD_DATA = "app/
|
|
45
|
-
export const CLEAR_TEMPLATE_STORE_DATA = "app/
|
|
9
|
+
export const GET_ALL_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_ALL_TEMPLATES_REQUEST';
|
|
10
|
+
export const GET_ALL_TEMPLATES_SUCCESS = 'app/v2Containers/Templates/GET_ALL_TEMPLATES_SUCCESS';
|
|
11
|
+
export const GET_ALL_TEMPLATES_FAILURE = 'app/v2Containers/Templates/GET_ALL_TEMPLATES_FAILURE';
|
|
12
|
+
|
|
13
|
+
export const DELETE_TEMPLATE_REQUEST = 'app/v2Containers/Templates/DELETE_TEMPLATE_REQUEST';
|
|
14
|
+
export const DELETE_TEMPLATE_SUCCESS = 'app/v2Containers/Templates/DELETE_TEMPLATE_SUCCESS';
|
|
15
|
+
export const DELETE_TEMPLATE_FAILURE = 'app/v2Containers/Templates/DELETE_TEMPLATE_FAILURE';
|
|
16
|
+
|
|
17
|
+
export const GET_USER_LIST_REQUEST = "app/v2Containers/GET_USER_LIST_REQUEST";
|
|
18
|
+
export const GET_USER_LIST_SUCCESS = "app/v2Containers/GET_USER_LIST_SUCCESS";
|
|
19
|
+
export const GET_USER_LIST_FAILURE = "app/v2Containers/GET_USER_LIST_FAILURE";
|
|
20
|
+
|
|
21
|
+
export const GET_WECRM_ACCOUNTS_REQUEST = "app/v2Containers/Templates/GET_WECRM_ACCOUNTS_REQUEST";
|
|
22
|
+
export const GET_WECRM_ACCOUNTS_SUCCESS = "app/v2Containers/Templates/GET_WECRM_ACCOUNTS_SUCCESS";
|
|
23
|
+
export const GET_WECRM_ACCOUNTS_FAILURE = "app/v2Containers/Templates/GET_WECRM_ACCOUNTS_FAILURE";
|
|
24
|
+
export const SET_WECHAT_ACCOUNT = "app/v2Containers/Templates/SET_WECHAT_ACCOUNT";
|
|
25
|
+
|
|
26
|
+
export const SET_SELECTED_LAYOUT = "app/v2Containers/Templates/SET_SELECTED_LAYOUT";
|
|
27
|
+
export const SEND_ZIPPED_FILE_REQUEST = "app/v2Containers/Templates/SEND_ZIPPED_FILE_REQUEST";
|
|
28
|
+
export const SEND_ZIPPED_FILE_SUCCESS = "app/v2Containers/Templates/SEND_ZIPPED_FILE_SUCCESS";
|
|
29
|
+
export const SEND_ZIPPED_FILE_FAILURE = "app/v2Containers/Templates/SEND_ZIPPED_FILE_FAILURE";
|
|
30
|
+
|
|
31
|
+
export const GET_EDM_DEAFULT_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_EDM_DEAFULT_TEMPLATES_REQUEST';
|
|
32
|
+
export const GET_EDM_DEAFULT_TEMPLATES_SUCCESS = 'app/v2Containers/Templates/GET_EDM_DEAFULT_TEMPLATES_SUCCESS';
|
|
33
|
+
export const GET_EDM_DEAFULT_TEMPLATES_FAILURE = 'app/v2Containers/Templates/GET_EDM_DEAFULT_TEMPLATES_FAILURE';
|
|
34
|
+
|
|
35
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/Templates/GET_TEMPLATE_DETAILS_REQUEST';
|
|
36
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/Templates/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
37
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/Templates/GET_TEMPLATE_DETAILS_FAILURE';
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export const SET_EDM_TEMPLATE = "app/v2Containers/Templates/SET_EDM_TEMPLATE";
|
|
41
|
+
export const RESET_ACCOUNT = "app/v2Containers/Templates/RESET_ACCOUNT";
|
|
42
|
+
export const RESET_TEMPLATE = "app/v2Containers/Templates/RESET_TEMPLATE";
|
|
43
|
+
export const RESET_TEMPLATE_DATA = "app/v2Containers/Templates/RESET_TEMPLATE_DATA";
|
|
44
|
+
export const RESET_UPLOAD_DATA = "app/v2Containers/Templates/RESET_UPLOAD_DATA";
|
|
45
|
+
export const CLEAR_TEMPLATE_STORE_DATA = "app/v2Containers/Templates/CLEAR_TEMPLATE_STORE_DATA";
|
|
@@ -521,7 +521,12 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
521
521
|
if (currentChannel === "SMS") {
|
|
522
522
|
templateData.content = template.versions.base['sms-editor'];
|
|
523
523
|
} else if (currentChannel === "EMAIL") {
|
|
524
|
-
|
|
524
|
+
const url = template.versions.base.preview_http_url;
|
|
525
|
+
if (url) {
|
|
526
|
+
templateData.url = url;
|
|
527
|
+
} else {
|
|
528
|
+
templateData.content = template.versions.base.subject;
|
|
529
|
+
}
|
|
525
530
|
} else if (currentChannel === "MOBILEPUSH" && template.type === "MOBILEPUSH") {
|
|
526
531
|
templateData.content = template;
|
|
527
532
|
}
|
|
@@ -4,25 +4,25 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const GET_WECHAT_DEFAULT_TEMPLATES_REQUEST = 'app/
|
|
8
|
-
export const GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS = 'app/
|
|
9
|
-
export const GET_WECHAT_DEFAULT_TEMPLATES_FAILURE = 'app/
|
|
7
|
+
export const GET_WECHAT_DEFAULT_TEMPLATES_REQUEST = 'app/v2Containers/WeChat/GET_WECHAT_DEFAULT_TEMPLATES_REQUEST';
|
|
8
|
+
export const GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS = 'app/v2Containers/WeChat/GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS';
|
|
9
|
+
export const GET_WECHAT_DEFAULT_TEMPLATES_FAILURE = 'app/v2Containers/WeChat/GET_WECHAT_DEFAULT_TEMPLATES_FAILURE';
|
|
10
10
|
|
|
11
|
-
export const CREATE_TEMPLATE_REQUEST = 'app/
|
|
12
|
-
export const CREATE_TEMPLATE_SUCCESS = 'app/
|
|
13
|
-
export const CREATE_TEMPLATE_FAILURE = 'app/
|
|
11
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/WeChat/CREATE_TEMPLATE_REQUEST';
|
|
12
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/WeChat/CREATE_TEMPLATE_SUCCESS';
|
|
13
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/WeChat/CREATE_TEMPLATE_FAILURE';
|
|
14
14
|
|
|
15
|
-
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/
|
|
16
|
-
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/
|
|
17
|
-
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/
|
|
15
|
+
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/WeChat/CLEAR_CREATE_RESPONSE_REQUEST';
|
|
16
|
+
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/WeChat/CLEAR_CREATE_RESPONSE_SUCCESS';
|
|
17
|
+
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/WeChat/CLEAR_CREATE_RESPONSE_FAILURE';
|
|
18
18
|
|
|
19
|
-
export const GET_WECRM_ACCOUNTS_REQUEST = "app/
|
|
20
|
-
export const GET_WECRM_ACCOUNTS_SUCCESS = "app/
|
|
21
|
-
export const GET_WECRM_ACCOUNTS_FAILURE = "app/
|
|
19
|
+
export const GET_WECRM_ACCOUNTS_REQUEST = "app/v2Containers/WeChat/GET_WECRM_ACCOUNTS_REQUEST";
|
|
20
|
+
export const GET_WECRM_ACCOUNTS_SUCCESS = "app/v2Containers/WeChat/GET_WECRM_ACCOUNTS_SUCCESS";
|
|
21
|
+
export const GET_WECRM_ACCOUNTS_FAILURE = "app/v2Containers/WeChat/GET_WECRM_ACCOUNTS_FAILURE";
|
|
22
22
|
|
|
23
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
24
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
25
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
23
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/WeChat/GET_TEMPLATE_DETAILS_REQUEST';
|
|
24
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/WeChat/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
25
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/WeChat/GET_TEMPLATE_DETAILS_FAILURE';
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
export const SET_WECHAT_ACCOUNT = "app/
|
|
28
|
+
export const SET_WECHAT_ACCOUNT = "app/v2Containers/WeChat/SET_WECHAT_ACCOUNT";
|
|
@@ -21,7 +21,7 @@ import messages from './messages';
|
|
|
21
21
|
import * as actions from './actions';
|
|
22
22
|
import FormBuilder from '../../../v2Components/FormBuilder';
|
|
23
23
|
import { UserIsAuthenticated } from '../../../utils/authWrapper';
|
|
24
|
-
import * as globalActions from '
|
|
24
|
+
import * as globalActions from '../../Cap/actions';
|
|
25
25
|
import {getMessageObject} from '../../../utils/messageUtils';
|
|
26
26
|
import * as templateActions from '../../Templates/actions';
|
|
27
27
|
// import SlideBox from '../../v2Components/SlideBox';
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const DEFAULT_ACTION = 'app/
|
|
8
|
-
export const UPLOAD_ASSET_REQUEST = 'app/
|
|
9
|
-
export const UPLOAD_ASSET_SUCCESS = 'app/
|
|
10
|
-
export const UPLOAD_ASSET_FAILURE = 'app/
|
|
11
|
-
export const CLEAR_ASSET = 'app/
|
|
12
|
-
export const SAVE_TEMPLATE_REQUEST = 'app/
|
|
13
|
-
export const SAVE_TEMPLATE_SUCCESS = 'app/
|
|
14
|
-
export const SAVE_TEMPLATE_FAILURE = 'app/
|
|
15
|
-
export const CLEAR_CONTENT_ASSET = 'app/
|
|
7
|
+
export const DEFAULT_ACTION = 'app/v2Containers/Wechat/RichmediaTemplates/Create/DEFAULT_ACTION';
|
|
8
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Wechat/RichmediaTemplates/Create/UPLOAD_ASSET_REQUEST';
|
|
9
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Wechat/RichmediaTemplates/Create/UPLOAD_ASSET_SUCCESS';
|
|
10
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Wechat/RichmediaTemplates/Create/UPLOAD_ASSET_FAILURE';
|
|
11
|
+
export const CLEAR_ASSET = 'app/v2Containers/Wechat/RichmediaTemplates/Create/CLEAR_ASSET';
|
|
12
|
+
export const SAVE_TEMPLATE_REQUEST = 'app/v2Containers/Wechat/RichmediaTemplates/Create/SAVE_TEMPLATE_REQUEST';
|
|
13
|
+
export const SAVE_TEMPLATE_SUCCESS = 'app/v2Containers/Wechat/RichmediaTemplates/Create/SAVE_TEMPLATE_SUCCESS';
|
|
14
|
+
export const SAVE_TEMPLATE_FAILURE = 'app/v2Containers/Wechat/RichmediaTemplates/Create/SAVE_TEMPLATE_FAILURE';
|
|
15
|
+
export const CLEAR_CONTENT_ASSET = 'app/v2Containers/Wechat/RichmediaTemplates/Create/CLEAR_CONTENT_ASSET';
|
|
@@ -20,8 +20,8 @@ import * as actions from './actions';
|
|
|
20
20
|
import richmediaschema from './richmediaschema';
|
|
21
21
|
import './_createRichmedia.scss';
|
|
22
22
|
import messages from './messages';
|
|
23
|
-
import * as globalActions from '
|
|
24
|
-
import {getMessageObject} from '
|
|
23
|
+
import * as globalActions from '../../../Cap/actions';
|
|
24
|
+
import {getMessageObject} from '../../../../utils/messageUtils';
|
|
25
25
|
import FormBuilder from '../../../../v2Components/FormBuilder';
|
|
26
26
|
import Header from '../../../../v2Components/Header';
|
|
27
27
|
import WechatRichmediaTemplatePreview from '../../../../v2Components/TemplatePreview/WechatRichmediaTemplatePreview';
|
|
@@ -5,7 +5,7 @@ import * as types from './constants';
|
|
|
5
5
|
// import testschema from './testschema';
|
|
6
6
|
// Individual exports for testing
|
|
7
7
|
export function* defaultSaga() {
|
|
8
|
-
// See example in
|
|
8
|
+
// See example in v2Containers/HomePage/sagas.js
|
|
9
9
|
}
|
|
10
10
|
export function* uploadAsset({file, assetType, fileParams, mode, wechatParams, contentId, uploadId}) {
|
|
11
11
|
try {
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_ACTION = 'app/Edit/DEFAULT_ACTION';
|
|
8
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/
|
|
9
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/
|
|
10
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/
|
|
8
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/WeChat/RichmediaTemplates/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
9
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/WeChat/RichmediaTemplates/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
10
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/WeChat/RichmediaTemplates/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
@@ -5,7 +5,7 @@ import * as types from './constants';
|
|
|
5
5
|
|
|
6
6
|
// Individual exports for testing
|
|
7
7
|
export function* defaultSaga() {
|
|
8
|
-
// See example in
|
|
8
|
+
// See example in v2Containers/HomePage/sagas.js
|
|
9
9
|
}
|
|
10
10
|
export function* getTemplateDetails({id, channel}) {
|
|
11
11
|
try {
|