@configuratorware/configurator-admingui 1.26.5 → 1.27.2

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.
Files changed (44) hide show
  1. package/package.json +2 -2
  2. package/src/App/Data.js +9 -0
  3. package/src/App/Reducers/Common/OrderList/Actions.js +11 -3
  4. package/src/App/Reducers/Common/OrderList/Listener.js +2 -2
  5. package/src/App/Reducers/Common/OrderList/Reducer.js +22 -3
  6. package/src/App/Styles.scss +19 -1
  7. package/src/Components/DefaultConnectedScreen.js +3 -2
  8. package/src/Components/DefaultScreen.js +10 -2
  9. package/src/Components/Form.js +4 -0
  10. package/src/Components/FormFragments/HintText.js +14 -0
  11. package/src/Components/FormFragments/InputArray.js +42 -13
  12. package/src/Components/FormFragments/SimpleTable.js +18 -2
  13. package/src/Components/FormFragments/Styles.scss +4 -0
  14. package/src/Components/FormFragments/Text.js +1 -0
  15. package/src/Components/FormFragments/index.js +3 -0
  16. package/src/Components/List.js +1 -0
  17. package/src/Components/OrderList.js +15 -7
  18. package/src/Components/Pagination.js +8 -0
  19. package/src/Components/SplitContainer.js +25 -2
  20. package/src/Components/Styles.scss +2 -0
  21. package/src/Components/Translations.js +6 -0
  22. package/src/Screens/ColorPalettes/Components/DefaultColorSwitch.js +54 -0
  23. package/src/Screens/ColorPalettes/Containers/Edit.js +39 -21
  24. package/src/Screens/ColorPalettes/Translations.js +1 -0
  25. package/src/Screens/Creator/Reducers/ConfigurationActions.js +1 -1
  26. package/src/Screens/DesignProductionMethods/Containers/Edit.js +0 -5
  27. package/src/Screens/DesignProductionMethods/Reducers/DesignProductionMethodsReducer.js +0 -1
  28. package/src/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +339 -256
  29. package/src/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +26 -3
  30. package/src/Screens/Designer/SubScreens/DesignAreas/Translations.js +16 -2
  31. package/src/Screens/Designer/__tests__/FormProductionMethods.test.js +0 -2
  32. package/src/Screens/Designer/__tests__/__snapshots__/FormProductionMethods.test.js.snap +167 -50
  33. package/src/Screens/DesignerGlobalItemPrices/Containers/Edit.js +34 -6
  34. package/src/Screens/DesignerGlobalItemPrices/Reducers/Actions.js +1 -1
  35. package/src/Screens/DesignerGlobalItemPrices/Screen.js +3 -1
  36. package/src/Screens/DesignerGlobalItemPrices/Translations.js +8 -0
  37. package/src/Screens/Font/Containers/List.js +14 -3
  38. package/src/Screens/Item/Containers/Styles.scss +3 -0
  39. package/src/Screens/OptionPools/Containers/Edit.js +20 -0
  40. package/src/Screens/OptionPools/Reducers/Reducer.js +3 -2
  41. package/src/Screens/Setting/Containers/Edit.js +6 -0
  42. package/src/Screens/Setting/Reducers/Reducer.js +1 -0
  43. package/src/Screens/Setting/Translations.js +4 -0
  44. package/src/Screens/ColorPalettes/Components/DefaultColorRadio.js +0 -35
