@licklist/design 0.44.486-dev.29 → 0.44.486-dev.3
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/assets/logo/bookedit.svg +11 -9
- package/dist/assets/logo/bookedit.svg.js +1 -1
- package/dist/assets/logo/licklist.svg +2 -0
- package/dist/assets/logo/licklist.svg.js +1 -1
- package/dist/date-time-button/DateTimeButton.d.ts +1 -5
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +1 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +1 -1
- package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useImage.js +1 -1
- package/dist/file-upload/FileUpload.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.js +1 -1
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +12 -0
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-cards/activity-card/ActivityCard.js +1 -0
- package/dist/iframe/activity-cards/index.d.ts +3 -0
- package/dist/iframe/activity-cards/index.d.ts.map +1 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +12 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +1 -0
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts +5 -0
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/EventCalendar.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +1 -0
- package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDate/CalendarDate.d.ts +2 -3
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +5 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/index.d.ts +4 -0
- package/dist/iframe/event/event-calendar/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/types/index.d.ts +6 -0
- package/dist/iframe/event/event-calendar/types/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/utils/index.d.ts +3 -0
- package/dist/iframe/event/event-calendar/utils/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/utils/index.js +1 -0
- package/dist/iframe/event/index.d.ts +1 -0
- package/dist/iframe/event/index.d.ts.map +1 -1
- package/dist/iframe/index.d.ts +2 -2
- package/dist/iframe/index.d.ts.map +1 -1
- 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 +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- 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/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
- package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
- package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +2 -3
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.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/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts +1 -7
- package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +1 -3
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/product/ProductControl.d.ts +1 -2
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
- 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/recurrence-input/RecurrenceEndInput.d.ts +1 -8
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts +1 -2
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -4
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
- package/dist/report/form/ReportForm.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/static/RestrictedAccess.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.d.ts +1 -2
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +1 -1
- package/dist/styles/header/Header.scss +4 -0
- package/dist/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
- package/{src/styles/activity-card/ListActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
- package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +6 -3
- package/dist/styles/iframe-customers-journey/_index.scss +3 -0
- package/dist/styles/iframe-events/Calendar.scss +14 -14
- package/dist/styles/iframe-events/Card.scss +0 -1
- package/dist/styles/iframe-page/PageBody.scss +2 -3
- package/dist/styles/notification/Notification.scss +0 -4
- package/dist/styles/packages.scss +1 -2
- package/dist/styles/resources-blocking/_index.scss +0 -5
- package/dist/styles/themes/bookedit/_index.scss +0 -1
- package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
- package/dist/zone/form/components/AvailableTimesControl.js +1 -1
- 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.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/dist/zone/form/utils/dates.js +1 -1
- package/package.json +2 -2
- package/src/assets/logo/bookedit.svg +11 -9
- package/src/assets/logo/licklist.svg +2 -0
- package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
- package/src/date-time-button/DateTimeButton.tsx +20 -42
- package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
- package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
- package/src/file-upload/FileUpload.tsx +1 -3
- package/src/iframe/{activity-card → activity-cards/activity-card}/ActivityCard.stories.tsx +1 -24
- package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
- package/src/iframe/activity-cards/index.ts +2 -0
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
- package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +37 -0
- package/src/iframe/event/event-calendar/EventCalendar.tsx +20 -0
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarDate/CalendarDate.tsx +2 -10
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +13 -17
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
- package/src/iframe/event/event-calendar/index.ts +6 -0
- package/src/iframe/event/event-calendar/types/index.ts +6 -0
- package/src/iframe/event/event-calendar/utils/index.ts +11 -0
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -1
- package/src/iframe/event/index.ts +6 -0
- package/src/iframe/index.ts +2 -1
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +0 -2
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -1
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +3 -5
- package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +29 -28
- package/src/iframe/page/Page.stories.tsx +2 -2
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -6
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +99 -11
- package/src/iframe/payment/order-items-table/types/index.ts +1 -18
- package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
- package/src/index.ts +0 -1
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
- package/src/product-set/form/ProductCategoriesControl.tsx +0 -2
- package/src/product-set/form/ProductSetForm.stories.tsx +0 -1
- package/src/product-set/form/ProductsControl.tsx +0 -10
- package/src/product-set/product/ProductControl.tsx +8 -30
- package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +5 -15
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +8 -10
- package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
- package/src/recurrence-input/RecurrenceInput.tsx +2 -12
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -24
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
- package/src/static/CountryCodeSelect.tsx +3 -3
- package/src/static/RestrictedAccess.tsx +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +1 -8
- package/src/styles/header/Header.scss +4 -0
- package/src/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
- package/{dist/styles/activity-card/ListActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
- package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +6 -3
- package/src/styles/iframe-customers-journey/_index.scss +3 -0
- package/src/styles/iframe-events/Calendar.scss +14 -14
- package/src/styles/iframe-events/Card.scss +0 -1
- package/src/styles/iframe-page/PageBody.scss +2 -3
- package/src/styles/notification/Notification.scss +0 -4
- package/src/styles/packages.scss +1 -2
- package/src/styles/resources-blocking/_index.scss +0 -5
- package/src/styles/themes/bookedit/_index.scss +0 -1
- package/src/typings.d.ts +0 -11
- package/src/zone/form/components/AvailableTimesControl.tsx +9 -4
- package/src/zone/form/components/ZoneControl.tsx +0 -2
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +35 -27
- package/src/zone/form/utils/dates.ts +36 -29
- package/dist/assets/iframe/available.svg.js +0 -1
- package/dist/assets/iframe/limited.svg.js +0 -1
- package/dist/assets/iframe/soldOut.svg.js +0 -1
- package/dist/assets/logo/favicon.svg +0 -12
- package/dist/calendar/Calendar.d.ts +0 -16
- package/dist/calendar/Calendar.d.ts.map +0 -1
- package/dist/calendar/Calendar.js +0 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
- package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
- package/dist/calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
- package/dist/calendar/components/CalendarDate/CalendarDate.js +0 -1
- package/dist/calendar/components/CalendarDate/index.d.ts.map +0 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -8
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
- package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
- package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
- package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
- package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
- package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
- package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
- package/dist/calendar/index.d.ts +0 -4
- package/dist/calendar/index.d.ts.map +0 -1
- package/dist/calendar/utils/index.d.ts +0 -5
- package/dist/calendar/utils/index.d.ts.map +0 -1
- package/dist/calendar/utils/index.js +0 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts +0 -17
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-card/ActivityCard.js +0 -1
- package/dist/iframe/activity-card/index.d.ts +0 -2
- package/dist/iframe/activity-card/index.d.ts.map +0 -1
- package/dist/iframe/payment/order-items-table/types/index.js +0 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +0 -3
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +0 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +0 -1
- package/dist/styles/activity-card/_index.scss +0 -2
- package/dist/styles/date-time-button/_index.scss +0 -1
- package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
- package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
- package/dist/zone/form/components/GameDurationControl.js +0 -1
- package/src/assets/logo/favicon.svg +0 -12
- package/src/calendar/Calendar.stories.tsx +0 -33
- package/src/calendar/Calendar.tsx +0 -59
- package/src/calendar/index.ts +0 -3
- package/src/calendar/utils/index.ts +0 -28
- package/src/iframe/activity-card/ActivityCard.tsx +0 -77
- package/src/iframe/activity-card/index.ts +0 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -118
- package/src/styles/activity-card/_index.scss +0 -2
- package/src/styles/date-time-button/_index.scss +0 -1
- package/src/zone/form/components/GameDurationControl.tsx +0 -46
- /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
- /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
- /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDate/index.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
- /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
- /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
- /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDate/index.ts +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
package/src/{calendar → iframe/event/event-calendar}/components/CalendarDate/CalendarDate.tsx
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Button } from "react-bootstrap";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import clsx from "clsx";
|
|
@@ -9,7 +9,6 @@ export type CalendarDateProps = {
|
|
|
9
9
|
selectedDate?: DateTime;
|
|
10
10
|
setSelectedDate: (date: DateTime) => void;
|
|
11
11
|
isDisabled?: boolean;
|
|
12
|
-
fromPrice?: string | ReactElement | null;
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
export const CalendarDate = ({
|
|
@@ -18,7 +17,6 @@ export const CalendarDate = ({
|
|
|
18
17
|
selectedDate,
|
|
19
18
|
setSelectedDate,
|
|
20
19
|
isDisabled = false,
|
|
21
|
-
fromPrice,
|
|
22
20
|
}: CalendarDateProps) => {
|
|
23
21
|
const onClick = () => {
|
|
24
22
|
if (isDisabled) return;
|
|
@@ -39,13 +37,7 @@ export const CalendarDate = ({
|
|
|
39
37
|
)}
|
|
40
38
|
onClick={onClick}
|
|
41
39
|
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{typeof fromPrice === "string" ? (
|
|
45
|
-
<div>{fromPrice}</div>
|
|
46
|
-
) : (
|
|
47
|
-
<>{fromPrice}</>
|
|
48
|
-
)}
|
|
40
|
+
{currentDate.day}
|
|
49
41
|
</Button>
|
|
50
42
|
);
|
|
51
43
|
};
|
package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx
RENAMED
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
1
|
+
import React, { useContext, useMemo } from "react";
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
|
+
import { EventCalendarContext } from "@licklist/plugins/dist/context/event/EventCalendarContext";
|
|
3
4
|
import { CalendarWeekdays } from "../CalendarWeekdays";
|
|
4
5
|
import { CalendarDate } from "../CalendarDate";
|
|
6
|
+
import { CalendarBaseProps } from "../../types";
|
|
5
7
|
import { isSelectedDateDisabled } from "../../utils";
|
|
6
|
-
import { CalendarProps } from "../../Calendar";
|
|
7
8
|
|
|
8
|
-
export type CalendarDatesProps =
|
|
9
|
-
CalendarProps,
|
|
10
|
-
| "calendarDates"
|
|
11
|
-
| "fromPrice"
|
|
12
|
-
| "isLoading"
|
|
13
|
-
| "disabledDates"
|
|
14
|
-
| "selectedDate"
|
|
15
|
-
| "setSelectedDate"
|
|
16
|
-
> & {
|
|
17
|
-
initialDate: DateTime;
|
|
18
|
-
};
|
|
9
|
+
export type CalendarDatesProps = CalendarBaseProps;
|
|
19
10
|
|
|
20
11
|
export const CalendarDates = ({
|
|
21
12
|
disabledDates = [],
|
|
22
13
|
isLoading = false,
|
|
23
|
-
calendarDates,
|
|
24
|
-
...props
|
|
25
14
|
}: CalendarDatesProps) => {
|
|
15
|
+
const { calendarDates, initialDate, selectedDate, setSelectedDate } =
|
|
16
|
+
useContext(EventCalendarContext);
|
|
17
|
+
|
|
26
18
|
const fillCalendarDates = useMemo(() => {
|
|
27
19
|
let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
|
|
28
20
|
|
|
@@ -45,7 +37,9 @@ export const CalendarDates = ({
|
|
|
45
37
|
<CalendarWeekdays />
|
|
46
38
|
<div className="calendar-dates">
|
|
47
39
|
{fillCalendarDates.map((date: DateTime | null) => {
|
|
48
|
-
if (date === null)
|
|
40
|
+
if (date === null) {
|
|
41
|
+
return <div />;
|
|
42
|
+
}
|
|
49
43
|
|
|
50
44
|
const isDisabled =
|
|
51
45
|
isLoading || isSelectedDateDisabled(date, disabledDates);
|
|
@@ -54,8 +48,10 @@ export const CalendarDates = ({
|
|
|
54
48
|
<CalendarDate
|
|
55
49
|
key={+date}
|
|
56
50
|
currentDate={date}
|
|
51
|
+
initialDate={initialDate}
|
|
52
|
+
selectedDate={selectedDate}
|
|
53
|
+
setSelectedDate={setSelectedDate}
|
|
57
54
|
isDisabled={isDisabled}
|
|
58
|
-
{...props}
|
|
59
55
|
/>
|
|
60
56
|
);
|
|
61
57
|
})}
|
package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
2
|
import { Form } from "react-bootstrap";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { PAGE_CALENDAR_SELECT_WRAPPER } from "
|
|
4
|
+
import { PAGE_CALENDAR_SELECT_WRAPPER } from "../../../../page/components/PageBody/constants";
|
|
5
5
|
|
|
6
6
|
export type CalendarSelectOption = {
|
|
7
7
|
label: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import isEqual from "lodash/isEqual";
|
|
3
|
+
|
|
4
|
+
export const isSelectedDateDisabled = (
|
|
5
|
+
selectedDate: DateTime,
|
|
6
|
+
disabledDates: DateTime[] = []
|
|
7
|
+
) => {
|
|
8
|
+
return !!disabledDates.find((disabledDate) =>
|
|
9
|
+
isEqual(disabledDate.toObject(), selectedDate.toObject())
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -5,7 +5,7 @@ import { IframeEventVenueMap } from "./IframeEventVenueMap";
|
|
|
5
5
|
import { Page, PageBody, PageHeader } from "../../page";
|
|
6
6
|
import { BookingSummaryFooter } from "../../order-process/components/BookingSummaryFooter";
|
|
7
7
|
import { BookingSummary } from "../../order-process/components/BookingSummary";
|
|
8
|
-
import { CalendarSelect } from "
|
|
8
|
+
import { CalendarSelect } from "../event-calendar/components/CalendarSelect";
|
|
9
9
|
import { Product } from "../../../types";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
@@ -13,6 +13,12 @@ export {
|
|
|
13
13
|
} from "./event-order-short-summary";
|
|
14
14
|
export { EventDescription } from "./event-description";
|
|
15
15
|
export { EventProductSets, EventProductSetsProps } from "./event-product-sets";
|
|
16
|
+
export {
|
|
17
|
+
EventCalendar,
|
|
18
|
+
CalendarSelect,
|
|
19
|
+
CalendarSelectProps,
|
|
20
|
+
CalendarSelectOption,
|
|
21
|
+
} from "./event-calendar";
|
|
16
22
|
export {
|
|
17
23
|
EventStepVenueMapZones,
|
|
18
24
|
EventStepVenueMapZonesProps,
|
package/src/iframe/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export {
|
|
|
10
10
|
EventOrderShortSummary,
|
|
11
11
|
SummaryDataType,
|
|
12
12
|
EventDescription,
|
|
13
|
+
EventCalendar,
|
|
13
14
|
EventProductSets,
|
|
14
15
|
EventProductSetsProps,
|
|
15
16
|
IframeEventVenueMap,
|
|
@@ -42,5 +43,5 @@ export {
|
|
|
42
43
|
export { BackButton } from "./back-button";
|
|
43
44
|
export { PoweredBy } from "./powered-by";
|
|
44
45
|
export * from "./page";
|
|
45
|
-
export * from "./activity-
|
|
46
|
+
export * from "./activity-cards";
|
|
46
47
|
export { CustomDateField, CustomDateFieldProps } from "./custom-fields";
|
|
@@ -11,7 +11,6 @@ import { BookingSummaryAccordion } from "./components/BookingSummaryAccordion";
|
|
|
11
11
|
|
|
12
12
|
export const BookingSummary = ({
|
|
13
13
|
date,
|
|
14
|
-
time,
|
|
15
14
|
menuSteps,
|
|
16
15
|
formValues,
|
|
17
16
|
isNotShownPeopleAmount,
|
|
@@ -48,7 +47,6 @@ export const BookingSummary = ({
|
|
|
48
47
|
<div className="event-info">
|
|
49
48
|
<p className="m-0 title event-name">{eventName}</p>
|
|
50
49
|
<p className="m-0">{date}</p>
|
|
51
|
-
{time && <p className="m-0">{time}</p>}
|
|
52
50
|
</div>
|
|
53
51
|
<hr />
|
|
54
52
|
|
|
@@ -5,8 +5,6 @@ export const cartSumByOrderProducts = (orderProducts?: Order[]) => {
|
|
|
5
5
|
return 0;
|
|
6
6
|
}
|
|
7
7
|
return orderProducts.reduce((prevSumValue: number, product) => {
|
|
8
|
-
if (!product) return 0;
|
|
9
|
-
|
|
10
8
|
return (
|
|
11
9
|
prevSumValue + (product?.deposit || product?.price) * product.quantity
|
|
12
10
|
);
|
|
@@ -20,15 +20,15 @@ import { Step } from "@licklist/core/dist/DataMapper/Product/StepDataMapper";
|
|
|
20
20
|
import { useTranslation } from "react-i18next";
|
|
21
21
|
import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
22
22
|
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
23
|
-
import { MenuStep } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
24
23
|
import { Category } from "./components/Category";
|
|
24
|
+
import { MenuStep } from "../../../../types";
|
|
25
25
|
import { STEP_FORM_ID } from "../../constants";
|
|
26
26
|
import { ErrorModal } from "../ErrorModal/ErrorModal";
|
|
27
27
|
import { PageBody } from "../../../page/components/PageBody";
|
|
28
28
|
import {
|
|
29
29
|
CalendarSelect,
|
|
30
30
|
CalendarSelectOption,
|
|
31
|
-
} from "
|
|
31
|
+
} from "../../../event/event-calendar/components/CalendarSelect";
|
|
32
32
|
import { IframeEventVenueMap } from "../../../event/event-venue-map";
|
|
33
33
|
import { VenueMapRef } from "../../../../events/event-venue-map/components/VenueMap";
|
|
34
34
|
import { useCategoryVerification } from "../utils/useCategoryVerification";
|
|
@@ -117,7 +117,7 @@ export const CalendarStepsForm = forwardRef<
|
|
|
117
117
|
);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
const categoryError = verifyCategoryItems(values, step
|
|
120
|
+
const categoryError = verifyCategoryItems(values, step);
|
|
121
121
|
|
|
122
122
|
if (categoryError) {
|
|
123
123
|
setStepFormError(categoryError.message);
|
|
@@ -363,5 +363,3 @@ export const CalendarStepsForm = forwardRef<
|
|
|
363
363
|
);
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
|
-
|
|
367
|
-
CalendarStepsForm.displayName = "CalendarStepsForm";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export const fancyTimeFormat = (
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export const fancyTimeFormat = (miliseconds: number) => {
|
|
2
|
+
const date = new Date(miliseconds);
|
|
3
|
+
const mins = date.getMinutes();
|
|
4
|
+
const secs = date.getSeconds();
|
|
5
|
+
let timerString = "";
|
|
6
|
+
|
|
7
|
+
timerString += `${mins}:${secs < 10 ? "0" : ""}`;
|
|
8
|
+
timerString += `${secs}`;
|
|
9
|
+
return timerString;
|
|
7
10
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ProductCategory } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
2
1
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { Order } from "src/types";
|
|
2
|
+
import { MenuStep, Order } from "src/types";
|
|
4
3
|
|
|
5
4
|
interface CategoryError {
|
|
6
5
|
message: string;
|
|
@@ -13,39 +12,41 @@ export const useCategoryVerification = () => {
|
|
|
13
12
|
|
|
14
13
|
return (
|
|
15
14
|
values: Record<Order["id"], Order>,
|
|
16
|
-
|
|
15
|
+
step: MenuStep
|
|
17
16
|
): CategoryError | void => {
|
|
18
|
-
let errorMessage
|
|
17
|
+
let errorMessage;
|
|
19
18
|
|
|
20
19
|
const productArray = Object.values(values).filter(
|
|
21
20
|
(product) => product?.quantity > 0
|
|
22
21
|
);
|
|
23
22
|
|
|
24
|
-
productCategories.forEach(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
step?.productCategories.forEach(
|
|
24
|
+
({ minSubItems, maxSubItems, id, name }) => {
|
|
25
|
+
if (!minSubItems && !maxSubItems) return;
|
|
26
|
+
|
|
27
|
+
const categoryProductsQuantity = productArray.filter(
|
|
28
|
+
(product) => product?.productsCategoryId === id
|
|
29
|
+
).length;
|
|
30
|
+
|
|
31
|
+
if (minSubItems && categoryProductsQuantity < minSubItems) {
|
|
32
|
+
const message = t("Validation:fieldMinNumber", {
|
|
33
|
+
min: minSubItems,
|
|
34
|
+
attribute: `number of products in the ${name} category`,
|
|
35
|
+
});
|
|
36
|
+
errorMessage = { id, message };
|
|
37
|
+
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (maxSubItems && categoryProductsQuantity > maxSubItems) {
|
|
42
|
+
const message = t("Validation:fieldMaxNumber", {
|
|
43
|
+
max: maxSubItems,
|
|
44
|
+
attribute: `number of products in the ${name} category`,
|
|
45
|
+
});
|
|
46
|
+
errorMessage = { id, message };
|
|
47
|
+
}
|
|
39
48
|
}
|
|
40
|
-
|
|
41
|
-
if (maxSubItems && categoryProductsQuantity > maxSubItems) {
|
|
42
|
-
const message = t("Validation:fieldMaxNumber", {
|
|
43
|
-
max: maxSubItems,
|
|
44
|
-
attribute: `number of products in the ${name} category`,
|
|
45
|
-
});
|
|
46
|
-
errorMessage = { id, message };
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
+
);
|
|
49
50
|
|
|
50
51
|
return errorMessage;
|
|
51
52
|
};
|
|
@@ -6,7 +6,7 @@ import { Page } from "./Page";
|
|
|
6
6
|
import { PageHeader } from "./components/PageHeader";
|
|
7
7
|
import { PageBody } from "./components/PageBody";
|
|
8
8
|
import { IframeEventCard } from "../event/event-card/IframeEventCard";
|
|
9
|
-
import { CalendarSelect } from "
|
|
9
|
+
import { CalendarSelect } from "../event/event-calendar/components/CalendarSelect";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
title: "Iframe/Page/Page",
|
|
@@ -219,7 +219,7 @@ export function Default() {
|
|
|
219
219
|
<>
|
|
220
220
|
<CalendarSelect
|
|
221
221
|
options={[{ label: "Floor 1", value: "1" }]}
|
|
222
|
-
value="1"
|
|
222
|
+
value={"1"}
|
|
223
223
|
onChange={(chagedId: string) => console.log({ chagedId })}
|
|
224
224
|
/>
|
|
225
225
|
</>
|
|
@@ -26,12 +26,7 @@ export const LeftBlock = ({
|
|
|
26
26
|
<div className={clsx("left-block", className)} {...props}>
|
|
27
27
|
{pageTitle && (
|
|
28
28
|
<div className="navigation">
|
|
29
|
-
|
|
30
|
-
<div className="title">{pageTitle}</div>
|
|
31
|
-
) : (
|
|
32
|
-
pageTitle
|
|
33
|
-
)}
|
|
34
|
-
|
|
29
|
+
<div className="title">{pageTitle}</div>
|
|
35
30
|
{component}
|
|
36
31
|
</div>
|
|
37
32
|
)}
|
|
@@ -9,9 +9,15 @@ import {
|
|
|
9
9
|
PAYMENT_TYPE_NET_PROFIT,
|
|
10
10
|
} from "@licklist/core/dist/DataMapper/Order/PaymentDataMapper";
|
|
11
11
|
import { StaticTableData } from "../../../../table";
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
getProductQuantityAndPrice,
|
|
14
|
+
calculateTotalDiscount,
|
|
15
|
+
calculateTotalPrice,
|
|
16
|
+
getPaymentValueByType,
|
|
17
|
+
getExternalPaymentDetail,
|
|
18
|
+
getTotalSumByCategory,
|
|
19
|
+
} from "../utils";
|
|
13
20
|
import { OrderItemsTableProps, SummaryItem } from "../types";
|
|
14
|
-
import { getOrderSummaryItems } from "../utils/paymentSummary";
|
|
15
21
|
|
|
16
22
|
const CURRENCY_DEFAULT = "GBP";
|
|
17
23
|
export const PAYMENT_TYPE_TRANSLATE_KEYS = {
|
|
@@ -108,7 +114,9 @@ export const useTableData = ({
|
|
|
108
114
|
);
|
|
109
115
|
};
|
|
110
116
|
|
|
111
|
-
const renderSummaryItems = (
|
|
117
|
+
const renderSummaryItems = (
|
|
118
|
+
summaryItems: { translateKey: string; price: number }[]
|
|
119
|
+
) => {
|
|
112
120
|
return summaryItems.map(({ translateKey, price }) => {
|
|
113
121
|
return {
|
|
114
122
|
key: uniqueId(`summary-info-${translateKey}`),
|
|
@@ -119,6 +127,93 @@ export const useTableData = ({
|
|
|
119
127
|
});
|
|
120
128
|
};
|
|
121
129
|
|
|
130
|
+
const paymentNotProcessedSummary = () => {
|
|
131
|
+
const externalPaymentDetail = paymentDetail
|
|
132
|
+
? getExternalPaymentDetail(paymentDetail)
|
|
133
|
+
: undefined;
|
|
134
|
+
|
|
135
|
+
const total = calculateTotalPrice(order, externalPaymentDetail);
|
|
136
|
+
|
|
137
|
+
const summaryItems: SummaryItem[] = [
|
|
138
|
+
{
|
|
139
|
+
translateKey: "amountTotal",
|
|
140
|
+
price: total,
|
|
141
|
+
},
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
if (externalDiscount) {
|
|
145
|
+
summaryItems.push({
|
|
146
|
+
price: externalDiscount,
|
|
147
|
+
translateKey: "amountWithDiscount",
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (externalPaymentDetail) {
|
|
152
|
+
return [...summaryItems, ...getExternalPaymentDetail(paymentDetail)];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return summaryItems;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const processedPaymentSummary = () => {
|
|
159
|
+
const externalPaymentDetail =
|
|
160
|
+
paymentDetail && !order.payments.length
|
|
161
|
+
? getExternalPaymentDetail(paymentDetail)
|
|
162
|
+
: Object.keys(PAYMENT_TYPE_TRANSLATE_KEYS).map((key) => {
|
|
163
|
+
return {
|
|
164
|
+
translateKey: PAYMENT_TYPE_TRANSLATE_KEYS[key],
|
|
165
|
+
price: getPaymentValueByType(order.payments, key),
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
const total = calculateTotalPrice(order, externalPaymentDetail);
|
|
170
|
+
|
|
171
|
+
const totalDiscount = calculateTotalDiscount(order.payments);
|
|
172
|
+
const totalWithDiscount = total - Number(totalDiscount);
|
|
173
|
+
let summaryItems: SummaryItem[] = [
|
|
174
|
+
{
|
|
175
|
+
translateKey: "amountTotal",
|
|
176
|
+
price: total,
|
|
177
|
+
},
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
if (totalDiscount) {
|
|
181
|
+
summaryItems.push({
|
|
182
|
+
translateKey: "amountWithDiscount",
|
|
183
|
+
price: totalWithDiscount < 0 ? 0 : totalWithDiscount,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (paymentDetail && !order.payments.length) {
|
|
188
|
+
return [...summaryItems, ...externalPaymentDetail];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
summaryItems.push({
|
|
192
|
+
translateKey: "totalPaid",
|
|
193
|
+
price: totalWithDiscount <= 0 ? 0 : order.totalAmount,
|
|
194
|
+
});
|
|
195
|
+
if (totalWithDiscount <= 0) {
|
|
196
|
+
return summaryItems;
|
|
197
|
+
}
|
|
198
|
+
summaryItems = [...summaryItems, ...externalPaymentDetail];
|
|
199
|
+
|
|
200
|
+
if (totalWithDiscount > order.totalAmount) {
|
|
201
|
+
summaryItems.push({
|
|
202
|
+
translateKey: "remainingToPay",
|
|
203
|
+
price: totalWithDiscount - order.totalAmount,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return summaryItems;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const getOrderSummaryItems = () => {
|
|
210
|
+
if (!isPaymentProcessed) {
|
|
211
|
+
return paymentNotProcessedSummary();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return processedPaymentSummary();
|
|
215
|
+
};
|
|
216
|
+
|
|
122
217
|
const data = useMemo(
|
|
123
218
|
() => {
|
|
124
219
|
if (!order) {
|
|
@@ -127,14 +222,7 @@ export const useTableData = ({
|
|
|
127
222
|
|
|
128
223
|
return [
|
|
129
224
|
...renderProductsContent(),
|
|
130
|
-
...renderSummaryItems(
|
|
131
|
-
getOrderSummaryItems({
|
|
132
|
-
order,
|
|
133
|
-
paymentDetail,
|
|
134
|
-
isPaymentProcessed,
|
|
135
|
-
externalDiscount,
|
|
136
|
-
})
|
|
137
|
-
),
|
|
225
|
+
...renderSummaryItems(getOrderSummaryItems()),
|
|
138
226
|
];
|
|
139
227
|
},
|
|
140
228
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
|
|
2
2
|
import { PaymentDetail } from "@licklist/core/dist/DataMapper/Order/PaymentDetailDataMapper";
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
export const AMOUNT_WITH_DISCOUNT = "amountWithDiscount";
|
|
6
|
-
export const TOTAL_PAID = "totalPaid";
|
|
7
|
-
export const REMAINING_TO_PAY = "remainingToPay";
|
|
8
|
-
|
|
9
|
-
export const SUMMARY_TRANSLATE_KEYS = [
|
|
10
|
-
AMOUNT_TOTAL,
|
|
11
|
-
AMOUNT_WITH_DISCOUNT,
|
|
12
|
-
TOTAL_PAID,
|
|
13
|
-
REMAINING_TO_PAY,
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export type SUMMARY_TRANSLATE_KEY = typeof SUMMARY_TRANSLATE_KEYS[number];
|
|
17
|
-
|
|
18
|
-
export type SummaryItem = {
|
|
19
|
-
translateKey: SUMMARY_TRANSLATE_KEY;
|
|
20
|
-
price: number;
|
|
21
|
-
};
|
|
4
|
+
export type SummaryItem = { translateKey: string; price: number };
|
|
22
5
|
|
|
23
6
|
export type OrderItemsTableProps = {
|
|
24
7
|
order?: Order;
|
|
@@ -100,18 +100,18 @@ export const PaymentPage = ({
|
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
const
|
|
103
|
+
const orderTotalAmounByFormValues = cartSumByOrderProducts(
|
|
104
104
|
bookingSummaryProps && bookingSummaryProps?.formValues
|
|
105
105
|
? Object.values(bookingSummaryProps?.formValues)
|
|
106
106
|
: undefined
|
|
107
107
|
);
|
|
108
108
|
|
|
109
|
-
// User can fill
|
|
109
|
+
// User can fill promocode only in iframe appcliation.
|
|
110
110
|
// It didn't possible via payment link. This check will
|
|
111
111
|
// be applied when there are no metadata and in case when
|
|
112
112
|
// orderValues sum is greater than amount in order.
|
|
113
113
|
const isCalculatedAmountGreaterThanOrderAmount =
|
|
114
|
-
|
|
114
|
+
orderTotalAmounByFormValues > data?.amount;
|
|
115
115
|
|
|
116
116
|
return (
|
|
117
117
|
<Page
|
|
@@ -164,7 +164,7 @@ export const PaymentPage = ({
|
|
|
164
164
|
<SummaryTotalBlock
|
|
165
165
|
label={t("total")}
|
|
166
166
|
amount={
|
|
167
|
-
|
|
167
|
+
orderTotalAmounByFormValues +
|
|
168
168
|
(bookingSummaryProps?.transactionFee || 0)
|
|
169
169
|
}
|
|
170
170
|
/>
|
package/src/index.ts
CHANGED
|
@@ -314,38 +314,13 @@ export const EmailTemplateControl = React.forwardRef(
|
|
|
314
314
|
<Row className="mb-4">
|
|
315
315
|
<Form.Group as={Col}>
|
|
316
316
|
<Form.Label>{t("Design:emailBody")}</Form.Label>
|
|
317
|
-
|
|
318
|
-
<div className="alert alert-warning" role="alert">
|
|
319
|
-
Due to the mail services limitations on the length of the email
|
|
320
|
-
body that can be sent or received - maximum length is set to
|
|
321
|
-
65,535 characters.
|
|
322
|
-
</div>
|
|
323
|
-
|
|
324
|
-
<div className={`email-editor ${errors.body && "is-invalid"}`}>
|
|
317
|
+
<div className="email-editor">
|
|
325
318
|
<EmailEditor
|
|
326
319
|
ref={ref}
|
|
327
320
|
onReady={onReadyEditor}
|
|
328
321
|
style={{ height: "50rem" }}
|
|
329
322
|
/>
|
|
330
|
-
|
|
331
|
-
<input
|
|
332
|
-
type="hidden"
|
|
333
|
-
name="body"
|
|
334
|
-
{...register("body", {
|
|
335
|
-
maxLength: {
|
|
336
|
-
value: 65535,
|
|
337
|
-
message: t("Validation:fieldMaxLength", {
|
|
338
|
-
attribute: t("body"),
|
|
339
|
-
max: 65535,
|
|
340
|
-
}) as string,
|
|
341
|
-
},
|
|
342
|
-
})}
|
|
343
|
-
/>
|
|
344
323
|
</div>
|
|
345
|
-
|
|
346
|
-
<Form.Control.Feedback type="invalid">
|
|
347
|
-
{errors.body?.message}
|
|
348
|
-
</Form.Control.Feedback>
|
|
349
324
|
</Form.Group>
|
|
350
325
|
</Row>
|
|
351
326
|
<Row>
|
|
@@ -72,7 +72,6 @@ export function ProductCategoriesControl({
|
|
|
72
72
|
providerHasMap,
|
|
73
73
|
expandedProductCategories,
|
|
74
74
|
setExpandedProductCategories,
|
|
75
|
-
zones,
|
|
76
75
|
} = useContext(ProductSetLoadingContext);
|
|
77
76
|
const form = useFormContext<ProductSetFormValues>();
|
|
78
77
|
const [isSelectCategoryVisible, setIsSelectCategoryVisible] = useState(false);
|
|
@@ -288,7 +287,6 @@ export function ProductCategoriesControl({
|
|
|
288
287
|
quantityType={productCategory.quantityType}
|
|
289
288
|
hasTicket={productCategory?.hasTicket}
|
|
290
289
|
stepIndex={stepIndex}
|
|
291
|
-
zones={zones}
|
|
292
290
|
productCategoryIndex={index}
|
|
293
291
|
categoryType={productCategory.type}
|
|
294
292
|
/>
|