@configuratorware/configurator-admingui 1.36.0-beta.0 → 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/Components/FormFragments/MonacoEditor.js +1 -1
- package/Screens/Client/Containers/Edit.js +2 -1
- 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/Components/TemplateList.js +1 -1
- package/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +13 -1
- package/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +3 -0
- package/Screens/Designer/SubScreens/Designviews/Reducers/Actions.js +13 -5
- package/Screens/Designer/Translations.js +3 -1
- package/Screens/Font/Reducers/Actions.js +15 -7
- 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 +24 -18
- package/scripts/getDefaultWebpackConfig.js +11 -22
- package/src/App/Config/defaultConfig.js +13 -9
- package/src/App/Data.js +14 -0
- package/src/App/Translations.js +2 -0
- package/src/Components/FormFragments/MonacoEditor.js +1 -1
- package/src/Screens/Client/Containers/Edit.js +2 -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/Components/TemplateList.js +1 -1
- 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/SubScreens/Designviews/Reducers/Actions.js +9 -1
- 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 +16 -11
- 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
|
@@ -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,
|