@licklist/design 0.71.18-dev.5 → 0.71.18-dev.7
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/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +15 -7
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +18 -10
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +1 -1
- package/dist/iframe/ProductWithModifierModal/utils.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/utils.js +3 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +9 -23
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts +2 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.js +3 -3
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +10 -3
- package/dist/styles/date-time-button/DateTimeButton.scss +7 -0
- package/dist/styles/events/EditEventModal.scss +2 -0
- package/dist/styles/product-set/EditProductSetElement.scss +1 -0
- package/dist/styles/product-set/ProductSetForm.scss +1 -0
- package/package.json +3 -3
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +13 -6
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +1 -1
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +20 -9
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +1 -1
- package/src/iframe/ProductWithModifierModal/utils.ts +3 -2
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +10 -21
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +1 -2
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -1
- package/src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx +4 -2
- package/src/product-set/form/ProductsControl.tsx +13 -4
- package/src/styles/date-time-button/DateTimeButton.scss +7 -0
- package/src/styles/events/EditEventModal.scss +2 -0
- package/src/styles/product-set/EditProductSetElement.scss +1 -0
- package/src/styles/product-set/ProductSetForm.scss +1 -0
- package/yarn.lock +166 -138
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductWithModifierSetForm.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductWithModifierSetForm.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAA;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAA;AAI7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,qGAAqG,CAAA;AAKnI,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,QAAQ,EAAE,CAAA;CAClB;AAED,UAAU,+BAA+B;IACvC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;IAC1C,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAA;CAC3C;AAkBD,eAAO,MAAM,0BAA0B,wDAKpC,+BAA+B,4CA8JjC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { useForm, FormProvider, Controller } from 'react-hook-form';
|
|
3
4
|
import { Form, Button } from 'react-bootstrap';
|
|
4
5
|
import { isEmpty, uniqBy } from 'lodash';
|
|
@@ -6,7 +7,6 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
7
|
import { useIntl } from 'react-intl';
|
|
7
8
|
import { Currency } from '@licklist/core/dist/Config';
|
|
8
9
|
import 'recharts';
|
|
9
|
-
import 'react';
|
|
10
10
|
import 'react-loader';
|
|
11
11
|
import '@licklist/plugins/dist/hooks/Media/useWindowDimensions';
|
|
12
12
|
import clsx from 'clsx';
|
|
@@ -176,6 +176,14 @@ var ProductWithModifierSetForm = function(param) {
|
|
|
176
176
|
onChange(value);
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
+
var disabledAddButton = useMemo(function() {
|
|
180
|
+
if (defaultProductQuantity) return false;
|
|
181
|
+
return !productQuantity || !isEmpty(errors);
|
|
182
|
+
}, [
|
|
183
|
+
defaultProductQuantity,
|
|
184
|
+
productQuantity,
|
|
185
|
+
errors
|
|
186
|
+
]);
|
|
179
187
|
var modifierPrice = getOrderProductModifiersPrice(orderModifierSets[0]);
|
|
180
188
|
var productWithModifierPrice = (product.price * productQuantity || 0) + modifierPrice;
|
|
181
189
|
var formatNumber = useIntl().formatNumber;
|
|
@@ -204,14 +212,14 @@ var ProductWithModifierSetForm = function(param) {
|
|
|
204
212
|
min: {
|
|
205
213
|
value: 1,
|
|
206
214
|
message: t('Validation:fieldMinNumber', {
|
|
207
|
-
attribute: t('
|
|
215
|
+
attribute: t('product'),
|
|
208
216
|
min: 1
|
|
209
217
|
})
|
|
210
218
|
},
|
|
211
219
|
max: {
|
|
212
220
|
value: !product.isUnlimited ? product.maxQuantity : MAX_PRODUCT_NUMBER,
|
|
213
221
|
message: t('Validation:fieldMaxNumber', {
|
|
214
|
-
attribute: t('
|
|
222
|
+
attribute: t('product'),
|
|
215
223
|
max: product.maxQuantity
|
|
216
224
|
})
|
|
217
225
|
}
|
|
@@ -243,10 +251,10 @@ var ProductWithModifierSetForm = function(param) {
|
|
|
243
251
|
})
|
|
244
252
|
}),
|
|
245
253
|
/*#__PURE__*/ jsxs("div", {
|
|
246
|
-
className: " d-flex justify-content-center",
|
|
254
|
+
className: " d-flex flex-column align-items-center justify-content-center",
|
|
247
255
|
children: [
|
|
248
256
|
/*#__PURE__*/ jsx("div", {
|
|
249
|
-
className: "price pl-5",
|
|
257
|
+
className: "modifier-price pb-4 pl-5",
|
|
250
258
|
children: formatToCurrency(product.price)
|
|
251
259
|
}),
|
|
252
260
|
(error === null || error === void 0 ? void 0 : error.message) && /*#__PURE__*/ jsx("div", {
|
|
@@ -266,9 +274,9 @@ var ProductWithModifierSetForm = function(param) {
|
|
|
266
274
|
as: "button",
|
|
267
275
|
variant: "primary",
|
|
268
276
|
className: "w-100",
|
|
269
|
-
disabled:
|
|
277
|
+
disabled: disabledAddButton,
|
|
270
278
|
onClick: onSubmit,
|
|
271
|
-
children: "".concat(t('
|
|
279
|
+
children: "".concat(t('Design:add')).concat(modifierPrice ? " (".concat(formatToCurrency(productWithModifierPrice), ")") : '')
|
|
272
280
|
})
|
|
273
281
|
]
|
|
274
282
|
})
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js
CHANGED
|
@@ -64,7 +64,7 @@ var ProductWithModifierSetModal = function(param) {
|
|
|
64
64
|
children: /*#__PURE__*/ jsx(TicketDescription, {
|
|
65
65
|
title: product.name,
|
|
66
66
|
description: product.description,
|
|
67
|
-
className: clsx('iframe-event__product-description'),
|
|
67
|
+
className: clsx('iframe-event__product-description', !product.images && 'mt-4'),
|
|
68
68
|
classNameProductModal: "d-block",
|
|
69
69
|
images: product.images,
|
|
70
70
|
isRequired: product.isRequired,
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModifierSetControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAY1F,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,wBAAwB,CAAC,EAAE,aAAa,EAAE,CAAA;CAC3C;AAED,eAAO,MAAM,mBAAmB,4FAO7B,yBAAyB,
|
|
1
|
+
{"version":3,"file":"ModifierSetControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAY1F,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,wBAAwB,CAAC,EAAE,aAAa,EAAE,CAAA;CAC3C;AAED,eAAO,MAAM,mBAAmB,4FAO7B,yBAAyB,4CAiV3B,CAAA"}
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js
CHANGED
|
@@ -62,9 +62,11 @@ import '@tanstack/react-table';
|
|
|
62
62
|
|
|
63
63
|
var ModifiersSetControl = function(param) {
|
|
64
64
|
var modifierSet = param.modifierSet, modifiers = param.modifiers, productId = param.productId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_isEditMode = param.isEditMode, isEditMode = _param_isEditMode === void 0 ? false : _param_isEditMode, orderProductModifierSets = param.orderProductModifierSets;
|
|
65
|
+
var _currentOrderModifiersSets_find;
|
|
65
66
|
var _useFormContext = useFormContext(), control = _useFormContext.control, watch = _useFormContext.watch, setValue = _useFormContext.setValue, trigger = _useFormContext.trigger;
|
|
66
67
|
var t = useTranslation('App').t;
|
|
67
68
|
var orderModifiersSets = watch("".concat(productId, ".orderProductModifiers"));
|
|
69
|
+
console.log(orderModifiersSets, 'orderModifiersSets');
|
|
68
70
|
var formatNumber = useIntl().formatNumber;
|
|
69
71
|
var formatToCurrency = function(value) {
|
|
70
72
|
return formatNumber(value, {
|
|
@@ -89,6 +91,7 @@ var ModifiersSetControl = function(param) {
|
|
|
89
91
|
var checkSelectedModifier = (orderModifiersSets === null || orderModifiersSets === void 0 ? void 0 : (_orderModifiersSets_find = orderModifiersSets.find(function(modifier) {
|
|
90
92
|
return (modifier === null || modifier === void 0 ? void 0 : modifier.modifierId) === (selectedModifier === null || selectedModifier === void 0 ? void 0 : selectedModifier.id);
|
|
91
93
|
})) === null || _orderModifiersSets_find === void 0 ? void 0 : _orderModifiersSets_find.quantity) === 1;
|
|
94
|
+
console.log(orderModifiersSets, 'orderModifiersSets -1');
|
|
92
95
|
if (selectedModifier && type === 'radio') {
|
|
93
96
|
modifiers.forEach(function(modifier) {
|
|
94
97
|
var isSelected = modifier.id === selectedModifier.id;
|
|
@@ -100,7 +103,8 @@ var ModifiersSetControl = function(param) {
|
|
|
100
103
|
quantity: isSelected ? 1 : 0,
|
|
101
104
|
modifierSetId: modifierSet.id
|
|
102
105
|
};
|
|
103
|
-
|
|
106
|
+
console.log(orderModifiers, 'orderModifiers');
|
|
107
|
+
setValue("".concat(productId, ".orderProductModifiers.").concat(modifierSet.id, ".").concat(orderModifiers.modifierId), orderModifiers);
|
|
104
108
|
});
|
|
105
109
|
}
|
|
106
110
|
if (selectedModifier && type === 'checkbox') {
|
|
@@ -135,14 +139,17 @@ var ModifiersSetControl = function(param) {
|
|
|
135
139
|
}, [
|
|
136
140
|
isEditMode
|
|
137
141
|
]);
|
|
142
|
+
var radioButtonDefaultModifier = (_currentOrderModifiersSets_find = currentOrderModifiersSets.find(function(modifier) {
|
|
143
|
+
return modifierSet.modifiers.some(function(rl) {
|
|
144
|
+
return rl.id === modifier.modifierId;
|
|
145
|
+
});
|
|
146
|
+
})) === null || _currentOrderModifiersSets_find === void 0 ? void 0 : _currentOrderModifiersSets_find.modifierId.toString();
|
|
138
147
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
139
148
|
children: (modifierSet === null || modifierSet === void 0 ? void 0 : modifierSet.maxItems) === 1 && modifiers.every(function(modifier) {
|
|
140
149
|
return modifier.maxItems === 1;
|
|
141
|
-
})
|
|
142
|
-
return !!(modifier === null || modifier === void 0 ? void 0 : modifier.quantity);
|
|
143
|
-
})) ? /*#__PURE__*/ jsx(Fragment, {
|
|
150
|
+
}) ? /*#__PURE__*/ jsx(Fragment, {
|
|
144
151
|
children: /*#__PURE__*/ jsx(Controller, {
|
|
145
|
-
name: "".concat(productId, ".
|
|
152
|
+
name: "".concat(productId, ".modifier"),
|
|
146
153
|
control: control,
|
|
147
154
|
rules: {
|
|
148
155
|
required: {
|
|
@@ -172,7 +179,7 @@ var ModifiersSetControl = function(param) {
|
|
|
172
179
|
inline: true,
|
|
173
180
|
id: modifier.id.toString(),
|
|
174
181
|
defaultChecked: !!selectedOrderModifierId,
|
|
175
|
-
defaultValue: modifier.id.toString(),
|
|
182
|
+
defaultValue: selectedOrderModifierId || modifier.id.toString(),
|
|
176
183
|
checked: field.value === modifier.id.toString(),
|
|
177
184
|
onChange: onChange,
|
|
178
185
|
type: "radio",
|
|
@@ -186,7 +193,7 @@ var ModifiersSetControl = function(param) {
|
|
|
186
193
|
children: modifier.description
|
|
187
194
|
}),
|
|
188
195
|
/*#__PURE__*/ jsxs("div", {
|
|
189
|
-
className: "price",
|
|
196
|
+
className: "modifier-price",
|
|
190
197
|
children: [
|
|
191
198
|
"+ ",
|
|
192
199
|
formatToCurrency(modifier.price)
|
|
@@ -204,7 +211,8 @@ var ModifiersSetControl = function(param) {
|
|
|
204
211
|
})
|
|
205
212
|
]
|
|
206
213
|
});
|
|
207
|
-
}
|
|
214
|
+
},
|
|
215
|
+
defaultValue: radioButtonDefaultModifier
|
|
208
216
|
})
|
|
209
217
|
}) : /*#__PURE__*/ jsx(Fragment, {
|
|
210
218
|
children: modifiers === null || modifiers === void 0 ? void 0 : modifiers.map(function(modifier, index) {
|
|
@@ -264,7 +272,7 @@ var ModifiersSetControl = function(param) {
|
|
|
264
272
|
children: modifier.description
|
|
265
273
|
}),
|
|
266
274
|
/*#__PURE__*/ jsxs("div", {
|
|
267
|
-
className: "price",
|
|
275
|
+
className: "modifier-price",
|
|
268
276
|
children: [
|
|
269
277
|
"+ ",
|
|
270
278
|
formatToCurrency(modifier.price)
|
|
@@ -354,7 +362,7 @@ var ModifiersSetControl = function(param) {
|
|
|
354
362
|
children: modifier.description
|
|
355
363
|
}),
|
|
356
364
|
/*#__PURE__*/ jsxs("div", {
|
|
357
|
-
className: "pl-2 price",
|
|
365
|
+
className: "pl-2 modifier-price",
|
|
358
366
|
children: [
|
|
359
367
|
"+ ",
|
|
360
368
|
formatToCurrency(modifier.price)
|
|
@@ -11,7 +11,7 @@ var ProductControl = function(param) {
|
|
|
11
11
|
.t;
|
|
12
12
|
var _useFormContext = useFormContext(), control = _useFormContext.control, watch = _useFormContext.watch, isValid = _useFormContext.formState.isValid, clearErrors = _useFormContext.clearErrors;
|
|
13
13
|
var modifiersSet = (product === null || product === void 0 ? void 0 : product.modifiersSet) || [];
|
|
14
|
-
var orderModifiersSets = watch("".concat(product.id, ".
|
|
14
|
+
var orderModifiersSets = watch("".concat(product.id, ".orderProductModifier"));
|
|
15
15
|
useEffect(function() {
|
|
16
16
|
if (!isValid) return;
|
|
17
17
|
clearErrors();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/iframe/ProductWithModifierModal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAG5F,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAA;AAElE,eAAO,MAAM,yBAAyB,iBACpB,aAAa,EAAE,KAC5B,aAAa,EAUf,CAAA;AAED,eAAO,MAAM,6BAA6B,uBACpB,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/iframe/ProductWithModifierModal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAG5F,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAA;AAElE,eAAO,MAAM,yBAAyB,iBACpB,aAAa,EAAE,KAC5B,aAAa,EAUf,CAAA;AAED,eAAO,MAAM,6BAA6B,uBACpB,aAAa,EAAE,6BAQpC,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { uniqBy } from 'lodash';
|
|
2
2
|
|
|
3
3
|
var filteredOrderModifierSets = function(modifiersSet) {
|
|
4
|
+
var _modifiersSet_flat;
|
|
4
5
|
if (!modifiersSet) return [];
|
|
5
|
-
var orderModifier = modifiersSet.flat().filter(function(modifier) {
|
|
6
|
+
var orderModifier = modifiersSet === null || modifiersSet === void 0 ? void 0 : (_modifiersSet_flat = modifiersSet.flat()) === null || _modifiersSet_flat === void 0 ? void 0 : _modifiersSet_flat.filter(function(modifier) {
|
|
6
7
|
return !!(modifier === null || modifier === void 0 ? void 0 : modifier.quantity);
|
|
7
8
|
});
|
|
8
9
|
return uniqBy(orderModifier, function(item) {
|
|
@@ -10,6 +11,7 @@ var filteredOrderModifierSets = function(modifiersSet) {
|
|
|
10
11
|
});
|
|
11
12
|
};
|
|
12
13
|
var orderProductModifiersQuantity = function(orderModifiersSets, modifierSet) {
|
|
14
|
+
if (!(orderModifiersSets === null || orderModifiersSets === void 0 ? void 0 : orderModifiersSets.length)) return 0;
|
|
13
15
|
var filteredOrderModifier = filteredOrderModifierSets(orderModifiersSets);
|
|
14
16
|
return filteredOrderModifier.filter(function(item) {
|
|
15
17
|
return (item === null || item === void 0 ? void 0 : item.modifierSetId) === modifierSet.id;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAIlF,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,SAAS,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,cAAc,kDAIxB,mBAAmB,4CA6CrB,CAAA"}
|
|
@@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
import * as Config from '@licklist/core/dist/Config';
|
|
5
5
|
import { calculateTotalModifiersPrice } from '../../utils/index.js';
|
|
6
|
+
import { ProductWithModifier } from '../../../CategoryProduct/components/ProductWithModifier/ProductWithModifier.js';
|
|
6
7
|
|
|
7
8
|
var ProductSummary = function(param) {
|
|
8
9
|
var name = param.name, productQuantityError = param.productQuantityError, orderProduct = param.orderProduct;
|
|
@@ -15,15 +16,6 @@ var ProductSummary = function(param) {
|
|
|
15
16
|
style: 'currency',
|
|
16
17
|
currency: Config.Currency.GBP
|
|
17
18
|
});
|
|
18
|
-
var modifiersName = "".concat((_orderProduct_orderModifiersSets = orderProduct.orderModifiersSets) === null || _orderProduct_orderModifiersSets === void 0 ? void 0 : _orderProduct_orderModifiersSets.map(function(modifierProduct) {
|
|
19
|
-
return modifierProduct === null || modifierProduct === void 0 ? void 0 : modifierProduct.modifiers.map(function(item) {
|
|
20
|
-
return (item === null || item === void 0 ? void 0 : item.quantity) > 1 ? "".concat(item === null || item === void 0 ? void 0 : item.quantity, "x - ").concat(item === null || item === void 0 ? void 0 : item.name) : item === null || item === void 0 ? void 0 : item.name;
|
|
21
|
-
}).join(', ');
|
|
22
|
-
}).join(', '));
|
|
23
|
-
var fullModifiersPrice = formatNumber(modifierSetsPrice, {
|
|
24
|
-
style: 'currency',
|
|
25
|
-
currency: Config.Currency.GBP
|
|
26
|
-
});
|
|
27
19
|
return /*#__PURE__*/ jsxs("div", {
|
|
28
20
|
className: "product",
|
|
29
21
|
children: [
|
|
@@ -48,20 +40,14 @@ var ProductSummary = function(param) {
|
|
|
48
40
|
})
|
|
49
41
|
]
|
|
50
42
|
}),
|
|
51
|
-
|
|
52
|
-
children:
|
|
53
|
-
/*#__PURE__*/ jsx(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
children: /*#__PURE__*/ jsx("p", {
|
|
60
|
-
className: "price",
|
|
61
|
-
children: fullModifiersPrice
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
]
|
|
43
|
+
!!(orderProduct === null || orderProduct === void 0 ? void 0 : (_orderProduct_orderModifiersSets = orderProduct.orderModifiersSets) === null || _orderProduct_orderModifiersSets === void 0 ? void 0 : _orderProduct_orderModifiersSets.length) && /*#__PURE__*/ jsx(Fragment, {
|
|
44
|
+
children: orderProduct.orderModifiersSets.map(function(modifier, index) {
|
|
45
|
+
return /*#__PURE__*/ jsx(ProductWithModifier, {
|
|
46
|
+
modifier: modifier,
|
|
47
|
+
modifierKey: index,
|
|
48
|
+
isSummary: true
|
|
49
|
+
}, modifier.productQuantity.toString());
|
|
50
|
+
})
|
|
65
51
|
}),
|
|
66
52
|
productQuantityError && /*#__PURE__*/ jsx("p", {
|
|
67
53
|
className: "iframe-event__message-error",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACvB,MAAM,8DAA8D,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAElF,eAAO,MAAM,sBAAsB,mCAGhC;IACD,aAAa,CAAC,EAAE,SAAS,EAAE,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACvB,MAAM,8DAA8D,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAElF,eAAO,MAAM,sBAAsB,mCAGhC;IACD,aAAa,CAAC,EAAE,SAAS,EAAE,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,WAkBA,CAAA;AAED,eAAO,MAAM,eAAe,aAChB,sBAAsB,mBACf,OAAO,WAMzB,CAAA;AAED,eAAO,MAAM,4BAA4B,uBACnB,sBAAsB,EAAE,WAUO,CAAA;AAErD,eAAO,MAAM,6BAA6B,wBACnB,sBAAsB,WAU5C,CAAA;AAED,eAAO,MAAM,eAAe,uBACN,wBAAwB,EAAE,aACnC,SAAS,CAAC,IAAI,CAAC,KACzB,MAAM,GAAG,SAGA,CAAA"}
|
|
@@ -12,7 +12,7 @@ var cartSumByOrderProducts = function(param) {
|
|
|
12
12
|
};
|
|
13
13
|
var getModifierName = function(modifier, isManualBooking) {
|
|
14
14
|
var modifierName = function(orderModifier) {
|
|
15
|
-
return
|
|
15
|
+
return isManualBooking ? orderModifier.modifier.name : orderModifier === null || orderModifier === void 0 ? void 0 : orderModifier.name;
|
|
16
16
|
};
|
|
17
17
|
return "".concat(modifier.modifiers.map(function(item) {
|
|
18
18
|
return (item === null || item === void 0 ? void 0 : item.quantity) > 1 ? "".concat(item === null || item === void 0 ? void 0 : item.quantity, "x - ").concat(modifierName(item)) : modifierName(item);
|
|
@@ -14,9 +14,10 @@ interface ProductQuantityInputProps {
|
|
|
14
14
|
modifier: OrderModifierByProduct;
|
|
15
15
|
modifierKey: number;
|
|
16
16
|
isManualBooking?: boolean;
|
|
17
|
+
isSummary?: boolean;
|
|
17
18
|
deleteOrderModifier?: (order: number) => void;
|
|
18
19
|
editOrderModifierSet?: (order: number) => void;
|
|
19
20
|
}
|
|
20
|
-
export declare const ProductWithModifier: ({ modifier, modifierKey, isManualBooking, deleteOrderModifier, editOrderModifierSet, }: ProductQuantityInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const ProductWithModifier: ({ modifier, modifierKey, isManualBooking, isSummary, deleteOrderModifier, editOrderModifierSet, }: ProductQuantityInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export {};
|
|
22
23
|
//# sourceMappingURL=ProductWithModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductWithModifier.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAMrG,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAA;CACrD;AAED,UAAU,yBAAyB;IACjC,QAAQ,EAAE,sBAAsB,CAAA;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/C;AAED,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ProductWithModifier.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAMrG,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAA;CACrD;AAED,UAAU,yBAAyB;IACjC,QAAQ,EAAE,sBAAsB,CAAA;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/C;AAED,eAAO,MAAM,mBAAmB,sGAO7B,yBAAyB,4CA8C3B,CAAA"}
|
|
@@ -7,7 +7,7 @@ import { useIntl } from 'react-intl';
|
|
|
7
7
|
import { getModifierName, getOrderProductModifiersPrice } from '../../../BookingSummary/utils/index.js';
|
|
8
8
|
|
|
9
9
|
var ProductWithModifier = function(param) {
|
|
10
|
-
var modifier = param.modifier, modifierKey = param.modifierKey, _param_isManualBooking = param.isManualBooking, isManualBooking = _param_isManualBooking === void 0 ? false : _param_isManualBooking, deleteOrderModifier = param.deleteOrderModifier, editOrderModifierSet = param.editOrderModifierSet;
|
|
10
|
+
var modifier = param.modifier, modifierKey = param.modifierKey, _param_isManualBooking = param.isManualBooking, isManualBooking = _param_isManualBooking === void 0 ? false : _param_isManualBooking, _param_isSummary = param.isSummary, isSummary = _param_isSummary === void 0 ? false : _param_isSummary, deleteOrderModifier = param.deleteOrderModifier, editOrderModifierSet = param.editOrderModifierSet;
|
|
11
11
|
var t = useTranslation('Design').t;
|
|
12
12
|
var formatNumber = useIntl().formatNumber;
|
|
13
13
|
var modifierName = getModifierName(modifier, isManualBooking);
|
|
@@ -24,7 +24,7 @@ var ProductWithModifier = function(param) {
|
|
|
24
24
|
className: "d-flex",
|
|
25
25
|
children: [
|
|
26
26
|
/*#__PURE__*/ jsx("p", {
|
|
27
|
-
className: "font-weight-bold pr-4",
|
|
27
|
+
className: "font-weight-bold w-25 pr-4",
|
|
28
28
|
children: "".concat(orderModifierDescription, " x")
|
|
29
29
|
}),
|
|
30
30
|
/*#__PURE__*/ jsx("p", {
|
|
@@ -32,7 +32,7 @@ var ProductWithModifier = function(param) {
|
|
|
32
32
|
})
|
|
33
33
|
]
|
|
34
34
|
}),
|
|
35
|
-
isManualBooking ? /*#__PURE__*/ jsx("p", {
|
|
35
|
+
isManualBooking || isSummary ? /*#__PURE__*/ jsx("p", {
|
|
36
36
|
className: "price",
|
|
37
37
|
children: fullModifiersPrice
|
|
38
38
|
}) : /*#__PURE__*/ jsxs("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductsControl.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAA;AAC/F,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAI9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAQhD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AA+BD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductsControl.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAA;AAC/F,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAI9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAQhD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AA+BD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,2CAkPtB"}
|
|
@@ -168,6 +168,12 @@ function ProductsControl(param) {
|
|
|
168
168
|
return "".concat(productControlFieldName, ".").concat(index, ".isUnlimited");
|
|
169
169
|
}))
|
|
170
170
|
});
|
|
171
|
+
var modifierSets = useWatch({
|
|
172
|
+
control: control,
|
|
173
|
+
name: _to_consumable_array(fields.map(function(_, index) {
|
|
174
|
+
return "".concat(productControlFieldName, ".").concat(index, ".modifiersSet");
|
|
175
|
+
}))
|
|
176
|
+
});
|
|
171
177
|
var categoryProductErrors = errors === null || errors === void 0 ? void 0 : (_errors_steps = errors.steps) === null || _errors_steps === void 0 ? void 0 : (_errors_steps_stepIndex = _errors_steps[stepIndex]) === null || _errors_steps_stepIndex === void 0 ? void 0 : (_errors_steps_stepIndex_productCategories = _errors_steps_stepIndex.productCategories) === null || _errors_steps_stepIndex_productCategories === void 0 ? void 0 : (_errors_steps_stepIndex_productCategories_productCategoryIndex = _errors_steps_stepIndex_productCategories[productCategoryIndex]) === null || _errors_steps_stepIndex_productCategories_productCategoryIndex === void 0 ? void 0 : _errors_steps_stepIndex_productCategories_productCategoryIndex.products;
|
|
172
178
|
var isFirstProductAdded = fields.length === 1;
|
|
173
179
|
var mouseSensor = useSensor(MouseSensor, {
|
|
@@ -211,9 +217,10 @@ function ProductsControl(param) {
|
|
|
211
217
|
mouseSensor
|
|
212
218
|
],
|
|
213
219
|
children: fields.map(function(product, index) {
|
|
220
|
+
var _modifierSets_index;
|
|
214
221
|
var isOverridesProductSet = isEventEditProductSet ? !!product.id : isOverrides && !!product.originalProductId;
|
|
215
|
-
var modifierSets = (product === null || product === void 0 ? void 0 : product.modifiersSet.length) || 0;
|
|
216
222
|
var isNewProductOverrides = isCreateNewOverrides && !!product.id;
|
|
223
|
+
var modifiersSets = ((_modifierSets_index = modifierSets[index]) === null || _modifierSets_index === void 0 ? void 0 : _modifierSets_index.length) || 0;
|
|
217
224
|
return /*#__PURE__*/ jsx(Controller, {
|
|
218
225
|
control: control,
|
|
219
226
|
name: "".concat(productControlFieldName, ".").concat(index, ".name"),
|
|
@@ -256,9 +263,9 @@ function ProductsControl(param) {
|
|
|
256
263
|
})
|
|
257
264
|
]
|
|
258
265
|
}),
|
|
259
|
-
!!
|
|
266
|
+
!!modifiersSets && /*#__PURE__*/ jsx(Badge, {
|
|
260
267
|
className: "modifier-badge",
|
|
261
|
-
children: "".concat(
|
|
268
|
+
children: "".concat(modifiersSets, " ").concat(t('modifiersSets'))
|
|
262
269
|
})
|
|
263
270
|
]
|
|
264
271
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.71.18-dev.
|
|
3
|
+
"version": "0.71.18-dev.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.31.2-dev.
|
|
45
|
+
"@licklist/core": "0.31.2-dev.11",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
47
|
"@licklist/plugins": "0.35.1-dev.8",
|
|
48
48
|
"lodash": "4.17.21",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@dnd-kit/utilities": "2.0.0",
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
|
-
"@licklist/core": "0.31.2-dev.
|
|
64
|
+
"@licklist/core": "0.31.2-dev.11",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
66
|
"@licklist/plugins": "0.35.1-dev.8",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useMemo } from 'react'
|
|
1
2
|
import { Controller, FormProvider, useForm } from 'react-hook-form'
|
|
2
3
|
import { Button, Form } from 'react-bootstrap'
|
|
3
4
|
import { isEmpty, uniqBy } from 'lodash'
|
|
@@ -16,6 +17,7 @@ import { FormOrderItem } from '../../order-process/components/CategoryProduct/co
|
|
|
16
17
|
import { getOrderProductModifiersPrice } from '../../order-process/components/BookingSummary/utils'
|
|
17
18
|
import { ProductControl } from './controll/ProductControll'
|
|
18
19
|
|
|
20
|
+
|
|
19
21
|
export interface ManualBookingFormValues {
|
|
20
22
|
steps: MenuStep[]
|
|
21
23
|
}
|
|
@@ -111,6 +113,11 @@ export const ProductWithModifierSetForm = ({
|
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
|
|
116
|
+
const disabledAddButton = useMemo(() => {
|
|
117
|
+
if (defaultProductQuantity) return false
|
|
118
|
+
return !productQuantity || !isEmpty(errors)
|
|
119
|
+
}, [defaultProductQuantity, productQuantity, errors])
|
|
120
|
+
|
|
114
121
|
const modifierPrice = getOrderProductModifiersPrice(orderModifierSets[0])
|
|
115
122
|
const productWithModifierPrice =
|
|
116
123
|
(product.price * productQuantity || 0) + modifierPrice
|
|
@@ -134,7 +141,7 @@ export const ProductWithModifierSetForm = ({
|
|
|
134
141
|
min: {
|
|
135
142
|
value: 1,
|
|
136
143
|
message: t('Validation:fieldMinNumber', {
|
|
137
|
-
attribute: t('
|
|
144
|
+
attribute: t('product'),
|
|
138
145
|
min: 1,
|
|
139
146
|
}) as string,
|
|
140
147
|
},
|
|
@@ -143,7 +150,7 @@ export const ProductWithModifierSetForm = ({
|
|
|
143
150
|
? product.maxQuantity
|
|
144
151
|
: MAX_PRODUCT_NUMBER,
|
|
145
152
|
message: t('Validation:fieldMaxNumber', {
|
|
146
|
-
attribute: t('
|
|
153
|
+
attribute: t('product'),
|
|
147
154
|
max: product.maxQuantity,
|
|
148
155
|
}) as string,
|
|
149
156
|
},
|
|
@@ -173,8 +180,8 @@ export const ProductWithModifierSetForm = ({
|
|
|
173
180
|
isLoading={isSubmitting}
|
|
174
181
|
/>
|
|
175
182
|
</div>
|
|
176
|
-
<div className=' d-flex justify-content-center'>
|
|
177
|
-
<div className='price pl-5'>
|
|
183
|
+
<div className=' d-flex flex-column align-items-center justify-content-center'>
|
|
184
|
+
<div className='modifier-price pb-4 pl-5'>
|
|
178
185
|
{formatToCurrency(product.price)}
|
|
179
186
|
</div>
|
|
180
187
|
{error?.message && (
|
|
@@ -192,10 +199,10 @@ export const ProductWithModifierSetForm = ({
|
|
|
192
199
|
as='button'
|
|
193
200
|
variant='primary'
|
|
194
201
|
className='w-100'
|
|
195
|
-
disabled={
|
|
202
|
+
disabled={disabledAddButton}
|
|
196
203
|
onClick={onSubmit}
|
|
197
204
|
>
|
|
198
|
-
{`${t('
|
|
205
|
+
{`${t('Design:add')}${modifierPrice ? ` (${formatToCurrency(productWithModifierPrice)})` : ''}`}
|
|
199
206
|
</Button>
|
|
200
207
|
</div>
|
|
201
208
|
</div>
|
package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx
CHANGED
|
@@ -53,7 +53,7 @@ export const ProductWithModifierSetModal = ({
|
|
|
53
53
|
<TicketDescription
|
|
54
54
|
title={product.name}
|
|
55
55
|
description={product.description}
|
|
56
|
-
className={clsx('iframe-event__product-description')}
|
|
56
|
+
className={clsx('iframe-event__product-description', !product.images && 'mt-4')}
|
|
57
57
|
classNameProductModal='d-block'
|
|
58
58
|
images={product.images}
|
|
59
59
|
isRequired={product.isRequired}
|