@@ -49,11 +49,27 @@ const initialState = {
49
49
  id: { value: null },
50
50
  height: { value: 0 },
51
51
  width: { value: 0 },
52
+ designElementsLocked: { value: false },
52
53
  minimumOrderAmount: {
53
54
  constraints: {
54
55
  emptyOrPositive: true,
55
56
  },
56
57
  },
58
+ maxTexts: {
59
+ constraints: {
60
+ numericOrEmpty: { strict: true, onlyInteger: true, greaterThanOrEqualTo: 0 },
61
+ },
62
+ },
63
+ maxImages: {
64
+ constraints: {
65
+ numericOrEmpty: { strict: true, onlyInteger: true, greaterThanOrEqualTo: 0 },
66
+ },
67
+ },
68
+ maxElements: {
69
+ constraints: {
70
+ numericOrEmpty: { strict: true, onlyInteger: true, greaterThanOrEqualTo: 1 },
71
+ },
72
+ },
57
73
  mask: { value: {} },
58
74
  calculationTypes: {
59
75
  value: [],
@@ -91,7 +107,6 @@ const initialState = {
91
107
  minFontSize: 0,
92
108
  maxColorAmount: 0,
93
109
  visualizationRenderer: '',
94
- hasEngravingBackgroundColors: false,
95
110
  },
96
111
  },
97
112
  additionalData: {
@@ -154,7 +169,7 @@ const populateDesignProductionMethod = (state, action) => {
154
169
  return state;
155
170
  };
156
171
 
157
- const overwriteEmptyMinimumOrderAmount = (state, action) => {
172
+ export const overwriteEmptyDesignProductionData = (state, action) => {
158
173
  if ((action.type === SET_VALIDATED_DATA || action.type === MOUNT_NEXT) && action.key === DATA_KEY) {
159
174
  return {
160
175
  ...state,
@@ -165,6 +180,14 @@ const overwriteEmptyMinimumOrderAmount = (state, action) => {
165
180
  value: state.data.designProductionMethods.value.map(method => ({
166
181
  ...method,
167
182
  minimumOrderAmount: method.minimumOrderAmount || 1,
183
+ maxElements:
184
+ method.maxElements !== null &&
185
+ method.maxElements !== '' &&
186
+ Number(method.maxElements) < Number(method.maxTexts) + Number(method.maxImages)
187
+ ? Number(method.maxTexts) + Number(method.maxImages)
188
+ : method.maxElements,
189
+ maxTexts: method.maxTexts,
190
+ maxImages: method.maxImages,
168
191
  })),
169
192
  },
170
193
  },
@@ -177,7 +200,7 @@ const overwriteEmptyMinimumOrderAmount = (state, action) => {
177
200
  export const designAreasData = createFeatureReducer(REDUCER_NAME, (state = initialState, action) => {
178
201
  state = defaultEntityReducer(state, action, initialState);
179
202
  state = populateDesignProductionMethod(state, action);
180
- state = overwriteEmptyMinimumOrderAmount(state, action);
203
+ state = overwriteEmptyDesignProductionData(state, action);
181
204
 
182
205
  switch (action.type) {
183
206
  case SET_ITEM: {
@@ -6,7 +6,7 @@ require('../../../../App/i18n').use(
6
6
  isDefault: 'default',
7
7
  allowBulkNames: 'Allow bulk names',
8
8
  varyingDefaultColors: 'Varying Default Color',
9
- EngravingBackgroundColor: ' hex-color',
9
+ EngravingBackgroundColor: 'Color value',
10
10
  errors: {
11
11
  noProdMethodLeft: 'No more production methods exist.',
12
12
  },
@@ -54,6 +54,12 @@ require('../../../../App/i18n').use(
54
54
  },
55
55
  },
56
56
  },
57
+ maxTextElements: 'Maximum number of text elements allowed (empty for any number, 0 for none)',
58
+ maxImageElements: 'Maximum number of picture elements allowed (empty for any number, 0 for none)',
59
+ maxTotalElements: 'Maximum number of elements allowed in total (empty for any number)',
60
+ designElementsLocked:
61
+ 'Design position locked - Design elements appear centered and cannot be moved by the user',
62
+ minElementsError: 'At least 1 text or picture element need to be allowed',
57
63
  },
58
64
  de: {
59
65
  Title: 'Titel',
@@ -69,7 +75,7 @@ require('../../../../App/i18n').use(
69
75
  isDefault: 'Standard',
70
76
  allowBulkNames: 'Einzelnamen erlauben',
71
77
  varyingDefaultColors: 'abweichende Standardfarbe',
72
- EngravingBackgroundColor: ' hex-color',
78
+ EngravingBackgroundColor: 'Farbwert',
73
79
  errors: {
74
80
  noProdMethodLeft: 'Keine weiteren Produktionsverfahren vorhanden.',
75
81
  },
@@ -111,6 +117,14 @@ require('../../../../App/i18n').use(
111
117
  },
112
118
  },
113
119
  },
120
+ maxTextElements:
121
+ 'Maximal erlaubte Anzahl an Textelementen (leer für beliebig viele, 0 für keine)',
122
+ maxImageElements:
123
+ 'Maximal erlaubte Anzahl an Bildelementen (leer für beliebig viele, 0 für keine)',
124
+ maxTotalElements: 'Maximal erlaubte Anzahl Element insgesamt (leer für beliebig viele)',
125
+ designElementsLocked:
126
+ 'Designposition gesperrt - Designelemente erscheinen zentriert und können vom Nutzer nicht bewegt werden',
127
+ minElementsError: 'Mindestens 1 Text- oder Bildelement müssen erlaubt werden',
114
128
  },
115
129
  },
116
130
  true
@@ -44,7 +44,6 @@ const productionMethod = {
44
44
  minFontSize: 5,
45
45
  maxColorAmount: 4,
46
46
  visualizationRenderer: 'print',
47
- hasEngravingBackgroundColors: true,
48
47
  },
49
48
  additionalData: {
50
49
  engravingBackgroundColors: [
@@ -105,7 +104,6 @@ const availableMethods = [
105
104
  minFontSize: 5,
106
105
  maxColorAmount: 4,
107
106
  visualizationRenderer: 'engraving',
108
- hasEngravingBackgroundColors: true,
109
107
  },
110
108
  customData: {},
111
109
  calculationTypes: [],
@@ -2,28 +2,28 @@
2
2
 
3
3
  exports[`Unit- FormProductionMethods renders correctly 1`] = `
4
4
  <div
5
- class="MuiPaper-root-14 MuiPaper-elevation1-17 MuiPaper-rounded-15 MuiCard-root-13 FormProductionMethods-card-12"
5
+ class="MuiPaper-root-16 MuiPaper-elevation1-19 MuiPaper-rounded-17 MuiCard-root-15 FormProductionMethods-card-12"
6
6
  >
7
7
  <div
8
- class="MuiGrid-container-41"
8
+ class="MuiGrid-container-43"
9
9
  >
10
10
  <div
11
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81"
11
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83"
12
12
  >
13
13
  <div
14
- class="MuiFormControl-root-141 UISelectField-formControl-139"
14
+ class="MuiFormControl-root-143 UISelectField-formControl-141"
15
15
  style="width:100%"
16
16
  >
17
17
  <div
18
- class="MuiInputBase-root-165 MuiInput-root-152 MuiInput-underline-156 MuiInputBase-formControl-166 MuiInput-formControl-153 UISelectField-selectEmpty-140"
18
+ class="MuiInputBase-root-167 MuiInput-root-154 MuiInput-underline-158 MuiInputBase-formControl-168 MuiInput-formControl-155 UISelectField-selectEmpty-142"
19
19
  >
20
20
  <div
21
- class="MuiSelect-root-145"
21
+ class="MuiSelect-root-147"
22
22
  >
23
23
  <div
24
24
  aria-haspopup="true"
25
25
  aria-pressed="false"
26
- class="MuiSelect-select-146 MuiSelect-selectMenu-149 MuiInputBase-input-175 MuiInput-input-160"
26
+ class="MuiSelect-select-148 MuiSelect-selectMenu-151 MuiInputBase-input-177 MuiInput-input-162"
27
27
  id="select-SelectInput"
28
28
  role="button"
29
29
  tabindex="0"
@@ -40,7 +40,7 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
40
40
  />
41
41
  <svg
42
42
  aria-hidden="true"
43
- class="MuiSvgIcon-root-182 MuiSelect-icon-151"
43
+ class="MuiSvgIcon-root-184 MuiSelect-icon-153"
44
44
  focusable="false"
45
45
  role="presentation"
46
46
  viewBox="0 0 24 24"
@@ -52,28 +52,28 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
52
52
  </div>
53
53
  </div>
54
54
  <p
55
- class="MuiFormHelperText-root-195 MuiFormHelperText-filled-201"
55
+ class="MuiFormHelperText-root-197 MuiFormHelperText-filled-203"
56
56
  />
57
57
  </div>
58
58
  <div
59
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81"
59
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83"
60
60
  />
61
61
  </div>
62
62
  <div
63
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81 FormProductionMethods-checkboxGrid-1"
63
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
64
64
  >
65
65
  <label
66
- class="MuiFormControlLabel-root-203"
66
+ class="MuiFormControlLabel-root-205"
67
67
  >
68
68
  <span
69
- class="MuiButtonBase-root-225 MuiIconButton-root-219 MuiPrivateSwitchBase-root-215 MuiCheckbox-root-209 MuiCheckbox-colorPrimary-213"
69
+ class="MuiButtonBase-root-227 MuiIconButton-root-221 MuiPrivateSwitchBase-root-217 MuiCheckbox-root-211 MuiCheckbox-colorPrimary-215"
70
70
  >
71
71
  <span
72
- class="MuiIconButton-label-224"
72
+ class="MuiIconButton-label-226"
73
73
  >
74
74
  <svg
75
75
  aria-hidden="true"
76
- class="MuiSvgIcon-root-182"
76
+ class="MuiSvgIcon-root-184"
77
77
  focusable="false"
78
78
  role="presentation"
79
79
  viewBox="0 0 24 24"
@@ -83,7 +83,7 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
83
83
  />
84
84
  </svg>
85
85
  <input
86
- class="MuiPrivateSwitchBase-input-218"
86
+ class="MuiPrivateSwitchBase-input-220"
87
87
  data-indeterminate="false"
88
88
  type="checkbox"
89
89
  value="varyingDimensions"
@@ -91,27 +91,27 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
91
91
  </span>
92
92
  </span>
93
93
  <span
94
- class="MuiTypography-root-228 MuiTypography-body1-237 MuiFormControlLabel-label-208"
94
+ class="MuiTypography-root-230 MuiTypography-body1-239 MuiFormControlLabel-label-210"
95
95
  >
96
96
  varyingDimensions
97
97
  </span>
98
98
  </label>
99
99
  </div>
100
100
  <div
101
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81 FormProductionMethods-checkboxGrid-1"
101
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
102
102
  >
103
103
  <label
104
- class="MuiFormControlLabel-root-203"
104
+ class="MuiFormControlLabel-root-205"
105
105
  >
106
106
  <span
107
- class="MuiButtonBase-root-225 MuiIconButton-root-219 MuiPrivateSwitchBase-root-215 MuiCheckbox-root-209 MuiCheckbox-colorPrimary-213"
107
+ class="MuiButtonBase-root-227 MuiIconButton-root-221 MuiPrivateSwitchBase-root-217 MuiCheckbox-root-211 MuiCheckbox-colorPrimary-215"
108
108
  >
109
109
  <span
110
- class="MuiIconButton-label-224"
110
+ class="MuiIconButton-label-226"
111
111
  >
112
112
  <svg
113
113
  aria-hidden="true"
114
- class="MuiSvgIcon-root-182"
114
+ class="MuiSvgIcon-root-184"
115
115
  focusable="false"
116
116
  role="presentation"
117
117
  viewBox="0 0 24 24"
@@ -121,7 +121,7 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
121
121
  />
122
122
  </svg>
123
123
  <input
124
- class="MuiPrivateSwitchBase-input-218"
124
+ class="MuiPrivateSwitchBase-input-220"
125
125
  data-indeterminate="false"
126
126
  type="checkbox"
127
127
  value="allowBulkNames"
@@ -129,27 +129,27 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
129
129
  </span>
130
130
  </span>
131
131
  <span
132
- class="MuiTypography-root-228 MuiTypography-body1-237 MuiFormControlLabel-label-208"
132
+ class="MuiTypography-root-230 MuiTypography-body1-239 MuiFormControlLabel-label-210"
133
133
  >
134
134
  allowBulkNames
135
135
  </span>
136
136
  </label>
137
137
  </div>
138
138
  <div
139
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81 FormProductionMethods-checkboxGrid-1"
139
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
140
140
  >
141
141
  <label
142
- class="MuiFormControlLabel-root-203"
142
+ class="MuiFormControlLabel-root-205"
143
143
  >
144
144
  <span
145
- class="MuiButtonBase-root-225 MuiIconButton-root-219 MuiPrivateSwitchBase-root-215 MuiCheckbox-root-209 MuiCheckbox-colorPrimary-213"
145
+ class="MuiButtonBase-root-227 MuiIconButton-root-221 MuiPrivateSwitchBase-root-217 MuiCheckbox-root-211 MuiCheckbox-colorPrimary-215"
146
146
  >
147
147
  <span
148
- class="MuiIconButton-label-224"
148
+ class="MuiIconButton-label-226"
149
149
  >
150
150
  <svg
151
151
  aria-hidden="true"
152
- class="MuiSvgIcon-root-182"
152
+ class="MuiSvgIcon-root-184"
153
153
  focusable="false"
154
154
  role="presentation"
155
155
  viewBox="0 0 24 24"
@@ -159,7 +159,7 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
159
159
  />
160
160
  </svg>
161
161
  <input
162
- class="MuiPrivateSwitchBase-input-218"
162
+ class="MuiPrivateSwitchBase-input-220"
163
163
  data-indeterminate="false"
164
164
  type="checkbox"
165
165
  value="isDefault"
@@ -167,27 +167,27 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
167
167
  </span>
168
168
  </span>
169
169
  <span
170
- class="MuiTypography-root-228 MuiTypography-body1-237 MuiFormControlLabel-label-208"
170
+ class="MuiTypography-root-230 MuiTypography-body1-239 MuiFormControlLabel-label-210"
171
171
  >
172
172
  isDefault
173
173
  </span>
174
174
  </label>
175
175
  </div>
176
176
  <div
177
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81 FormProductionMethods-checkboxGrid-1"
177
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
178
178
  >
179
179
  <label
180
- class="MuiFormControlLabel-root-203"
180
+ class="MuiFormControlLabel-root-205"
181
181
  >
182
182
  <span
183
- class="MuiButtonBase-root-225 MuiIconButton-root-219 MuiPrivateSwitchBase-root-215 MuiCheckbox-root-209 MuiCheckbox-colorPrimary-213"
183
+ class="MuiButtonBase-root-227 MuiIconButton-root-221 MuiPrivateSwitchBase-root-217 MuiCheckbox-root-211 MuiCheckbox-colorPrimary-215"
184
184
  >
185
185
  <span
186
- class="MuiIconButton-label-224"
186
+ class="MuiIconButton-label-226"
187
187
  >
188
188
  <svg
189
189
  aria-hidden="true"
190
- class="MuiSvgIcon-root-182"
190
+ class="MuiSvgIcon-root-184"
191
191
  focusable="false"
192
192
  role="presentation"
193
193
  viewBox="0 0 24 24"
@@ -197,7 +197,7 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
197
197
  />
198
198
  </svg>
199
199
  <input
200
- class="MuiPrivateSwitchBase-input-218"
200
+ class="MuiPrivateSwitchBase-input-220"
201
201
  data-indeterminate="false"
202
202
  type="checkbox"
203
203
  value="varyingDefaultColors"
@@ -205,30 +205,68 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
205
205
  </span>
206
206
  </span>
207
207
  <span
208
- class="MuiTypography-root-228 MuiTypography-body1-237 MuiFormControlLabel-label-208"
208
+ class="MuiTypography-root-230 MuiTypography-body1-239 MuiFormControlLabel-label-210"
209
209
  >
210
210
  varyingDefaultColors
211
211
  </span>
212
212
  </label>
213
213
  </div>
214
214
  <div
215
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81 FormProductionMethods-checkboxGrid-1"
215
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
216
+ >
217
+ <label
218
+ class="MuiFormControlLabel-root-205"
219
+ >
220
+ <span
221
+ class="MuiButtonBase-root-227 MuiIconButton-root-221 MuiPrivateSwitchBase-root-217 MuiCheckbox-root-211 MuiCheckbox-colorPrimary-215"
222
+ >
223
+ <span
224
+ class="MuiIconButton-label-226"
225
+ >
226
+ <svg
227
+ aria-hidden="true"
228
+ class="MuiSvgIcon-root-184"
229
+ focusable="false"
230
+ role="presentation"
231
+ viewBox="0 0 24 24"
232
+ >
233
+ <path
234
+ 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"
235
+ />
236
+ </svg>
237
+ <input
238
+ class="MuiPrivateSwitchBase-input-220"
239
+ data-indeterminate="false"
240
+ type="checkbox"
241
+ value="designElementsLocked"
242
+ />
243
+ </span>
244
+ </span>
245
+ <span
246
+ class="MuiTypography-root-230 MuiTypography-body1-239 MuiFormControlLabel-label-210"
247
+ >
248
+ designElementsLocked
249
+ </span>
250
+ </label>
251
+ </div>
252
+ <div
253
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
216
254
  >
217
255
  <div
218
- class="MuiFormControl-root-141"
256
+ class="MuiFormControl-root-143"
219
257
  >
220
258
  <label
221
- class="MuiFormLabel-root-275 MuiInputLabel-root-264 MuiInputLabel-formControl-269 MuiInputLabel-animated-272"
259
+ class="MuiFormLabel-root-277 MuiInputLabel-root-266 MuiInputLabel-formControl-271 MuiInputLabel-animated-274"
222
260
  data-shrink="false"
223
261
  >
224
262
  minimumOrderAmount
225
263
  </label>
226
264
  <div
227
- class="MuiInputBase-root-165 MuiInput-root-152 MuiInput-underline-156 MuiInputBase-formControl-166 MuiInput-formControl-153"
265
+ class="MuiInputBase-root-167 MuiInput-root-154 MuiInput-underline-158 MuiInputBase-formControl-168 MuiInput-formControl-155"
228
266
  >
229
267
  <input
230
268
  aria-invalid="false"
231
- class="MuiInputBase-input-175 MuiInput-input-160 MuiInputBase-inputType-178 MuiInput-inputType-163"
269
+ class="MuiInputBase-input-177 MuiInput-input-162 MuiInputBase-inputType-180 MuiInput-inputType-165"
232
270
  type="number"
233
271
  value=""
234
272
  />
@@ -236,31 +274,110 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
236
274
  </div>
237
275
  </div>
238
276
  <div
239
- class="MuiGrid-container-41"
277
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
278
+ >
279
+ <div
280
+ class="FormProductionMethods-inputWithLabel-14"
281
+ >
282
+ <legend
283
+ class="MuiFormLabel-root-277"
284
+ >
285
+ maxTextElements
286
+ </legend>
287
+ <div
288
+ class="MuiFormControl-root-143"
289
+ >
290
+ <div
291
+ class="MuiInputBase-root-167 MuiInput-root-154 MuiInput-underline-158 MuiInputBase-formControl-168 MuiInput-formControl-155"
292
+ >
293
+ <input
294
+ aria-invalid="false"
295
+ class="MuiInputBase-input-177 MuiInput-input-162 MuiInputBase-inputType-180 MuiInput-inputType-165"
296
+ type="number"
297
+ />
298
+ </div>
299
+ </div>
300
+ </div>
301
+ </div>
302
+ <div
303
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
304
+ >
305
+ <div
306
+ class="FormProductionMethods-inputWithLabel-14"
307
+ >
308
+ <legend
309
+ class="MuiFormLabel-root-277"
310
+ >
311
+ maxImageElements
312
+ </legend>
313
+ <div
314
+ class="MuiFormControl-root-143"
315
+ >
316
+ <div
317
+ class="MuiInputBase-root-167 MuiInput-root-154 MuiInput-underline-158 MuiInputBase-formControl-168 MuiInput-formControl-155"
318
+ >
319
+ <input
320
+ aria-invalid="false"
321
+ class="MuiInputBase-input-177 MuiInput-input-162 MuiInputBase-inputType-180 MuiInput-inputType-165"
322
+ type="number"
323
+ />
324
+ </div>
325
+ </div>
326
+ </div>
327
+ </div>
328
+ <div
329
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
330
+ >
331
+ <div
332
+ class="FormProductionMethods-inputWithLabel-14"
333
+ >
334
+ <legend
335
+ class="MuiFormLabel-root-277"
336
+ >
337
+ maxTotalElements
338
+ </legend>
339
+ <div
340
+ class="MuiFormControl-root-143"
341
+ >
342
+ <div
343
+ class="MuiInputBase-root-167 MuiInput-root-154 MuiInput-underline-158 MuiInputBase-formControl-168 MuiInput-formControl-155"
344
+ >
345
+ <input
346
+ aria-invalid="false"
347
+ class="MuiInputBase-input-177 MuiInput-input-162 MuiInputBase-inputType-180 MuiInput-inputType-165"
348
+ type="number"
349
+ value=""
350
+ />
351
+ </div>
352
+ </div>
353
+ </div>
354
+ </div>
355
+ <div
356
+ class="MuiGrid-container-43"
240
357
  >
241
358
  <div
242
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81"
359
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83"
243
360
  />
244
361
  </div>
245
362
  <div
246
- class="MuiGrid-container-41 MuiGrid-justify-xs-flex-end-59"
363
+ class="MuiGrid-container-43 MuiGrid-justify-xs-flex-end-61"
247
364
  >
248
365
  <div
249
- class="MuiGrid-item-42 MuiGrid-grid-xs-12-81"
366
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83"
250
367
  >
251
368
  <button
252
- class="MuiButtonBase-root-225 MuiIconButton-root-219"
369
+ class="MuiButtonBase-root-227 MuiIconButton-root-221"
253
370
  id="remove"
254
371
  label="Remove"
255
372
  tabindex="0"
256
373
  type="button"
257
374
  >
258
375
  <span
259
- class="MuiIconButton-label-224"
376
+ class="MuiIconButton-label-226"
260
377
  >
261
378
  <svg
262
379
  aria-hidden="true"
263
- class="MuiSvgIcon-root-182"
380
+ class="MuiSvgIcon-root-184"
264
381
  focusable="false"
265
382
  role="presentation"
266
383
  viewBox="0 0 24 24"
@@ -1,12 +1,24 @@
1
+ import React from 'react';
1
2
  import { REDUCER_NAME } from '../Reducers/Actions';
3
+ import { connect } from 'react-redux';
4
+ import clsx from 'clsx';
5
+ import get from 'lodash/get';
2
6
  import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
3
7
  import Actions from '../Reducers/Actions';
4
- import {LocalizedPriceTextField} from "../../../Components/LocalizedPriceTextField";
5
- import LocalizedPriceValue from "../../../Components/LocalizedPriceValue";
6
- import React from "react";
8
+ import { T } from '../../../App/i18n';
9
+ import { LocalizedPriceTextField } from '../../../Components/LocalizedPriceTextField';
10
+ import LocalizedPriceValue from '../../../Components/LocalizedPriceValue';
11
+
7
12
  const { setFieldData, postData } = Actions;
8
13
 
9
14
  const formFields = [
15
+ {
16
+ name: 'calculationTypes',
17
+ type: 'hinttext',
18
+ renderHintText: v => {
19
+ return v.length === 0 ? T('detailViewHint') : '';
20
+ },
21
+ },
10
22
  {
11
23
  name: 'calculationTypes',
12
24
  label: 'calculationType',
@@ -53,13 +65,13 @@ const formFields = [
53
65
  name: 'price',
54
66
  label: 'Price',
55
67
  type: LocalizedPriceTextField,
56
- renderValue: value => <LocalizedPriceValue data={value}/>,
68
+ renderValue: value => <LocalizedPriceValue data={value} />,
57
69
  },
58
70
  {
59
71
  name: 'priceNet',
60
72
  label: 'Price Net',
61
73
  type: LocalizedPriceTextField,
62
- renderValue: value => <LocalizedPriceValue data={value}/>,
74
+ renderValue: value => <LocalizedPriceValue data={value} />,
63
75
  },
64
76
  {
65
77
  name: 'amountFrom',
@@ -75,4 +87,20 @@ const formFields = [
75
87
  },
76
88
  ];
77
89
 
78
- export default generateConnectedEdit(formFields, REDUCER_NAME, setFieldData, postData);
90
+ const BaseForm = generateConnectedEdit(formFields, REDUCER_NAME, setFieldData, postData);
91
+
92
+ const ConnectedEditForm = ({ calculationTypes }) => {
93
+ return (
94
+ <div className={clsx(calculationTypes.length === 0 && 'hideSave')}>
95
+ <BaseForm />
96
+ </div>
97
+ );
98
+ };
99
+
100
+ const mapStateToProps = state => {
101
+ return {
102
+ calculationTypes: get(state[REDUCER_NAME], 'data.calculationTypes.value'),
103
+ };
104
+ };
105
+
106
+ export default connect(mapStateToProps, null)(ConnectedEditForm);
@@ -1,6 +1,6 @@
1
1
  export const LIST_KEY = 'designerglobalitemprices';
2
2
  export const DESIGNER_LIST_URL = 'designerglobalitemprices';
3
- export const LIST_URL = 'items';
3
+ export const LIST_URL = 'items/designer';
4
4
  export const DATA_KEY = 'designerglobalitemprice';
5
5
  export const REDUCER_NAME = 'designerglobalitempricesData';
6
6
 
@@ -6,6 +6,7 @@ import './Translations';
6
6
  import '../Item/Translations';
7
7
 
8
8
  import { generateConnectedSplitScreen } from '../../Components/DefaultConnectedScreen';
9
+ import { T } from '../../App/i18n';
9
10
 
10
11
  export default generateConnectedSplitScreen(
11
12
  'designer_global_item_prices',
@@ -14,5 +15,6 @@ export default generateConnectedSplitScreen(
14
15
  REDUCER_NAME,
15
16
  Actions.invalidateList,
16
17
  Actions.triggerUnsavedEntity,
17
- Actions.hideDetails
18
+ Actions.hideDetails,
19
+ T('listHint')
18
20
  );
@@ -7,6 +7,10 @@ require('../../App/i18n').use(
7
7
  addButtonLabel: 'Add Price',
8
8
  },
9
9
  },
10
+ listHint:
11
+ 'Here prices are maintained that are multiplied by the number of products, such as individual packaging. See designer > Core data > Global calculation types > Multiply by item amount.',
12
+ detailViewHint:
13
+ 'There is no global calculation type maintained that is multiplied by the item amount. No price maintenance is therefore necessary here. See designer > Coredata> Global costing items > Multiply by item amount.',
10
14
  },
11
15
  de: {
12
16
  designer_global_item_prices: 'Designer Produktpreise',
@@ -15,6 +19,10 @@ require('../../App/i18n').use(
15
19
  addButtonLabel: 'Preis hinzufügen',
16
20
  },
17
21
  },
22
+ listHint:
23
+ 'An dieser Stelle werden Preise gepflegt, die mit der Produktanzahl multipliziert werden, etwa Einzelverpackungen. Siehe designer > Stammmdaten > Globale Kalkulationsposten > Mit Produktanzahl multiplizieren.',
24
+ detailViewHint:
25
+ 'Es ist kein globaler Kalkulationsposten gepflegt, der mit der Produktanzahl multipliziert wird. Somit ist hier keine Preispflege notwendig. Siehe designer > Stammmdaten > Globale Kalkulationsposten > Mit Produktanzahl multiplizieren.',
18
26
  },
19
27
  },
20
28
  true