@licklist/design 0.58.11 → 0.59.0-dev.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/bitbucket-pipelines.yml +0 -8
- package/dist/assets/iframe/calendar.svg +2 -2
- package/dist/assets/iframe/calendar.svg.js +1 -1
- package/dist/assets/iframe/ticket.svg +2 -2
- package/dist/assets/iframe/ticket.svg.js +1 -1
- package/dist/calendar/Calendar.d.ts +1 -1
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/Calendar.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +3 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +3 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +3 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +2 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +2 -2
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +4 -2
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +4 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +4 -0
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts +1 -0
- package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.js +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts +5 -0
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -0
- package/dist/iframe/ryft/utils/ryft-form.js +1 -0
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +4 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +1 -0
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +3 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/recurring-date-picker-input/utils.d.ts +12 -0
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
- package/dist/static/manual-date-picker/constants/index.d.ts +4 -1
- package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/constants/index.js +1 -1
- package/dist/static/manual-date-picker/utils/index.d.ts +4 -0
- package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/utils/index.js +1 -1
- package/dist/styles/iframe-events/Card.scss +24 -8
- package/dist/styles/iframe-events/PoweredBy.scss +2 -2
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +57 -20
- package/dist/styles/iframe-page/Page.scss +1 -0
- package/dist/styles/iframe-page/PageBody.scss +34 -12
- package/dist/styles/iframe-page/PageHeader.scss +41 -39
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +125 -2
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/zone/form/ZoneForm.d.ts +2 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +1 -1
- package/dist/zone/form/components/ZoneControl.d.ts +2 -2
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -4
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/package.json +10 -35
- package/src/assets/iframe/calendar.svg +2 -2
- package/src/assets/iframe/ticket.svg +2 -2
- package/src/calendar/Calendar.stories.tsx +23 -0
- package/src/calendar/Calendar.tsx +5 -5
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +0 -5
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +4 -0
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +10 -8
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +4 -0
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +1 -0
- package/src/iframe/event/event-card/IframeEventCard.tsx +7 -8
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +9 -0
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +58 -7
- package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +8 -0
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
- package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +63 -10
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +4 -0
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +3 -1
- package/src/iframe/page/components/PageBody/constants.ts +2 -0
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +10 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +546 -6
- package/src/iframe/payment/payment-page/PaymentPage.tsx +38 -29
- package/src/iframe/ryft/RyftPaymentForm.tsx +11 -5
- package/src/iframe/ryft/utils/ryft-form.ts +47 -0
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -2
- package/src/product-set/control/DateInput.tsx +1 -3
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +5 -1
- package/src/product-set/hooks/useSortableTreeFunctions.ts +2 -0
- package/src/product-set/product/ProductControl.tsx +6 -3
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +0 -2
- package/src/product-set/product-category/ProductCategoryControl.tsx +105 -43
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +0 -1
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +11 -1
- package/src/recurring-date-picker-input/utils.ts +77 -0
- package/src/sales/booking/results/BookingResults.stories.tsx +3 -2
- package/src/sales/booking/results/components/ResultCard.tsx +2 -5
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
- package/src/static/manual-date-picker/constants/index.ts +6 -2
- package/src/static/manual-date-picker/utils/index.ts +11 -0
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/iframe-events/Card.scss +24 -8
- package/src/styles/iframe-events/PoweredBy.scss +2 -2
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +57 -20
- package/src/styles/iframe-page/Page.scss +1 -0
- package/src/styles/iframe-page/PageBody.scss +34 -12
- package/src/styles/iframe-page/PageHeader.scss +41 -39
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +125 -2
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/zone/form/ZoneForm.tsx +3 -2
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +7 -5
- package/src/zone/form/utils/dates.ts +9 -10
- package/jest.config.js +0 -29
- package/tests/Auth/Authorizer.test.tsx +0 -194
- package/tests/Auth/Layout/UserNavDropDown.test.tsx +0 -43
- package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +0 -33
- package/tests/Auth/Login/LoginComponent.test.tsx +0 -246
- package/tests/Auth/Login/LoginFormComponent.test.tsx +0 -182
- package/tests/Auth/Register/RegisterComponent.test.tsx +0 -285
- package/tests/Auth/Register/RegisterFormComponent.test.tsx +0 -170
- package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +0 -130
- package/tests/Auth/Social/SocialCallbackComponent.test.tsx +0 -133
- package/tests/Auth/Social/SocialFormComponent.test.tsx +0 -118
- package/tests/FileUpload/FileUpload.test.tsx +0 -42
- package/tests/Notification/EmailTemplate.test.tsx +0 -82
- package/tests/ProductSet/ProductSetPopover.test.tsx +0 -40
- package/tests/Report/Report.test.tsx +0 -48
- package/tests/Sales/Coupon.test.tsx +0 -51
- package/tests/Sales/SalesAndVIews.test.tsx +0 -63
- package/tests/SnippetTemplates/SnippetTemplates.test.tsx +0 -56
- package/tests/Table/FilterHelperComponent.test.tsx +0 -88
- package/tests/Table/PaginationHelperComponent.test.tsx +0 -109
- package/tests/Table/PerPageHelperComponent.test.tsx +0 -34
- package/tests/Table/TableHelperComponent.test.tsx +0 -295
- package/tests/TipTapEditor/TipTapEditor.test.tsx +0 -28
- package/tests/__mock__/hooks/useAuthApi.ts +0 -13
- package/tests/__mock__/hooks/useAuthMock.ts +0 -13
- package/tests/__mock__/hooks/useFormMock.ts +0 -27
- package/tests/__mock__/hooks/useNotificationMock.ts +0 -13
- package/tests/__mock__/hooks/useQueryMock.ts +0 -16
- package/tests/__mock__/hooks/useSocialApiMock.ts +0 -20
- package/tests/__mock__/hooks/useTranslationMock.ts +0 -17
- package/tests/__mock__/hooks/useUserApiMock.ts +0 -18
- package/tests/__mock__/hooks/useUserMock.ts +0 -13
- package/tests/__mock__/styleMock.js +0 -1
- package/tests/__mock__/windowMock.ts +0 -5
- package/tests/packages/react-query.tsx +0 -28
- package/tests/setupTests.ts +0 -10
|
@@ -3,6 +3,7 @@ import React, {
|
|
|
3
3
|
useCallback,
|
|
4
4
|
PropsWithChildren,
|
|
5
5
|
useEffect,
|
|
6
|
+
ReactElement,
|
|
6
7
|
} from "react";
|
|
7
8
|
import { Accordion } from "react-bootstrap";
|
|
8
9
|
import { useWindowDimensions } from "@licklist/plugins/dist/hooks/Media/useWindowDimensions";
|
|
@@ -20,6 +21,9 @@ export type BookingSummaryAccordionProps = PropsWithChildren<{
|
|
|
20
21
|
title?: string;
|
|
21
22
|
showTitleOnlyOnMobile?: boolean;
|
|
22
23
|
hasPeopleInput?: boolean;
|
|
24
|
+
// TODO Remove this, when all iframe pages will be ready
|
|
25
|
+
isPaymentPage?: boolean;
|
|
26
|
+
headerComponent?: ReactElement;
|
|
23
27
|
}>;
|
|
24
28
|
|
|
25
29
|
export const BookingSummaryAccordion = ({
|
|
@@ -27,6 +31,8 @@ export const BookingSummaryAccordion = ({
|
|
|
27
31
|
title,
|
|
28
32
|
showTitleOnlyOnMobile = false,
|
|
29
33
|
hasPeopleInput,
|
|
34
|
+
isPaymentPage,
|
|
35
|
+
headerComponent,
|
|
30
36
|
}: BookingSummaryAccordionProps) => {
|
|
31
37
|
const { width } = useWindowDimensions();
|
|
32
38
|
const [isExpanded, setIsExpanded] = useState(width <= MOBILE_WIDTH);
|
|
@@ -68,10 +74,12 @@ export const BookingSummaryAccordion = ({
|
|
|
68
74
|
return (
|
|
69
75
|
<Accordion defaultActiveKey={ACCORDION_KEY} onSelect={onSelect}>
|
|
70
76
|
<ToggleHeader
|
|
77
|
+
isPaymentPage={isPaymentPage}
|
|
71
78
|
showExpandButton={showExpandButton}
|
|
72
79
|
isExpanded={isExpanded}
|
|
73
80
|
title={title}
|
|
74
81
|
hideComponent={!showToggleHeader}
|
|
82
|
+
headerComponent={headerComponent}
|
|
75
83
|
/>
|
|
76
84
|
<Accordion.Collapse
|
|
77
85
|
eventKey={ACCORDION_KEY}
|
|
@@ -3,7 +3,7 @@ import { useIntl } from "react-intl";
|
|
|
3
3
|
import * as Config from "@licklist/core/dist/Config";
|
|
4
4
|
|
|
5
5
|
export type SummaryTotalBlockProps = {
|
|
6
|
-
label
|
|
6
|
+
label?: string;
|
|
7
7
|
amount: number;
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -15,13 +15,13 @@ export const SummaryTotalBlock = ({
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<div className="total">
|
|
18
|
-
<
|
|
19
|
-
<
|
|
18
|
+
{label && <div>{label}</div>}
|
|
19
|
+
<div className="m-0 price">
|
|
20
20
|
{formatNumber(amount, {
|
|
21
21
|
style: "currency",
|
|
22
22
|
currency: Config.Currency.GBP,
|
|
23
23
|
})}
|
|
24
|
-
</
|
|
24
|
+
</div>
|
|
25
25
|
</div>
|
|
26
26
|
);
|
|
27
27
|
};
|
package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useEffect } from "react";
|
|
1
|
+
import React, { ReactElement, useContext, useEffect } from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { useAccordionToggle } from "react-bootstrap/AccordionToggle";
|
|
4
4
|
import AccordionContext from "react-bootstrap/AccordionContext";
|
|
@@ -11,15 +11,23 @@ type ToggleHeaderProps = {
|
|
|
11
11
|
isExpanded: boolean;
|
|
12
12
|
title?: string;
|
|
13
13
|
hideComponent?: boolean;
|
|
14
|
+
headerComponent?: ReactElement;
|
|
15
|
+
isPaymentPage: boolean;
|
|
14
16
|
};
|
|
15
17
|
|
|
18
|
+
interface HeaderContentProps
|
|
19
|
+
extends Omit<ToggleHeaderProps, "hideComponent" | "isExpanded"> {
|
|
20
|
+
currentEventKey: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
export const ToggleHeader = ({
|
|
17
24
|
showExpandButton,
|
|
18
25
|
isExpanded,
|
|
19
26
|
title,
|
|
20
27
|
hideComponent,
|
|
28
|
+
isPaymentPage,
|
|
29
|
+
headerComponent,
|
|
21
30
|
}: ToggleHeaderProps) => {
|
|
22
|
-
const { t } = useTranslation("Design");
|
|
23
31
|
const currentEventKey = useContext(AccordionContext);
|
|
24
32
|
|
|
25
33
|
const decoratedOnClick = useAccordionToggle(ACCORDION_KEY);
|
|
@@ -46,14 +54,41 @@ export const ToggleHeader = ({
|
|
|
46
54
|
onKeyPress={(event) => showExpandButton && decoratedOnClick(event)}
|
|
47
55
|
role="button"
|
|
48
56
|
tabIndex={0}
|
|
49
|
-
className=
|
|
57
|
+
className={clsx(
|
|
58
|
+
"d-flex flex-column",
|
|
59
|
+
isPaymentPage && "payment-page-toggle"
|
|
60
|
+
)}
|
|
50
61
|
>
|
|
51
62
|
<h6 className={clsx("title", showExpandButton && "pointer")}>
|
|
52
63
|
<div className="d-flex w-100 align-content-center justify-content-between">
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
<HeaderContent
|
|
65
|
+
showExpandButton={showExpandButton}
|
|
66
|
+
title={title}
|
|
67
|
+
currentEventKey={currentEventKey}
|
|
68
|
+
isPaymentPage={isPaymentPage}
|
|
69
|
+
headerComponent={headerComponent}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</h6>
|
|
73
|
+
{isExpanded && <hr className="mt-3" />}
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
56
77
|
|
|
78
|
+
const HeaderContent = ({
|
|
79
|
+
title,
|
|
80
|
+
showExpandButton,
|
|
81
|
+
currentEventKey,
|
|
82
|
+
isPaymentPage,
|
|
83
|
+
headerComponent,
|
|
84
|
+
}: HeaderContentProps) => {
|
|
85
|
+
const { t } = useTranslation("Design");
|
|
86
|
+
|
|
87
|
+
if (isPaymentPage) {
|
|
88
|
+
return (
|
|
89
|
+
<>
|
|
90
|
+
<div className="d-flex">
|
|
91
|
+
<p className="m-0 mr-2 toggle-title">{title || t("yourBooking")}</p>
|
|
57
92
|
{showExpandButton && (
|
|
58
93
|
<div className="expand-button">
|
|
59
94
|
<Icon
|
|
@@ -62,13 +97,31 @@ export const ToggleHeader = ({
|
|
|
62
97
|
? "chevron-up"
|
|
63
98
|
: "chevron-down"
|
|
64
99
|
}
|
|
65
|
-
width="
|
|
100
|
+
width="0.5rem"
|
|
66
101
|
/>
|
|
67
102
|
</div>
|
|
68
103
|
)}
|
|
69
104
|
</div>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
105
|
+
{headerComponent}
|
|
106
|
+
</>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return (
|
|
110
|
+
<>
|
|
111
|
+
<div className="d-flex">
|
|
112
|
+
<p className="m-0">{title || t("yourBooking")}</p>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
{showExpandButton && (
|
|
116
|
+
<div className="expand-button">
|
|
117
|
+
<Icon
|
|
118
|
+
type={
|
|
119
|
+
currentEventKey === ACCORDION_KEY ? "chevron-up" : "chevron-down"
|
|
120
|
+
}
|
|
121
|
+
width="1rem"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
)}
|
|
125
|
+
</>
|
|
73
126
|
);
|
|
74
127
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
2
2
|
import { OrderItems } from "@licklist/plugins/dist/types/context/Iframe/orderItems";
|
|
3
3
|
import { MenuStep } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
4
|
+
import { ReactElement } from "react";
|
|
4
5
|
|
|
5
6
|
export const MOBILE_WIDTH = 576;
|
|
6
7
|
export const ACCORDION_KEY = "booking-summary";
|
|
@@ -20,4 +21,7 @@ export type BookingSummaryProps = {
|
|
|
20
21
|
isLoading?: boolean;
|
|
21
22
|
peopleAmount: number;
|
|
22
23
|
isPaymentLink?: boolean;
|
|
24
|
+
isPaymentPage?: boolean;
|
|
25
|
+
headerComponent?: ReactElement;
|
|
26
|
+
footer?: ReactElement;
|
|
23
27
|
};
|
package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx
CHANGED
|
@@ -90,7 +90,7 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
90
90
|
type="number"
|
|
91
91
|
onChange={(e) => handleChangeValue(Number(e.target.value))}
|
|
92
92
|
value={value}
|
|
93
|
-
min={
|
|
93
|
+
min={0}
|
|
94
94
|
max={max}
|
|
95
95
|
defaultValue={defaultValue}
|
|
96
96
|
placeholder={placeholder}
|
|
@@ -25,4 +25,6 @@ export const COLLAPSE_MARGIN = 36;
|
|
|
25
25
|
|
|
26
26
|
export const PAGE_LEFT_BLOCK_CONTAINER_ID = "page-left-block-container";
|
|
27
27
|
export const PAGE_CALENDAR_SELECT_WRAPPER = "calendar-select-wrapper";
|
|
28
|
+
export const PAGE_BODY_WITH_SCROLL = "page-body-with-scroll";
|
|
29
|
+
|
|
28
30
|
export const PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
PAGE_LEFT_BLOCK_CONTAINER_ID,
|
|
17
17
|
PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,
|
|
18
18
|
PAGE_CALENDAR_SELECT_WRAPPER,
|
|
19
|
+
PAGE_BODY_WITH_SCROLL,
|
|
19
20
|
} from "../constants";
|
|
20
21
|
import { ChangeRightBlockHeightEvent } from "../types";
|
|
21
22
|
|
|
@@ -46,10 +47,19 @@ export const useResizePageBody = () => {
|
|
|
46
47
|
const calenderWrapper = document.getElementById(
|
|
47
48
|
PAGE_CALENDAR_SELECT_WRAPPER
|
|
48
49
|
);
|
|
50
|
+
|
|
49
51
|
const CALENDAR_WRAPPER_HEIGHT = calenderWrapper
|
|
50
52
|
? calenderWrapper.clientHeight
|
|
51
53
|
: 0;
|
|
52
54
|
|
|
55
|
+
const paymentLinkPageBody = document.getElementById(PAGE_BODY_WITH_SCROLL);
|
|
56
|
+
if (paymentLinkPageBody) {
|
|
57
|
+
paymentLinkPageBody.scroll({
|
|
58
|
+
top: -height,
|
|
59
|
+
behavior: "smooth",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
53
63
|
return {
|
|
54
64
|
maxHeight:
|
|
55
65
|
height -
|
|
@@ -63,7 +63,7 @@ const processedPaymentSummary = ({
|
|
|
63
63
|
const total = calculateTotalPrice(order, externalPaymentDetail);
|
|
64
64
|
|
|
65
65
|
const totalDiscount = calculateTotalDiscount(order.payments);
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
let summaryItems: SummaryItem[] = [
|
|
68
68
|
{
|
|
69
69
|
translateKey: AMOUNT_TOTAL,
|
|
@@ -74,7 +74,7 @@ const processedPaymentSummary = ({
|
|
|
74
74
|
if (totalDiscount) {
|
|
75
75
|
summaryItems.push({
|
|
76
76
|
translateKey: AMOUNT_WITH_DISCOUNT,
|
|
77
|
-
price:
|
|
77
|
+
price: order.totalToPayAmount,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -84,17 +84,17 @@ const processedPaymentSummary = ({
|
|
|
84
84
|
|
|
85
85
|
summaryItems.push({
|
|
86
86
|
translateKey: TOTAL_PAID,
|
|
87
|
-
price:
|
|
87
|
+
price: order.paidAmount,
|
|
88
88
|
});
|
|
89
|
-
if (
|
|
89
|
+
if (order.totalToPayAmount <= 0) {
|
|
90
90
|
return summaryItems;
|
|
91
91
|
}
|
|
92
92
|
summaryItems = [...summaryItems, ...externalPaymentDetail];
|
|
93
93
|
|
|
94
|
-
if (
|
|
94
|
+
if (order.remainingToPay) {
|
|
95
95
|
summaryItems.push({
|
|
96
96
|
translateKey: REMAINING_TO_PAY,
|
|
97
|
-
price:
|
|
97
|
+
price: order.remainingToPay,
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
return summaryItems;
|