@configuratorware/configurator-frontendgui 1.31.0 → 1.31.1
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/App/Reducers/Configurator/Actions.js +81 -20
- package/App/Screens/Configurator/Components/DesignApproval/index.js +76 -0
- package/App/Screens/Configurator/Components/DesignApproval/index.story.js +27 -0
- package/App/Screens/Configurator/Components/DesignApproval/index.test.js +31 -0
- package/App/{Shared/Components/AcceptPrivacy/index.js → Screens/Configurator/Containers/DesignApproval.js} +71 -78
- package/App/Screens/Configurator/ThemeProvider.js +1 -1
- package/App/Shared/Components/AddToBasket/index.js +1 -1
- package/App/Shared/Components/AmountPrice/index.js +49 -83
- package/App/Shared/Components/PriceOverview/index.js +3 -5
- package/App/Shared/Components/ReceiveOfferForm/index.js +10 -9
- package/App/configuration.js +1 -1
- package/package.json +4 -4
- package/public/translations/de_DE.json +1 -4
- package/public/translations/en_GB.json +1 -4
- package/src/App/Reducers/Configurator/Actions.js +37 -6
- package/src/App/Screens/Configurator/Components/DesignApproval/__snapshots__/index.test.jsx.snap +91 -0
- package/src/App/Screens/Configurator/Components/DesignApproval/index.js +54 -0
- package/src/App/Screens/Configurator/Components/DesignApproval/index.story.js +12 -0
- package/src/App/Screens/Configurator/Components/DesignApproval/index.test.jsx +17 -0
- package/src/App/Screens/Configurator/Containers/DesignApproval.js +76 -0
- package/src/App/Screens/Configurator/ThemeProvider.js +2 -2
- package/src/App/Shared/Components/AddToBasket/index.js +1 -1
- package/src/App/Shared/Components/AmountPrice/index.js +3 -48
- package/src/App/Shared/Components/PriceOverview/index.js +0 -3
- package/src/App/Shared/Components/ReceiveOfferForm/__snapshots__/index.test.jsx.snap +64 -64
- package/src/App/Shared/Components/ReceiveOfferForm/index.js +10 -9
- package/src/App/configuration.js +1 -1
- package/src/App/Shared/Components/AcceptPrivacy/index.js +0 -78
|
@@ -16,7 +16,7 @@ const styles = theme => ({
|
|
|
16
16
|
marginTop: 0,
|
|
17
17
|
},
|
|
18
18
|
outlinedInput: {
|
|
19
|
-
padding:
|
|
19
|
+
padding: 14,
|
|
20
20
|
fontSize: 15,
|
|
21
21
|
[theme.breakpoints.down('xs')]: {
|
|
22
22
|
padding: 19,
|
|
@@ -91,6 +91,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
91
91
|
this.handleChange = this.handleChange.bind(this);
|
|
92
92
|
this.handleBlur = this.handleBlur.bind(this);
|
|
93
93
|
this.setInputRef = this.setInputRef.bind(this);
|
|
94
|
+
this.designApprovalRef = React.createRef();
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
setInputRef = ref => {
|
|
@@ -174,7 +175,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
174
175
|
onChange={this.handleChange}
|
|
175
176
|
onBlur={this.handleBlur}
|
|
176
177
|
label={t('receiveOfferForm.email')}
|
|
177
|
-
margin="
|
|
178
|
+
margin="normal"
|
|
178
179
|
variant="outlined"
|
|
179
180
|
fullWidth
|
|
180
181
|
error={!!email.error}
|
|
@@ -200,7 +201,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
200
201
|
onChange={this.handleChange}
|
|
201
202
|
onBlur={this.handleBlur}
|
|
202
203
|
label={t('receiveOfferForm.name')}
|
|
203
|
-
margin="
|
|
204
|
+
margin="normal"
|
|
204
205
|
variant="outlined"
|
|
205
206
|
fullWidth
|
|
206
207
|
error={!!name.error}
|
|
@@ -223,7 +224,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
223
224
|
onChange={this.handleChange}
|
|
224
225
|
onBlur={this.handleBlur}
|
|
225
226
|
label={t('receiveOfferForm.company')}
|
|
226
|
-
margin="
|
|
227
|
+
margin="normal"
|
|
227
228
|
variant="outlined"
|
|
228
229
|
fullWidth
|
|
229
230
|
error={!!company.error}
|
|
@@ -246,7 +247,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
246
247
|
onChange={this.handleChange}
|
|
247
248
|
onBlur={this.handleBlur}
|
|
248
249
|
label={t('receiveOfferForm.phonenumber')}
|
|
249
|
-
margin="
|
|
250
|
+
margin="normal"
|
|
250
251
|
variant="outlined"
|
|
251
252
|
fullWidth
|
|
252
253
|
error={!!phonenumber.error}
|
|
@@ -271,7 +272,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
271
272
|
onChange={this.handleChange}
|
|
272
273
|
onBlur={this.handleBlur}
|
|
273
274
|
label={t('receiveOfferForm.zip')}
|
|
274
|
-
margin="
|
|
275
|
+
margin="normal"
|
|
275
276
|
variant="outlined"
|
|
276
277
|
fullWidth
|
|
277
278
|
error={!!zip.error}
|
|
@@ -296,7 +297,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
296
297
|
onChange={this.handleChange}
|
|
297
298
|
onBlur={this.handleBlur}
|
|
298
299
|
label={t('receiveOfferForm.city')}
|
|
299
|
-
margin="
|
|
300
|
+
margin="normal"
|
|
300
301
|
variant="outlined"
|
|
301
302
|
fullWidth
|
|
302
303
|
error={!!city.error}
|
|
@@ -321,7 +322,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
321
322
|
onChange={this.handleChange}
|
|
322
323
|
onBlur={this.handleBlur}
|
|
323
324
|
label={t('receiveOfferForm.street')}
|
|
324
|
-
margin="
|
|
325
|
+
margin="normal"
|
|
325
326
|
variant="outlined"
|
|
326
327
|
fullWidth
|
|
327
328
|
error={!!street.error}
|
|
@@ -344,7 +345,7 @@ class ReceiveOfferForm extends React.Component {
|
|
|
344
345
|
onChange={this.handleChange}
|
|
345
346
|
onBlur={this.handleBlur}
|
|
346
347
|
label={t('receiveOfferForm.country')}
|
|
347
|
-
margin="
|
|
348
|
+
margin="normal"
|
|
348
349
|
variant="outlined"
|
|
349
350
|
fullWidth
|
|
350
351
|
error={!!country.error}
|
package/src/App/configuration.js
CHANGED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { withStyles } from '@material-ui/core/styles';
|
|
3
|
-
import { t } from 'Framework/i18n';
|
|
4
|
-
import withWidth from '@material-ui/core/withWidth/withWidth';
|
|
5
|
-
import Grid from '@material-ui/core/Grid/Grid';
|
|
6
|
-
import FormControlLabel from '@material-ui/core/FormControlLabel';
|
|
7
|
-
import Checkbox from '@material-ui/core/Checkbox';
|
|
8
|
-
import FormHelperText from '@material-ui/core/FormHelperText';
|
|
9
|
-
import PropTypes from 'prop-types';
|
|
10
|
-
|
|
11
|
-
const styles = theme => ({
|
|
12
|
-
checkboxLabel: {
|
|
13
|
-
fontSize: 15,
|
|
14
|
-
paddingLeft: 15,
|
|
15
|
-
paddingBottom: 12,
|
|
16
|
-
[theme.breakpoints.down('xs')]: {
|
|
17
|
-
paddingLeft: 12,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
checkbox: {
|
|
21
|
-
alignSelf: 'flex-start',
|
|
22
|
-
top: -10,
|
|
23
|
-
},
|
|
24
|
-
formHelperText: {
|
|
25
|
-
marginLeft: 45,
|
|
26
|
-
marginBottom: 15,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
class AcceptPrivacy extends React.Component {
|
|
31
|
-
static propTypes = {
|
|
32
|
-
classes: PropTypes.object,
|
|
33
|
-
width: PropTypes.string,
|
|
34
|
-
handleChangeCheckboxApproval: PropTypes.func,
|
|
35
|
-
approval: PropTypes.object,
|
|
36
|
-
dataPrivacyLink: PropTypes.string,
|
|
37
|
-
};
|
|
38
|
-
render() {
|
|
39
|
-
const { classes, handleChangeCheckboxApproval, approval, dataPrivacyLink } = this.props;
|
|
40
|
-
|
|
41
|
-
const privacyLink = `<a href="${dataPrivacyLink}"
|
|
42
|
-
target="_blank">${t('receiveOfferForm.privacyLinkLabel')}</a>`;
|
|
43
|
-
const privacyNotice = t('receiveOfferForm.privacyNotice', { privacyLink });
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<Grid container>
|
|
47
|
-
<Grid item xs={12}>
|
|
48
|
-
<FormControlLabel
|
|
49
|
-
className={classes.checkboxLabel}
|
|
50
|
-
control={
|
|
51
|
-
<Checkbox
|
|
52
|
-
className={classes.checkbox}
|
|
53
|
-
name="dataPrivacyAccepted"
|
|
54
|
-
checked={approval.value}
|
|
55
|
-
onChange={handleChangeCheckboxApproval}
|
|
56
|
-
color="primary"
|
|
57
|
-
/>
|
|
58
|
-
}
|
|
59
|
-
label={
|
|
60
|
-
<span
|
|
61
|
-
dangerouslySetInnerHTML={{
|
|
62
|
-
__html: privacyNotice,
|
|
63
|
-
}}
|
|
64
|
-
/>
|
|
65
|
-
}
|
|
66
|
-
/>
|
|
67
|
-
{approval.error && (
|
|
68
|
-
<FormHelperText error={true} className={classes.formHelperText}>
|
|
69
|
-
{t('receiveOfferForm.selectionError')}
|
|
70
|
-
</FormHelperText>
|
|
71
|
-
)}
|
|
72
|
-
</Grid>
|
|
73
|
-
</Grid>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export default withWidth()(withStyles(styles, { name: 'AcceptPrivacy' })(AcceptPrivacy));
|