@configuratorware/configurator-admingui 1.35.8 → 1.36.0
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/Config/defaultConfig.js +3 -0
- package/App/Data.js +12 -1
- package/App/Translations.js +4 -2
- package/Screens/Client/Containers/Edit.js +2 -1
- package/Screens/Client/Reducers/Reducer.js +0 -6
- package/Screens/Client/Translations.js +4 -2
- package/Screens/CurrentClient/Containers/Edit.js +2 -1
- package/Screens/DefaultClient/Containers/Edit.js +2 -1
- package/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +13 -1
- package/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +3 -0
- package/Screens/Designer/Translations.js +3 -1
- package/Screens/Font/Reducers/Actions.js +3 -1
- package/Screens/Font/Reducers/Reducer.js +1 -0
- package/Screens/Item/Containers/Edit.js +30 -0
- package/Screens/Item/Translations.js +2 -0
- package/Screens/Item/index.js +3 -1
- package/Screens/Itemclassification/Containers/Edit.js +65 -0
- package/Screens/Itemclassification/Containers/List.js +63 -0
- package/Screens/Itemclassification/Reducers/Actions.js +26 -0
- package/Screens/Itemclassification/Reducers/Reducer.js +67 -0
- package/Screens/Itemclassification/Screen.js +32 -0
- package/Screens/Itemclassification/Translations.js +21 -0
- package/Screens/Itemclassification/index.js +20 -0
- package/Screens/index.js +3 -0
- package/package.json +2 -2
- package/src/App/Config/defaultConfig.js +13 -9
- package/src/App/Data.js +14 -0
- package/src/App/Translations.js +2 -0
- package/src/Screens/Client/Containers/Edit.js +2 -1
- package/src/Screens/Client/Reducers/Reducer.js +0 -1
- package/src/Screens/Client/Translations.js +2 -0
- package/src/Screens/CurrentClient/Containers/Edit.js +2 -1
- package/src/Screens/DefaultClient/Containers/Edit.js +1 -0
- package/src/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +15 -1
- package/src/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +1 -0
- package/src/Screens/Designer/Translations.js +2 -0
- package/src/Screens/Designer/__tests__/__snapshots__/FormProductionMethods.test.js.snap +38 -0
- package/src/Screens/Font/Reducers/Actions.js +3 -3
- package/src/Screens/Font/Reducers/Reducer.js +1 -1
- package/src/Screens/Item/Containers/Edit.js +23 -1
- package/src/Screens/Item/Translations.js +2 -0
- package/src/Screens/Item/index.js +2 -1
- package/src/Screens/Itemclassification/Containers/Edit.js +49 -0
- package/src/Screens/Itemclassification/Containers/List.js +64 -0
- package/src/Screens/Itemclassification/Reducers/Actions.js +17 -0
- package/src/Screens/Itemclassification/Reducers/Reducer.js +43 -0
- package/src/Screens/Itemclassification/Screen.js +19 -0
- package/src/Screens/Itemclassification/Translations.js +22 -0
- package/src/Screens/Itemclassification/index.js +9 -0
- package/src/Screens/index.js +3 -1
|
@@ -27,6 +27,10 @@ export default {
|
|
|
27
27
|
{
|
|
28
28
|
name: 'group_entries',
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
name: 'item_classifications',
|
|
32
|
+
label: 'itemclassifications.menuLabel',
|
|
33
|
+
},
|
|
30
34
|
],
|
|
31
35
|
},
|
|
32
36
|
{
|
|
@@ -95,15 +99,15 @@ export default {
|
|
|
95
99
|
],
|
|
96
100
|
},
|
|
97
101
|
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
name: 'finderitems',
|
|
103
|
+
label: 'finder',
|
|
104
|
+
credentials: ['question_trees'],
|
|
105
|
+
items: [
|
|
106
|
+
{
|
|
107
|
+
name: 'finder',
|
|
108
|
+
label: 'question_trees',
|
|
109
|
+
},
|
|
110
|
+
],
|
|
107
111
|
},
|
|
108
112
|
{
|
|
109
113
|
name: 'configurations',
|
package/src/App/Data.js
CHANGED
|
@@ -3,6 +3,8 @@ import { validate } from 'validate.js';
|
|
|
3
3
|
import isArray from 'lodash/isArray';
|
|
4
4
|
import { t } from './i18n';
|
|
5
5
|
|
|
6
|
+
export const whiteSpacePattern = /^[\S]+$/;
|
|
7
|
+
|
|
6
8
|
validate.validators.nonEmptyArray = function(value, options) {
|
|
7
9
|
if (options && options === true && isArray(value) && value.length !== 0) {
|
|
8
10
|
return null;
|
|
@@ -67,6 +69,18 @@ validate.validators.color = function(value, options) {
|
|
|
67
69
|
return true;
|
|
68
70
|
};
|
|
69
71
|
|
|
72
|
+
validate.validators.noWhitespace = function(value, options) {
|
|
73
|
+
if (
|
|
74
|
+
options === true &&
|
|
75
|
+
typeof value === 'string' &&
|
|
76
|
+
value.match(whiteSpacePattern) &&
|
|
77
|
+
value.match(whiteSpacePattern)[0] === value
|
|
78
|
+
) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return t('customValidators.noWhitespace');
|
|
82
|
+
}
|
|
83
|
+
|
|
70
84
|
export default class Data {
|
|
71
85
|
static EventTypes = {
|
|
72
86
|
init: 'init',
|
package/src/App/Translations.js
CHANGED
|
@@ -65,6 +65,7 @@ require('./i18n').use(
|
|
|
65
65
|
'Identifiers should only contain lowercase letters, numbers, underscores, periods and dashes.',
|
|
66
66
|
blankError: "Can't be blank",
|
|
67
67
|
decimalPoint: 'Please use dot (".") as decimal separator',
|
|
68
|
+
noWhitespace: "Name should not contain whitespaces.",
|
|
68
69
|
},
|
|
69
70
|
callToActionDefault: {
|
|
70
71
|
addToCart: 'Use default setting (Add to cart)',
|
|
@@ -160,6 +161,7 @@ require('./i18n').use(
|
|
|
160
161
|
'Der Identifier darf nur aus Kleinbuchstaben, Zahlen, Unterstrichen, Punkten und Bindestrichen bestehen.',
|
|
161
162
|
blankError: 'Kann nicht leer sein',
|
|
162
163
|
decimalPoint: 'Bitte Punkt (".") als Dezimaltrennzeichen verwenden',
|
|
164
|
+
noWhitespace: "Name darf keine Leerzeichen enthalten.",
|
|
163
165
|
},
|
|
164
166
|
callToActionDefault: {
|
|
165
167
|
addToCart: 'Default (In den Warenkorb)',
|
|
@@ -2,7 +2,7 @@ import Actions, { REDUCER_NAME } from '../Reducers/Actions';
|
|
|
2
2
|
import SimpleNestedData from '../../../Components/FormFragments/SimpleNestedData';
|
|
3
3
|
import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
|
|
4
4
|
import ColorTextField from '../Components/ColorTextField';
|
|
5
|
-
import { t } from '../../../App/i18n';
|
|
5
|
+
import { T, t } from '../../../App/i18n';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { CallToActionField } from '../../../Components/CallToActionField';
|
|
8
8
|
import { PdfMarkDownField } from '../Components/PdfMarkdownField';
|
|
@@ -54,6 +54,7 @@ const formFields = [
|
|
|
54
54
|
accept: '.ttf',
|
|
55
55
|
showFileName: true,
|
|
56
56
|
deleteEnabled: true,
|
|
57
|
+
warningMessage: T('clientFontMessage')
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
name: 'logo',
|
|
@@ -16,6 +16,7 @@ require('../../App/i18n').use(
|
|
|
16
16
|
headerInfo: 'Please check your changes in a generated pdf to make sure it looks as expected',
|
|
17
17
|
footerInfo: 'Please check your changes in a generated pdf to make sure it looks as expected',
|
|
18
18
|
emailHint: 'separate multiple addresses with a semicolon',
|
|
19
|
+
clientFontMessage: 'For the font to be rendered correctly in the configuratorware frontend, make sure the filename does not contain any spaces and matches the fonts internal name.'
|
|
19
20
|
},
|
|
20
21
|
de: {
|
|
21
22
|
clients: 'Klienten',
|
|
@@ -46,6 +47,7 @@ require('../../App/i18n').use(
|
|
|
46
47
|
headerInfo: 'Bitte überprüfe Deine Änderungen in einem generierten PDF',
|
|
47
48
|
footerInfo: 'Bitte überprüfe Deine Änderungen in einem generierten PDF',
|
|
48
49
|
emailHint: 'trenne mehrere Adressen mit einem Semikolon',
|
|
50
|
+
clientFontMessage: 'Für eine korrekte Darstellung der Schrift im configuratorware Fronted darf der Dateiname keine Leerzeichen enthalten und muss dem internen Namen der Schriftart entsprechen.'
|
|
49
51
|
},
|
|
50
52
|
},
|
|
51
53
|
true
|
|
@@ -2,7 +2,7 @@ import Actions, { REDUCER_NAME } from '../Reducers/Actions';
|
|
|
2
2
|
import SimpleNestedData from '../../../Components/FormFragments/SimpleNestedData';
|
|
3
3
|
import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
|
|
4
4
|
import { withLoadAction } from '../../../Components/withLoadAction';
|
|
5
|
-
import { t } from '../../../App/i18n';
|
|
5
|
+
import {T, t } from '../../../App/i18n';
|
|
6
6
|
import { CallToActionField } from '../../../Components/CallToActionField';
|
|
7
7
|
import PdfMarkDownField from '../../Client/Components/PdfMarkdownField';
|
|
8
8
|
|
|
@@ -23,6 +23,7 @@ const formFields = [
|
|
|
23
23
|
accept: '.ttf',
|
|
24
24
|
showFileName: true,
|
|
25
25
|
deleteEnabled: true,
|
|
26
|
+
warningMessage: T('clientFontMessage')
|
|
26
27
|
},
|
|
27
28
|
{
|
|
28
29
|
name: 'logo',
|
|
@@ -121,7 +121,7 @@ class FormProductionMethods extends React.Component {
|
|
|
121
121
|
let { value } = e.target;
|
|
122
122
|
const nextData = {};
|
|
123
123
|
|
|
124
|
-
if (key === 'allowBulkNames' || key === 'isDefault' || key === 'designElementsLocked') {
|
|
124
|
+
if (key === 'allowBulkNames' || key === 'isDefault' || key === 'designElementsLocked' || key === 'oneLineText') {
|
|
125
125
|
value = e.target.checked;
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -893,6 +893,19 @@ class FormProductionMethods extends React.Component {
|
|
|
893
893
|
label={t('designElementsLocked')}
|
|
894
894
|
/>
|
|
895
895
|
</Grid>
|
|
896
|
+
<Grid item xs={12} className={classes.checkboxGrid}>
|
|
897
|
+
<FormControlLabel
|
|
898
|
+
control={
|
|
899
|
+
<Checkbox
|
|
900
|
+
checked={productionMethod.oneLineText}
|
|
901
|
+
onChange={this.onChange('oneLineText')}
|
|
902
|
+
value={'oneLineText'}
|
|
903
|
+
color="primary"
|
|
904
|
+
/>
|
|
905
|
+
}
|
|
906
|
+
label={t('oneLineText')}
|
|
907
|
+
/>
|
|
908
|
+
</Grid>
|
|
896
909
|
<Grid item xs={12} className={classes.checkboxGrid}>
|
|
897
910
|
<TextField
|
|
898
911
|
label={t('minimumOrderAmount')}
|
|
@@ -903,6 +916,7 @@ class FormProductionMethods extends React.Component {
|
|
|
903
916
|
{...this.getErrorProps('minimumOrderAmount')}
|
|
904
917
|
/>
|
|
905
918
|
</Grid>
|
|
919
|
+
|
|
906
920
|
<Grid item xs={12} className={classes.checkboxGrid}>
|
|
907
921
|
<div className={classes.inputWithLabel}>
|
|
908
922
|
<FormLabel component="legend"> {t('maxTextElements')} </FormLabel>
|
|
@@ -7,6 +7,7 @@ require('../../App/i18n').use(
|
|
|
7
7
|
visualMaintenance: 'Visual maintenance',
|
|
8
8
|
pleaseUseVisualMaintanance: 'please use visual maintanance',
|
|
9
9
|
modeChangeConfirm: 'The views and visual maintanance data will be lost. Do you want to proceed?',
|
|
10
|
+
oneLineText: 'Restrict textinput to one line',
|
|
10
11
|
designDataTransfer: {
|
|
11
12
|
buttonUseAsTemplate: 'Use as template',
|
|
12
13
|
dialogTitle: 'Transfer of design settings',
|
|
@@ -47,6 +48,7 @@ require('../../App/i18n').use(
|
|
|
47
48
|
itemStatus: 'Status',
|
|
48
49
|
},
|
|
49
50
|
Hint: 'Hinweis',
|
|
51
|
+
oneLineText: 'Texteingabe auf eine Zeile beschränken',
|
|
50
52
|
},
|
|
51
53
|
},
|
|
52
54
|
true
|
|
@@ -249,6 +249,44 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
|
|
|
249
249
|
</span>
|
|
250
250
|
</label>
|
|
251
251
|
</div>
|
|
252
|
+
<div
|
|
253
|
+
class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
|
|
254
|
+
>
|
|
255
|
+
<label
|
|
256
|
+
class="MuiFormControlLabel-root-205"
|
|
257
|
+
>
|
|
258
|
+
<span
|
|
259
|
+
class="MuiButtonBase-root-227 MuiIconButton-root-221 MuiPrivateSwitchBase-root-217 MuiCheckbox-root-211 MuiCheckbox-colorPrimary-215"
|
|
260
|
+
>
|
|
261
|
+
<span
|
|
262
|
+
class="MuiIconButton-label-226"
|
|
263
|
+
>
|
|
264
|
+
<svg
|
|
265
|
+
aria-hidden="true"
|
|
266
|
+
class="MuiSvgIcon-root-184"
|
|
267
|
+
focusable="false"
|
|
268
|
+
role="presentation"
|
|
269
|
+
viewBox="0 0 24 24"
|
|
270
|
+
>
|
|
271
|
+
<path
|
|
272
|
+
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
|
273
|
+
/>
|
|
274
|
+
</svg>
|
|
275
|
+
<input
|
|
276
|
+
class="MuiPrivateSwitchBase-input-220"
|
|
277
|
+
data-indeterminate="false"
|
|
278
|
+
type="checkbox"
|
|
279
|
+
value="oneLineText"
|
|
280
|
+
/>
|
|
281
|
+
</span>
|
|
282
|
+
</span>
|
|
283
|
+
<span
|
|
284
|
+
class="MuiTypography-root-230 MuiTypography-body1-239 MuiFormControlLabel-label-210"
|
|
285
|
+
>
|
|
286
|
+
oneLineText
|
|
287
|
+
</span>
|
|
288
|
+
</label>
|
|
289
|
+
</div>
|
|
252
290
|
<div
|
|
253
291
|
class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
|
|
254
292
|
>
|
|
@@ -10,6 +10,7 @@ import { SET_DATA } from '../../../App/Reducers/Entity/Actions';
|
|
|
10
10
|
|
|
11
11
|
import { generateDefaultActions } from '../../../App/Reducers/Entity/Actions';
|
|
12
12
|
import { dispatchPostData } from '../../../App/Reducers/Api/Helpers';
|
|
13
|
+
import { whiteSpacePattern } from "../../../App/Data";
|
|
13
14
|
|
|
14
15
|
const actions = generateDefaultActions(LIST_KEY, DATA_KEY, REDUCER_NAME, 'fonts');
|
|
15
16
|
|
|
@@ -45,8 +46,7 @@ actions.postData = () => (dispatch, getState) => {
|
|
|
45
46
|
const fontsToUpload = [];
|
|
46
47
|
|
|
47
48
|
const fontName = state.data.name.value;
|
|
48
|
-
|
|
49
|
-
if (fontName) {
|
|
49
|
+
if (fontName && fontName.match(whiteSpacePattern) && fontName.match(whiteSpacePattern)[0] === fontName) {
|
|
50
50
|
const fontTypeMap = {
|
|
51
51
|
fileNameRegular: 'regular',
|
|
52
52
|
fileNameBold: 'bold',
|
|
@@ -87,7 +87,7 @@ actions.postData = () => (dispatch, getState) => {
|
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
checkFontsToUpload();
|
|
90
|
-
});
|
|
90
|
+
});
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
checkFontsToUpload();
|
|
@@ -8,7 +8,7 @@ const initialState = {
|
|
|
8
8
|
...getDefaultEntityState(
|
|
9
9
|
{
|
|
10
10
|
id: null,
|
|
11
|
-
name: { value: '', constraints: { presence: true } },
|
|
11
|
+
name: { value: '', constraints: { noWhitespace: true, presence: true } },
|
|
12
12
|
active: false,
|
|
13
13
|
isDefault: { value: false },
|
|
14
14
|
fileNameRegular: null,
|
|
@@ -235,6 +235,27 @@ const formFields = [
|
|
|
235
235
|
type: 'toggle',
|
|
236
236
|
shouldRender: schema => schema.children.value.length > 0,
|
|
237
237
|
},
|
|
238
|
+
{
|
|
239
|
+
name: 'itemclassifications',
|
|
240
|
+
label: 'itemclassifications',
|
|
241
|
+
type: 'dynSource',
|
|
242
|
+
sourceConfig: {
|
|
243
|
+
value: 'id',
|
|
244
|
+
text: 'translated_title',
|
|
245
|
+
},
|
|
246
|
+
dynSource: {
|
|
247
|
+
type: 'chip',
|
|
248
|
+
listKey: ITEMCLASSIFICATION_LIST_KEY,
|
|
249
|
+
url: ITEMCLASSIFICATIONS_URL,
|
|
250
|
+
autoLoad: false,
|
|
251
|
+
maxSearchResults: 25,
|
|
252
|
+
mapItems: item => ({ ...item, label: `${item.translated_title}` }),
|
|
253
|
+
},
|
|
254
|
+
openOnFocus: true,
|
|
255
|
+
loadEntity: Actions.loadEntity,
|
|
256
|
+
entityReducerName: 'itemclassificationData',
|
|
257
|
+
equalityCheckAttribute: 'identifier',
|
|
258
|
+
},
|
|
238
259
|
{
|
|
239
260
|
name: 'minimumOrderAmount',
|
|
240
261
|
label: 'MinimumOrderAmount',
|
|
@@ -357,7 +378,8 @@ import { LOGIN_REDUCER_NAME } from '../../Login/Reducers/Actions';
|
|
|
357
378
|
import CheckData from '../../Creator/Components/CheckData/CheckData';
|
|
358
379
|
import LocalizedPriceValue from '../../../Components/LocalizedPriceValue';
|
|
359
380
|
import { LocalizedPriceTextField } from '../../../Components/LocalizedPriceTextField';
|
|
360
|
-
import {CallToActionField} from "../../../Components/CallToActionField";
|
|
381
|
+
import { CallToActionField } from "../../../Components/CallToActionField";
|
|
382
|
+
import { ITEMCLASSIFICATION_LIST_KEY, ITEMCLASSIFICATIONS_URL } from "../../Itemclassification/Reducers/Actions";
|
|
361
383
|
|
|
362
384
|
const styles = theme => ({
|
|
363
385
|
root: {
|
|
@@ -18,6 +18,7 @@ require('../../App/i18n').use(
|
|
|
18
18
|
editDialogTitle: 'Edit selected entries',
|
|
19
19
|
editDialogHint:
|
|
20
20
|
'Use the checkboxes to select one or more entries in the list</br>and then click this icon to set the item status for them.',
|
|
21
|
+
itemclassifications: 'Product categories',
|
|
21
22
|
visualizationData: {
|
|
22
23
|
'2d': "2D",
|
|
23
24
|
'3d': "3D",
|
|
@@ -99,6 +100,7 @@ require('../../App/i18n').use(
|
|
|
99
100
|
editDialogTitle: 'Gewählte Einträge bearbeiten',
|
|
100
101
|
editDialogHint:
|
|
101
102
|
'Nutze die Checkboxen in der Liste und klicke dann dieses Icon,</br>um den Status für einen oder mehrere Einträge zu setzen.',
|
|
103
|
+
itemclassifications: 'Produktkategorien',
|
|
102
104
|
visualizationData: {
|
|
103
105
|
'2d': "2D",
|
|
104
106
|
'3d': "3D",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import Screen from './Screen';
|
|
2
2
|
import itemData from './Reducers/ItemReducer';
|
|
3
3
|
import variantData from './Reducers/Variant/Reducer';
|
|
4
|
+
import itemClassificationData from './../Itemclassification/Reducers/Reducer';
|
|
4
5
|
|
|
5
6
|
import { addReducers } from '../../App/FeatureReducers';
|
|
6
7
|
|
|
7
|
-
addReducers([itemData, variantData]);
|
|
8
|
+
addReducers([itemData, variantData, itemClassificationData]);
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
11
|
Screen,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Actions, { ITEMCLASSIFICATION_REDUCER_NAME } from '../Reducers/Actions';
|
|
3
|
+
|
|
4
|
+
const { setFieldData, postData, customAction } = Actions;
|
|
5
|
+
import attributesDataStructure from '../../Item/DataStructures/Attributes/Editor';
|
|
6
|
+
|
|
7
|
+
const formFields = [
|
|
8
|
+
{
|
|
9
|
+
name: 'identifier',
|
|
10
|
+
label: 'Identifier',
|
|
11
|
+
type: 'text',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'texts',
|
|
15
|
+
label: 'Title',
|
|
16
|
+
type: 'intl',
|
|
17
|
+
intl: {
|
|
18
|
+
name: 'title',
|
|
19
|
+
type: 'text',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'minimumOrderAmount',
|
|
24
|
+
label: 'Minimum order amount',
|
|
25
|
+
type: 'text',
|
|
26
|
+
},
|
|
27
|
+
...attributesDataStructure,
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
|
|
31
|
+
import EditorPopup from '../../Item/Components/AttributeEditorPopup';
|
|
32
|
+
|
|
33
|
+
const BaseDataForm = generateConnectedEdit(
|
|
34
|
+
formFields,
|
|
35
|
+
ITEMCLASSIFICATION_REDUCER_NAME,
|
|
36
|
+
setFieldData,
|
|
37
|
+
postData,
|
|
38
|
+
false,
|
|
39
|
+
customAction
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const ItemClassificationForm = () => (
|
|
43
|
+
<div>
|
|
44
|
+
<BaseDataForm />
|
|
45
|
+
<EditorPopup />
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export default ItemClassificationForm;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Actions, {
|
|
3
|
+
ITEMCLASSIFICATION_LIST_KEY,
|
|
4
|
+
ITEMCLASSIFICATIONS_URL,
|
|
5
|
+
ITEMCLASSIFICATION_REDUCER_NAME,
|
|
6
|
+
} from '../Reducers/Actions';
|
|
7
|
+
const { detailsAction, hideDetails, showDetails, createEntity, listAction, deleteEntities } = Actions;
|
|
8
|
+
|
|
9
|
+
const columns = [
|
|
10
|
+
{
|
|
11
|
+
name: 'identifier',
|
|
12
|
+
label: 'Identifier',
|
|
13
|
+
filterable: true,
|
|
14
|
+
sortable: true,
|
|
15
|
+
filterKey: 'itemclassification.identifier',
|
|
16
|
+
sortKey: 'itemclassification.identifier',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'translated_title',
|
|
20
|
+
label: 'Title',
|
|
21
|
+
filterable: true,
|
|
22
|
+
sortable: true,
|
|
23
|
+
filterKey: 'itemclassification.itemClassificationText.title',
|
|
24
|
+
sortKey: 'itemclassification.itemClassificationText.title',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const listParams = {
|
|
29
|
+
entity: 'itemclassifications',
|
|
30
|
+
addButtonLabel: 'itemclassifications.addButtonLabel',
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
import generateConnectedList from '../../../Components/DefaultConnectedList';
|
|
34
|
+
import OrderList from '../../../Components/OrderList';
|
|
35
|
+
|
|
36
|
+
export const ConnectedList = generateConnectedList(
|
|
37
|
+
columns,
|
|
38
|
+
listParams,
|
|
39
|
+
ITEMCLASSIFICATION_LIST_KEY,
|
|
40
|
+
listAction,
|
|
41
|
+
detailsAction,
|
|
42
|
+
hideDetails,
|
|
43
|
+
showDetails,
|
|
44
|
+
createEntity,
|
|
45
|
+
deleteEntities,
|
|
46
|
+
{
|
|
47
|
+
reducerName: ITEMCLASSIFICATION_REDUCER_NAME,
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const list = () => {
|
|
52
|
+
return (
|
|
53
|
+
<div>
|
|
54
|
+
<ConnectedList />
|
|
55
|
+
<OrderList
|
|
56
|
+
listUrl={ITEMCLASSIFICATIONS_URL}
|
|
57
|
+
entity={'itemclassification'}
|
|
58
|
+
orderSequenceNumber={'sequencenumber'}
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default list;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const ITEMCLASSIFICATION_LIST_KEY = 'itemclassifications';
|
|
2
|
+
export const ITEMCLASSIFICATION_DATA_KEY = 'itemclassification';
|
|
3
|
+
export const ITEMCLASSIFICATION_REDUCER_NAME = 'itemclassificationData';
|
|
4
|
+
export const ITEMCLASSIFICATIONS_URL = 'itemclassifications';
|
|
5
|
+
|
|
6
|
+
import { generateDefaultActions } from '../../../App/Reducers/Entity/Actions';
|
|
7
|
+
|
|
8
|
+
const actions = generateDefaultActions(
|
|
9
|
+
ITEMCLASSIFICATION_LIST_KEY,
|
|
10
|
+
ITEMCLASSIFICATION_DATA_KEY,
|
|
11
|
+
ITEMCLASSIFICATION_REDUCER_NAME,
|
|
12
|
+
ITEMCLASSIFICATIONS_URL
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export const { hideDetails, loadEntity, postData } = actions;
|
|
16
|
+
|
|
17
|
+
export default actions;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ITEMCLASSIFICATION_DATA_KEY, ITEMCLASSIFICATION_REDUCER_NAME } from './Actions';
|
|
2
|
+
import { defaultEntityReducer, getDefaultEntityState } from '../../../App/Reducers/Entity/Reducer';
|
|
3
|
+
import { createFeatureReducer } from '../../../App/FeatureReducers';
|
|
4
|
+
import attributesDataStructure from '../../Item/DataStructures/Attributes/Reducer';
|
|
5
|
+
|
|
6
|
+
const initialState = {
|
|
7
|
+
...getDefaultEntityState(
|
|
8
|
+
{
|
|
9
|
+
id: null,
|
|
10
|
+
identifier: { value: '', constraints: { identifier: true } },
|
|
11
|
+
sequencenumber: {
|
|
12
|
+
value: null,
|
|
13
|
+
constraints: { numericality: { strict: true, onlyInteger: true } },
|
|
14
|
+
},
|
|
15
|
+
texts: [],
|
|
16
|
+
minimumOrderAmount: {
|
|
17
|
+
value: null,
|
|
18
|
+
constraints: { numericality: { strict: true, onlyInteger: true } },
|
|
19
|
+
},
|
|
20
|
+
...attributesDataStructure,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
source: 'itemclassifications',
|
|
24
|
+
dependencies: [
|
|
25
|
+
{
|
|
26
|
+
name: 'itemclassifications',
|
|
27
|
+
dataKey: 'parent_itemclassifications',
|
|
28
|
+
source: 'itemclassifications',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
ITEMCLASSIFICATION_DATA_KEY
|
|
33
|
+
),
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const itemClassificationData = createFeatureReducer(
|
|
37
|
+
ITEMCLASSIFICATION_REDUCER_NAME,
|
|
38
|
+
(state = initialState, action) => {
|
|
39
|
+
return defaultEntityReducer(state, action, initialState);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
export default itemClassificationData;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Actions, { ITEMCLASSIFICATION_REDUCER_NAME } from './Reducers/Actions';
|
|
2
|
+
const { invalidateList, triggerUnsavedEntity, hideDetails } = Actions;
|
|
3
|
+
|
|
4
|
+
import List from './Containers/List';
|
|
5
|
+
import Edit from './Containers/Edit';
|
|
6
|
+
|
|
7
|
+
import './Translations';
|
|
8
|
+
|
|
9
|
+
import { generateConnectedSplitScreen } from '../../Components/DefaultConnectedScreen';
|
|
10
|
+
|
|
11
|
+
export default generateConnectedSplitScreen(
|
|
12
|
+
'item_classifications',
|
|
13
|
+
List,
|
|
14
|
+
Edit,
|
|
15
|
+
ITEMCLASSIFICATION_REDUCER_NAME,
|
|
16
|
+
invalidateList,
|
|
17
|
+
triggerUnsavedEntity,
|
|
18
|
+
hideDetails
|
|
19
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require('../../App/i18n').use(
|
|
2
|
+
{
|
|
3
|
+
en: {
|
|
4
|
+
itemclassifications: {
|
|
5
|
+
addButtonLabel: 'Add Product category',
|
|
6
|
+
menuLabel: 'Product Categories',
|
|
7
|
+
},
|
|
8
|
+
item_classifications: 'Product categories',
|
|
9
|
+
'Minimum order amount': 'Minimum order amount',
|
|
10
|
+
},
|
|
11
|
+
de: {
|
|
12
|
+
itemclassifications: {
|
|
13
|
+
addButtonLabel: 'Produktkategorie hinzufügen',
|
|
14
|
+
menuLabel: 'Produktkategorien',
|
|
15
|
+
},
|
|
16
|
+
'Sequence number': 'Reihenfolge',
|
|
17
|
+
item_classifications: 'Produktkategorien',
|
|
18
|
+
'Minimum order amount': 'Mindestbestellmenge',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
true
|
|
22
|
+
);
|
package/src/Screens/index.js
CHANGED
|
@@ -19,7 +19,8 @@ import Savedconfigurations from './Savedconfigurations';
|
|
|
19
19
|
import SoftwareUpdates from './SoftwareUpdates';
|
|
20
20
|
import TrackingCodes from './TrackingCodes';
|
|
21
21
|
import User from './User';
|
|
22
|
-
import
|
|
22
|
+
import Itemclassification from './Itemclassification';
|
|
23
|
+
import Finder from './Finder';
|
|
23
24
|
|
|
24
25
|
export { Dashboard };
|
|
25
26
|
export { Login };
|
|
@@ -36,6 +37,7 @@ export const features = {
|
|
|
36
37
|
designer: Designer,
|
|
37
38
|
design_production_methods: DesignProductionMethods,
|
|
38
39
|
items: Item,
|
|
40
|
+
item_classifications: Itemclassification,
|
|
39
41
|
licenses: License,
|
|
40
42
|
options: Option,
|
|
41
43
|
option_classifications: Optionclassification,
|