@licklist/design 0.71.18-dev.10 → 0.71.18-dev.12
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/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +2 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts +5 -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 +4 -4
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -0
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +4 -1
- package/package.json +3 -3
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -0
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +12 -5
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -0
- package/src/iframe/payment/payment-page/PaymentPage.tsx +8 -10
- package/yarn.lock +18 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BookingSummaryProps } from './types';
|
|
2
2
|
export declare const BookingSummary: {
|
|
3
|
-
({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, transactionFee, productsWithErrors, isLoading, hasPeopleInput, peopleAmount, footer, headerComponent, isPaymentPage, }: Omit<BookingSummaryProps, "totallWithDiscount">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, headerTitle, transactionFee, productsWithErrors, isLoading, hasPeopleInput, peopleAmount, footer, headerComponent, isPaymentPage, }: Omit<BookingSummaryProps, "totallWithDiscount">): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
SummaryTotal: ({ formValues, totalWithDiscount, transactionFee, isFreePayment, }: Pick<BookingSummaryProps, "formValues" | "totalWithDiscount" | "transactionFee" | "isFreePayment">) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
Accordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, isPaymentPage, headerComponent, }: import("./components/BookingSummaryAccordion").BookingSummaryAccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAM7C,eAAO,MAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAM7C,eAAO,MAAM,cAAc;kNAiBxB,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;;;CAiFjD,CAAA"}
|
|
@@ -12,7 +12,7 @@ import { ReactComponent as SvgCalendar } from '../../../../assets/iframe/calenda
|
|
|
12
12
|
import { LoaderIndicator } from '../../../../static/loader/LoaderIndicator.js';
|
|
13
13
|
|
|
14
14
|
var BookingSummary = function(param) {
|
|
15
|
-
var date = param.date, time = param.time, menuSteps = param.menuSteps, _param_formValues = param.formValues, formValues = _param_formValues === void 0 ? {} : _param_formValues, shouldHidePeopleAmount = param.shouldHidePeopleAmount, eventName = param.eventName, _param_transactionFee = param.transactionFee, transactionFee = _param_transactionFee === void 0 ? 0 : _param_transactionFee, _param_productsWithErrors = param.productsWithErrors, productsWithErrors = _param_productsWithErrors === void 0 ? [] : _param_productsWithErrors, isLoading = param.isLoading, hasPeopleInput = param.hasPeopleInput, peopleAmount = param.peopleAmount, footer = param.footer, headerComponent = param.headerComponent, // TODO Remove this, when all iframe pages will be ready
|
|
15
|
+
var date = param.date, time = param.time, menuSteps = param.menuSteps, _param_formValues = param.formValues, formValues = _param_formValues === void 0 ? {} : _param_formValues, shouldHidePeopleAmount = param.shouldHidePeopleAmount, eventName = param.eventName, headerTitle = param.headerTitle, _param_transactionFee = param.transactionFee, transactionFee = _param_transactionFee === void 0 ? 0 : _param_transactionFee, _param_productsWithErrors = param.productsWithErrors, productsWithErrors = _param_productsWithErrors === void 0 ? [] : _param_productsWithErrors, isLoading = param.isLoading, hasPeopleInput = param.hasPeopleInput, peopleAmount = param.peopleAmount, footer = param.footer, headerComponent = param.headerComponent, // TODO Remove this, when all iframe pages will be ready
|
|
16
16
|
isPaymentPage = param.isPaymentPage;
|
|
17
17
|
var _values;
|
|
18
18
|
var t = useTranslation('Design').t;
|
|
@@ -30,6 +30,7 @@ var BookingSummary = function(param) {
|
|
|
30
30
|
children: /*#__PURE__*/ jsxs(BookingSummaryAccordion, {
|
|
31
31
|
isPaymentPage: isPaymentPage,
|
|
32
32
|
hasPeopleInput: hasPeopleInput,
|
|
33
|
+
title: headerTitle,
|
|
33
34
|
headerComponent: headerComponent,
|
|
34
35
|
children: [
|
|
35
36
|
/*#__PURE__*/ jsx("div", {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { OrderItem } from '@licklist/plugins/dist/types/context/Iframe/orderItems';
|
|
2
|
+
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct';
|
|
3
|
+
interface IOrderProduct extends OrderItem {
|
|
4
|
+
orderProductModifiers?: OrderModifierByProduct[] | null;
|
|
5
|
+
}
|
|
2
6
|
type ProductSummaryProps = {
|
|
3
7
|
name?: string;
|
|
4
8
|
productQuantityError?: string;
|
|
5
|
-
orderProduct:
|
|
9
|
+
orderProduct: IOrderProduct;
|
|
6
10
|
};
|
|
7
11
|
export declare const ProductSummary: ({ name, productQuantityError, orderProduct, }: ProductSummaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
12
|
export {};
|
|
@@ -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;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,UAAU,aAAc,SAAQ,SAAS;IACvC,qBAAqB,CAAC,EAAG,sBAAsB,EAAE,GAAG,IAAI,CAAC;CAC1D;AAED,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,aAAa,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,cAAc,kDAIxB,mBAAmB,4CA8CrB,CAAA"}
|
|
@@ -7,11 +7,11 @@ import { ProductWithModifier } from '../../../CategoryProduct/components/Product
|
|
|
7
7
|
|
|
8
8
|
var ProductSummary = function(param) {
|
|
9
9
|
var name = param.name, productQuantityError = param.productQuantityError, orderProduct = param.orderProduct;
|
|
10
|
-
var _orderProduct_orderModifiersSets;
|
|
11
10
|
var t = useTranslation('Design').t;
|
|
12
11
|
var formatNumber = useIntl().formatNumber;
|
|
13
12
|
var priceForOneProduct = orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.price;
|
|
14
|
-
var
|
|
13
|
+
var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers);
|
|
14
|
+
var modifierSetsPrice = calculateTotalModifiersPrice(modifiersSets);
|
|
15
15
|
var fullPrice = formatNumber(priceForOneProduct * (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.quantity), {
|
|
16
16
|
style: 'currency',
|
|
17
17
|
currency: Config.Currency.GBP
|
|
@@ -40,8 +40,8 @@ var ProductSummary = function(param) {
|
|
|
40
40
|
})
|
|
41
41
|
]
|
|
42
42
|
}),
|
|
43
|
-
!!
|
|
44
|
-
children:
|
|
43
|
+
!!modifiersSets.length && /*#__PURE__*/ jsx(Fragment, {
|
|
44
|
+
children: modifiersSets.map(function(modifier, index) {
|
|
45
45
|
return /*#__PURE__*/ jsx(ProductWithModifier, {
|
|
46
46
|
modifier: modifier,
|
|
47
47
|
modifierKey: index,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,eAAO,MAAM,YAAY,MAAM,CAAA;AAC/B,eAAO,MAAM,aAAa,oBAAoB,CAAA;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,YAAY,CAAA;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,eAAO,MAAM,YAAY,MAAM,CAAA;AAC/B,eAAO,MAAM,aAAa,oBAAoB,CAAA;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,YAAY,CAAA;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAA;AAI9F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,
|
|
1
|
+
{"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAA;AAI9F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,4CA+Md,CAAA"}
|
|
@@ -189,6 +189,8 @@ var PaymentPage = function(_param) {
|
|
|
189
189
|
var isCalculatedAmountGreaterThanOrderAmount = !hasRemaingToPay && orderCartAmountByFormValues > (data === null || data === void 0 ? void 0 : data.amount);
|
|
190
190
|
var isPaymentLinkWithRemainingToPay = (data === null || data === void 0 ? void 0 : data.remaining_to_pay) && !!Number(data === null || data === void 0 ? void 0 : data.remaining_to_pay);
|
|
191
191
|
var totalPaidWithRemainingToPay = (data === null || data === void 0 ? void 0 : data.amount_to_pay) && !!Number(data === null || data === void 0 ? void 0 : data.amount_to_pay);
|
|
192
|
+
var _bookingSummaryProps_transactionFee;
|
|
193
|
+
var totalBooked = paymentMetadata ? paymentMetadata.paid ? paymentMetadata.total - paymentMetadata.paid : paymentMetadata.total : orderTotalAmountByFormValues + ((_bookingSummaryProps_transactionFee = bookingSummaryProps === null || bookingSummaryProps === void 0 ? void 0 : bookingSummaryProps.transactionFee) !== null && _bookingSummaryProps_transactionFee !== void 0 ? _bookingSummaryProps_transactionFee : 0);
|
|
192
194
|
return /*#__PURE__*/ jsx(Page, {
|
|
193
195
|
className: "payment_link",
|
|
194
196
|
children: /*#__PURE__*/ jsx(PageBody, {
|
|
@@ -205,8 +207,9 @@ var PaymentPage = function(_param) {
|
|
|
205
207
|
rightBlock: /*#__PURE__*/ jsx(PageBody.RightBlock, {
|
|
206
208
|
children: /*#__PURE__*/ jsx(BookingSummary, _object_spread_props(_object_spread({}, bookingSummaryProps), {
|
|
207
209
|
isPaymentPage: true,
|
|
210
|
+
headerTitle: t('totalBooking'),
|
|
208
211
|
headerComponent: /*#__PURE__*/ jsx(SummaryTotalBlock, {
|
|
209
|
-
amount:
|
|
212
|
+
amount: totalBooked
|
|
210
213
|
}),
|
|
211
214
|
footer: /*#__PURE__*/ jsx("div", {
|
|
212
215
|
className: "d-flex flex-column justify-content-between",
|
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.12",
|
|
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.12",
|
|
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.12",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
66
|
"@licklist/plugins": "0.35.1-dev.8",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
@@ -17,6 +17,7 @@ export const BookingSummary = ({
|
|
|
17
17
|
formValues = {},
|
|
18
18
|
shouldHidePeopleAmount,
|
|
19
19
|
eventName,
|
|
20
|
+
headerTitle,
|
|
20
21
|
transactionFee = 0,
|
|
21
22
|
productsWithErrors = [],
|
|
22
23
|
isLoading,
|
|
@@ -43,6 +44,7 @@ export const BookingSummary = ({
|
|
|
43
44
|
<BookingSummaryAccordion
|
|
44
45
|
isPaymentPage={isPaymentPage}
|
|
45
46
|
hasPeopleInput={hasPeopleInput}
|
|
47
|
+
title={headerTitle}
|
|
46
48
|
headerComponent={headerComponent}
|
|
47
49
|
>
|
|
48
50
|
<div className='event-info'>
|
|
@@ -2,13 +2,19 @@ import { useTranslation } from 'react-i18next'
|
|
|
2
2
|
import { useIntl } from 'react-intl'
|
|
3
3
|
import * as Config from '@licklist/core/dist/Config'
|
|
4
4
|
import { OrderItem } from '@licklist/plugins/dist/types/context/Iframe/orderItems'
|
|
5
|
+
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
|
|
5
6
|
import { calculateTotalModifiersPrice } from '../../utils'
|
|
6
7
|
import { ProductWithModifier } from '../../../CategoryProduct/components/ProductWithModifier/ProductWithModifier'
|
|
7
8
|
|
|
9
|
+
|
|
10
|
+
interface IOrderProduct extends OrderItem {
|
|
11
|
+
orderProductModifiers?: OrderModifierByProduct[] | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
type ProductSummaryProps = {
|
|
9
15
|
name?: string
|
|
10
16
|
productQuantityError?: string
|
|
11
|
-
orderProduct:
|
|
17
|
+
orderProduct: IOrderProduct
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
export const ProductSummary = ({
|
|
@@ -18,11 +24,12 @@ export const ProductSummary = ({
|
|
|
18
24
|
}: ProductSummaryProps) => {
|
|
19
25
|
const { t } = useTranslation('Design')
|
|
20
26
|
const { formatNumber } = useIntl()
|
|
21
|
-
|
|
22
27
|
const priceForOneProduct = orderProduct?.price
|
|
23
28
|
|
|
29
|
+
const modifiersSets = orderProduct?.orderModifiersSets || orderProduct?.orderProductModifiers
|
|
30
|
+
|
|
24
31
|
const modifierSetsPrice = calculateTotalModifiersPrice(
|
|
25
|
-
|
|
32
|
+
modifiersSets
|
|
26
33
|
)
|
|
27
34
|
|
|
28
35
|
const fullPrice = formatNumber(priceForOneProduct * orderProduct?.quantity, {
|
|
@@ -42,9 +49,9 @@ export const ProductSummary = ({
|
|
|
42
49
|
{modifierSetsPrice && <p className='price'>{fullPrice}</p>}
|
|
43
50
|
</div>
|
|
44
51
|
|
|
45
|
-
{!!
|
|
52
|
+
{!!modifiersSets.length && (
|
|
46
53
|
<>
|
|
47
|
-
{
|
|
54
|
+
{modifiersSets.map((modifier, index) => (
|
|
48
55
|
<ProductWithModifier
|
|
49
56
|
key={modifier.productQuantity.toString()}
|
|
50
57
|
modifier={modifier}
|
|
@@ -131,6 +131,12 @@ export const PaymentPage = ({
|
|
|
131
131
|
const totalPaidWithRemainingToPay =
|
|
132
132
|
data?.amount_to_pay && !!Number(data?.amount_to_pay)
|
|
133
133
|
|
|
134
|
+
const totalBooked = paymentMetadata
|
|
135
|
+
? paymentMetadata.paid
|
|
136
|
+
? paymentMetadata.total - paymentMetadata.paid
|
|
137
|
+
: paymentMetadata.total
|
|
138
|
+
: orderTotalAmountByFormValues + (bookingSummaryProps?.transactionFee ?? 0)
|
|
139
|
+
|
|
134
140
|
return (
|
|
135
141
|
<Page className='payment_link'>
|
|
136
142
|
{/* TODO wait for Brad's design for close and go back buttons */}
|
|
@@ -156,16 +162,8 @@ export const PaymentPage = ({
|
|
|
156
162
|
<BookingSummary
|
|
157
163
|
{...bookingSummaryProps}
|
|
158
164
|
isPaymentPage
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
amount={
|
|
162
|
-
paymentMetadata
|
|
163
|
-
? paymentMetadata.total
|
|
164
|
-
: orderTotalAmountByFormValues +
|
|
165
|
-
(bookingSummaryProps?.transactionFee || 0)
|
|
166
|
-
}
|
|
167
|
-
/>
|
|
168
|
-
}
|
|
165
|
+
headerTitle={t('totalBooking')}
|
|
166
|
+
headerComponent={<SummaryTotalBlock amount={totalBooked} />}
|
|
169
167
|
footer={
|
|
170
168
|
<div className='d-flex flex-column justify-content-between'>
|
|
171
169
|
{paymentMetadata ? (
|
package/yarn.lock
CHANGED
|
@@ -2481,9 +2481,9 @@ __metadata:
|
|
|
2481
2481
|
languageName: node
|
|
2482
2482
|
linkType: hard
|
|
2483
2483
|
|
|
2484
|
-
"@licklist/core@npm:0.31.2-dev.
|
|
2485
|
-
version: 0.31.2-dev.
|
|
2486
|
-
resolution: "@licklist/core@npm:0.31.2-dev.
|
|
2484
|
+
"@licklist/core@npm:0.31.2-dev.12":
|
|
2485
|
+
version: 0.31.2-dev.12
|
|
2486
|
+
resolution: "@licklist/core@npm:0.31.2-dev.12"
|
|
2487
2487
|
dependencies:
|
|
2488
2488
|
"@sentry/browser": "npm:6.2.0"
|
|
2489
2489
|
axios: "npm:0.26.0"
|
|
@@ -2505,7 +2505,7 @@ __metadata:
|
|
|
2505
2505
|
react-i18next: 11.8.8
|
|
2506
2506
|
react-intl: 6.6.8
|
|
2507
2507
|
zustand: 3.7.2
|
|
2508
|
-
checksum: 10c0/
|
|
2508
|
+
checksum: 10c0/9e98954d8f0924061f49227e81f1a86516381b38cca9218331b34ac5156af319e54adcb5e8940840b80b0580a0c0620c1df61c99372dc9f3c0612a61afb4c62d
|
|
2509
2509
|
languageName: node
|
|
2510
2510
|
linkType: hard
|
|
2511
2511
|
|
|
@@ -2520,7 +2520,7 @@ __metadata:
|
|
|
2520
2520
|
"@dnd-kit/utilities": "npm:2.0.0"
|
|
2521
2521
|
"@fortawesome/fontawesome-svg-core": "npm:1.2.34"
|
|
2522
2522
|
"@fortawesome/free-solid-svg-icons": "npm:5.15.2"
|
|
2523
|
-
"@licklist/core": "npm:0.31.2-dev.
|
|
2523
|
+
"@licklist/core": "npm:0.31.2-dev.12"
|
|
2524
2524
|
"@licklist/eslint-config": "npm:0.5.6"
|
|
2525
2525
|
"@licklist/plugins": "npm:0.35.1-dev.8"
|
|
2526
2526
|
"@mantine/core": "npm:6.0.22"
|
|
@@ -2651,7 +2651,7 @@ __metadata:
|
|
|
2651
2651
|
vite-plugin-svgr: "npm:4.2.0"
|
|
2652
2652
|
vite-tsconfig-paths: "npm:5.0.1"
|
|
2653
2653
|
peerDependencies:
|
|
2654
|
-
"@licklist/core": 0.31.2-dev.
|
|
2654
|
+
"@licklist/core": 0.31.2-dev.12
|
|
2655
2655
|
"@licklist/eslint-config": 0.5.6
|
|
2656
2656
|
"@licklist/plugins": 0.35.1-dev.8
|
|
2657
2657
|
lodash: 4.17.21
|
|
@@ -5964,11 +5964,11 @@ __metadata:
|
|
|
5964
5964
|
linkType: hard
|
|
5965
5965
|
|
|
5966
5966
|
"@types/react@npm:*, @types/react@npm:>=16.14.8, @types/react@npm:>=16.9.11":
|
|
5967
|
-
version: 19.0.
|
|
5968
|
-
resolution: "@types/react@npm:19.0.
|
|
5967
|
+
version: 19.0.10
|
|
5968
|
+
resolution: "@types/react@npm:19.0.10"
|
|
5969
5969
|
dependencies:
|
|
5970
5970
|
csstype: "npm:^3.0.2"
|
|
5971
|
-
checksum: 10c0/
|
|
5971
|
+
checksum: 10c0/41884cca21850c8b2d6578b172ca0ca4fff6021251a68532b19f2031ac23dc5a9222470208065f8d9985d367376047df2f49ece8d927f7d04cdc94922b1eb34b
|
|
5972
5972
|
languageName: node
|
|
5973
5973
|
linkType: hard
|
|
5974
5974
|
|
|
@@ -9889,9 +9889,9 @@ __metadata:
|
|
|
9889
9889
|
linkType: hard
|
|
9890
9890
|
|
|
9891
9891
|
"electron-to-chromium@npm:^1.3.564, electron-to-chromium@npm:^1.5.73":
|
|
9892
|
-
version: 1.5.
|
|
9893
|
-
resolution: "electron-to-chromium@npm:1.5.
|
|
9894
|
-
checksum: 10c0/
|
|
9892
|
+
version: 1.5.102
|
|
9893
|
+
resolution: "electron-to-chromium@npm:1.5.102"
|
|
9894
|
+
checksum: 10c0/db07dab3ee3b7fbc39ad26203925669ade86b12a62d09fa14ae48a354a0f34d162ac9a2ca9d6f70ceb1b16821b01b155e56467702bcc915da1e1dd147dd034b4
|
|
9895
9895
|
languageName: node
|
|
9896
9896
|
linkType: hard
|
|
9897
9897
|
|
|
@@ -11203,9 +11203,9 @@ __metadata:
|
|
|
11203
11203
|
linkType: hard
|
|
11204
11204
|
|
|
11205
11205
|
"flatted@npm:^3.2.9":
|
|
11206
|
-
version: 3.3.
|
|
11207
|
-
resolution: "flatted@npm:3.3.
|
|
11208
|
-
checksum: 10c0/
|
|
11206
|
+
version: 3.3.3
|
|
11207
|
+
resolution: "flatted@npm:3.3.3"
|
|
11208
|
+
checksum: 10c0/e957a1c6b0254aa15b8cce8533e24165abd98fadc98575db082b786b5da1b7d72062b81bfdcd1da2f4d46b6ed93bec2434e62333e9b4261d79ef2e75a10dd538
|
|
11209
11209
|
languageName: node
|
|
11210
11210
|
linkType: hard
|
|
11211
11211
|
|
|
@@ -14273,11 +14273,11 @@ __metadata:
|
|
|
14273
14273
|
linkType: hard
|
|
14274
14274
|
|
|
14275
14275
|
"markdown-to-jsx@npm:^7.1.3":
|
|
14276
|
-
version: 7.7.
|
|
14277
|
-
resolution: "markdown-to-jsx@npm:7.7.
|
|
14276
|
+
version: 7.7.4
|
|
14277
|
+
resolution: "markdown-to-jsx@npm:7.7.4"
|
|
14278
14278
|
peerDependencies:
|
|
14279
14279
|
react: ">= 0.14.0"
|
|
14280
|
-
checksum: 10c0/
|
|
14280
|
+
checksum: 10c0/692323e3cb5573ecce5f1f40c3b1a8d67bca40f2b4907ec266c23e7dffa2dcab466f738ea6569f8a5e6234ddcdccacbfeeb97b5e2f647b94bf29fa441f0083be
|
|
14281
14281
|
languageName: node
|
|
14282
14282
|
linkType: hard
|
|
14283
14283
|
|