@capillarytech/creatives-library 6.0.3 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,7 @@ import React from 'react';
|
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
// import messages from './messages';
|
|
15
15
|
const loadScript = require('load-script');
|
|
16
|
-
const defaultScriptUrl = "https://ckeditor.com/assets/libs/ckeditor4/4.14.
|
|
16
|
+
const defaultScriptUrl = "https://ckeditor.com/assets/libs/ckeditor4/4.14.1/ckeditor.js";
|
|
17
17
|
const user = localStorage.getItem('user');
|
|
18
18
|
let locale = 'en';
|
|
19
19
|
if (user && JSON.parse(user).lang) {
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ import React from 'react';
|
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
// import messages from './messages';
|
|
15
15
|
const loadScript = require('load-script');
|
|
16
|
-
const defaultScriptUrl = "https://ckeditor.com/assets/libs/ckeditor4/4.14.
|
|
16
|
+
const defaultScriptUrl = "https://ckeditor.com/assets/libs/ckeditor4/4.14.1/ckeditor.js";
|
|
17
17
|
const user = localStorage.getItem('user');
|
|
18
18
|
let locale = 'en';
|
|
19
19
|
if (user && JSON.parse(user).lang) {
|
|
@@ -6,13 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
|
-
import { CapRow, CapColumn, CapInput, CapButton, CapSpin } from '@capillarytech/cap-ui-library';
|
|
10
|
-
import { injectIntl, intlShape } from 'react-intl';
|
|
9
|
+
import { CapRow, CapColumn, CapInput, CapButton, CapSpin, CapCheckbox } from '@capillarytech/cap-ui-library';
|
|
10
|
+
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
|
11
|
+
import {
|
|
12
|
+
FONT_SIZE_S,
|
|
13
|
+
} from '@capillarytech/cap-ui-library/styled/variables';
|
|
11
14
|
import TagList from '../../v2Containers/TagList';
|
|
12
15
|
import CallTaskPreview from '../CallTaskPreview';
|
|
13
16
|
import messages from './messages';
|
|
14
17
|
import './_newCallTask.scss';
|
|
15
18
|
|
|
19
|
+
const CALL = 'CALL';
|
|
20
|
+
const STOREMAX_WHATSAPP = 'STOREMAX_WHATSAPP';
|
|
16
21
|
class NewCallTask extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
17
22
|
constructor(props) {
|
|
18
23
|
super(props);
|
|
@@ -25,6 +30,7 @@ class NewCallTask extends React.Component { // eslint-disable-line react/prefer-
|
|
|
25
30
|
subject: templateData && templateData.subject ? templateData.subject : '',
|
|
26
31
|
messageBody: templateData && templateData.messageBody ? templateData.messageBody : '',
|
|
27
32
|
description: templateData && templateData.description ? templateData.description : '',
|
|
33
|
+
callTaskActionType: CALL,
|
|
28
34
|
};
|
|
29
35
|
}
|
|
30
36
|
|
|
@@ -82,6 +88,14 @@ class NewCallTask extends React.Component { // eslint-disable-line react/prefer-
|
|
|
82
88
|
this.props.onCallTaskSubmit(this.state);
|
|
83
89
|
}
|
|
84
90
|
|
|
91
|
+
onS2DCheckChange = (e) => {
|
|
92
|
+
if (e.target.checked) {
|
|
93
|
+
this.setState({callTaskActionType: STOREMAX_WHATSAPP});
|
|
94
|
+
} else {
|
|
95
|
+
this.setState({callTaskActionType: CALL});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
85
99
|
render() {
|
|
86
100
|
const { intl, isLoading, metaEntities, selectedOfferDetails } = this.props;
|
|
87
101
|
const { formatMessage } = intl;
|
|
@@ -123,6 +137,13 @@ class NewCallTask extends React.Component { // eslint-disable-line react/prefer-
|
|
|
123
137
|
value={description}
|
|
124
138
|
isRequired
|
|
125
139
|
/>
|
|
140
|
+
<CapCheckbox
|
|
141
|
+
onChange={this.onS2DCheckChange}
|
|
142
|
+
checked={this.state.callTaskActionType !== CALL}
|
|
143
|
+
style={{marginTop: FONT_SIZE_S}}
|
|
144
|
+
>
|
|
145
|
+
<FormattedMessage {...messages.useInS2D}/>
|
|
146
|
+
</CapCheckbox>
|
|
126
147
|
</div>
|
|
127
148
|
<CapButton
|
|
128
149
|
disabled={!subject || !messageBody || !description}
|