@licklist/design 0.44.486-dev.68 → 0.44.486-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/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 -7
- 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/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-card/utils.d.ts +0 -2
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-card/utils.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 +7 -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/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +12 -0
- 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 +3 -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 +7 -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/event-details/EventDetails.d.ts +10 -0
- package/dist/iframe/event/event-details/EventDetails.d.ts.map +1 -0
- package/dist/iframe/event/event-details/EventDetails.js +1 -0
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +9 -0
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +1 -0
- package/dist/iframe/event/event-details/components/category-product/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +26 -0
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +1 -0
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +1 -0
- package/dist/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.d.ts +3 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +8 -0
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +1 -0
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/index.d.ts +2 -0
- package/dist/iframe/event/event-details/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/utils/index.d.ts +2 -0
- package/dist/iframe/event/event-details/utils/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/utils/routes.d.ts +2 -0
- package/dist/iframe/event/event-details/utils/routes.d.ts.map +1 -0
- package/dist/iframe/event/event-details/utils/routes.js +1 -0
- package/dist/iframe/event/index.d.ts +2 -0
- package/dist/iframe/event/index.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.js +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 +1 -2
- 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/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -4
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
- package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +1 -2
- package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/ErrorModal/ErrorModal.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 +3 -4
- 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/order-process/constants.d.ts +0 -1
- package/dist/iframe/order-process/constants.d.ts.map +1 -1
- package/dist/iframe/order-process/constants.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 -3
- 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/control/DateAndRecurrenceInput.d.ts +1 -5
- 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/ProductSetControl.d.ts +3 -6
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/dist/product-set/control/ProductSetRecurrenceControl.d.ts +1 -2
- package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetRecurrenceControl.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/ProductSetForm.d.ts +1 -3
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.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 +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/product-set/utils/index.d.ts +0 -10
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +1 -1
- package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
- package/dist/provider/location-input/LocationInput.js +1 -1
- package/dist/provider/location-input/index.d.ts +0 -1
- package/dist/provider/location-input/index.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/provider/provider-form/ProviderForm.js +1 -1
- package/dist/provider/venue-form/VenueForm.d.ts +1 -3
- package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
- package/dist/provider/venue-form/VenueForm.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/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -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/report/form/ReportForm.d.ts.map +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/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -3
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
- package/dist/sales/payment-form/SalePaymentForm.js +1 -1
- package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
- package/dist/sales/source-of-sales/SourceOfSalesChart.js +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/events/EventCard.scss +3 -10
- package/dist/styles/form/CustomCheckbox.scss +0 -6
- 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 +12 -6
- package/dist/styles/iframe-customers-journey/_index.scss +3 -0
- package/dist/styles/iframe-events/Card.scss +0 -1
- package/dist/styles/notification/Notification.scss +0 -4
- package/dist/styles/packages.scss +1 -3
- package/dist/styles/resources-blocking/_index.scss +0 -5
- package/dist/styles/sales/BookingResults.scss +6 -14
- package/dist/styles/themes/bookedit/_index.scss +0 -1
- package/dist/styles/zones/ZoneForm.scss +0 -3
- package/dist/types/iframe.d.ts +0 -1
- package/dist/types/iframe.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
- package/dist/zone/form/ZoneForm.d.ts +1 -1
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +1 -1
- package/dist/zone/form/components/AvailableTimesControl.d.ts +0 -2
- 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 +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 +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 +3 -3
- 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 +22 -19
- package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +12 -0
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
- package/src/events/event-card/EventCard.tsx +2 -6
- package/src/events/event-card/utils.ts +0 -16
- 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 +36 -0
- package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
- package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
- package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -24
- 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-details/EventDetails.stories.tsx +187 -0
- package/src/iframe/event/event-details/EventDetails.tsx +92 -0
- package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +123 -0
- package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +109 -0
- package/src/iframe/event/event-details/components/category-product/index.ts +1 -0
- package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +250 -0
- package/src/iframe/event/event-details/components/event-details-form/index.ts +5 -0
- package/src/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
- package/src/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.tsx +3 -3
- package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +1 -0
- package/src/iframe/event/event-details/components/number-of-people-input/index.ts +1 -0
- package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +34 -0
- package/src/iframe/event/event-details/components/product-category-view/index.ts +1 -0
- package/src/iframe/event/event-details/index.ts +1 -0
- package/src/iframe/event/event-details/utils/index.ts +1 -0
- package/src/iframe/event/event-details/utils/routes.ts +6 -0
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +2 -1
- package/src/iframe/event/index.ts +7 -0
- package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +2 -8
- package/src/iframe/event/ticket-description/TicketDescription.tsx +2 -7
- package/src/iframe/index.ts +3 -1
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +3 -4
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -2
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +1 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +8 -17
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +29 -15
- package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
- package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +32 -62
- package/src/iframe/order-process/constants.ts +0 -1
- 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.stories.tsx +1 -1
- package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
- package/src/index.ts +0 -3
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
- package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -75
- package/src/product-set/control/ProductSetControl.stories.tsx +2 -0
- package/src/product-set/control/ProductSetControl.tsx +10 -44
- package/src/product-set/control/ProductSetRecurrenceControl.tsx +5 -14
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -2
- package/src/product-set/form/ProductSetForm.stories.tsx +12 -9
- package/src/product-set/form/ProductSetForm.tsx +3 -19
- package/src/product-set/form/ProductsControl.tsx +0 -10
- package/src/product-set/product/ProductControl.tsx +1 -28
- package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
- package/src/product-set/product-category/ProductCategory.stories.tsx +1 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +30 -1
- package/src/product-set/utils/index.ts +0 -38
- package/src/provider/location-input/LocationInput.tsx +20 -21
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/location-input/index.ts +1 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +13 -5
- package/src/provider/venue-form/VenueForm.stories.tsx +0 -24
- package/src/provider/venue-form/VenueForm.tsx +4 -55
- package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
- package/src/recurrence-input/RecurrenceInput.tsx +2 -12
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +11 -21
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/sales/booking/results/BookingResults.stories.tsx +7 -12
- package/src/sales/booking/results/components/ResultCard.tsx +3 -13
- package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +7 -0
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +5 -20
- package/src/sales/source-of-sales/SourceOfSalesChart.tsx +28 -31
- package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
- package/src/static/RestrictedAccess.tsx +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +1 -8
- package/src/styles/events/EventCard.scss +3 -10
- package/src/styles/form/CustomCheckbox.scss +0 -6
- 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 +12 -6
- package/src/styles/iframe-customers-journey/_index.scss +3 -0
- package/src/styles/iframe-events/Card.scss +0 -1
- package/src/styles/notification/Notification.scss +0 -4
- package/src/styles/packages.scss +1 -3
- package/src/styles/resources-blocking/_index.scss +0 -5
- package/src/styles/sales/BookingResults.scss +6 -14
- package/src/styles/themes/bookedit/_index.scss +0 -1
- package/src/styles/zones/ZoneForm.scss +0 -3
- package/src/types/iframe.ts +0 -1
- package/src/typings.d.ts +0 -11
- package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
- package/src/zone/form/ZoneForm.tsx +2 -1
- package/src/zone/form/components/AvailableTimesControl.tsx +88 -89
- package/src/zone/form/components/ZoneControl.tsx +5 -4
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +59 -3
- 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/availability-indicator/AvailabilityIndicator.d.ts +0 -9
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
- package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
- package/dist/availability-indicator/index.d.ts +0 -2
- package/dist/availability-indicator/index.d.ts.map +0 -1
- package/dist/calendar/Calendar.d.ts +0 -21
- 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/CalendarDates/CalendarDates.d.ts +0 -5
- 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/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
- package/dist/number-of-people-input/NumberOfPeopleInput.js +0 -1
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +0 -1
- package/dist/number-of-people-input/components/index.d.ts +0 -2
- package/dist/number-of-people-input/components/index.d.ts.map +0 -1
- package/dist/number-of-people-input/index.d.ts +0 -3
- package/dist/number-of-people-input/index.d.ts.map +0 -1
- package/dist/provider/location-input/components/FormGroupControll.d.ts +0 -7
- package/dist/provider/location-input/components/FormGroupControll.d.ts.map +0 -1
- package/dist/provider/location-input/components/FormGroupControll.js +0 -1
- package/dist/provider/location-input/components/index.d.ts +0 -2
- package/dist/provider/location-input/components/index.d.ts.map +0 -1
- package/dist/styles/activity-card/_index.scss +0 -2
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
- package/dist/styles/availability-indicator/_index.scss +0 -1
- 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/availability-indicator/AvailabilityIndicator.tsx +0 -59
- package/src/availability-indicator/index.ts +0 -1
- package/src/calendar/Calendar.stories.tsx +0 -33
- package/src/calendar/Calendar.tsx +0 -46
- 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/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +0 -92
- package/src/number-of-people-input/components/index.ts +0 -1
- package/src/number-of-people-input/index.ts +0 -2
- package/src/provider/location-input/components/FormGroupControll.tsx +0 -16
- package/src/provider/location-input/components/index.ts +0 -1
- package/src/styles/activity-card/_index.scss +0 -2
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
- package/src/styles/availability-indicator/_index.scss +0 -1
- 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/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/dist/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.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/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
|
@@ -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>
|
|
@@ -5,11 +5,8 @@ import { Form, OverlayTrigger, Popover } from "react-bootstrap";
|
|
|
5
5
|
import { useFieldArray, useFormContext } from "react-hook-form";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import { useClickAway } from "react-use";
|
|
8
|
-
import { DateTime } from "luxon";
|
|
9
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
10
8
|
import { ProductSetRecurrence } from "@licklist/core/dist/DataMapper/Product/ProductSetRecurrenceDataMapper";
|
|
11
9
|
import { DndContext } from "@dnd-kit/core";
|
|
12
|
-
import { TIME_FORMAT } from "@licklist/core/dist/Config/Date";
|
|
13
10
|
import {
|
|
14
11
|
SortableContext,
|
|
15
12
|
verticalListSortingStrategy,
|
|
@@ -23,11 +20,6 @@ import {
|
|
|
23
20
|
RecurringDatePickerInputValues,
|
|
24
21
|
} from "../../recurring-date-picker-input/RecurringDatePickerInput";
|
|
25
22
|
import { ProductSetRecurrenceControl } from "./ProductSetRecurrenceControl";
|
|
26
|
-
import {
|
|
27
|
-
AvailableTimesControl,
|
|
28
|
-
AvailableTimesControlRef,
|
|
29
|
-
} from "../../zone/form/components/AvailableTimesControl";
|
|
30
|
-
|
|
31
23
|
// eslint-disable-next-line max-len
|
|
32
24
|
|
|
33
25
|
export interface DateAndRecurrenceInputValues {
|
|
@@ -36,16 +28,10 @@ export interface DateAndRecurrenceInputValues {
|
|
|
36
28
|
|
|
37
29
|
interface DateAndRecurrenceInputProps {
|
|
38
30
|
isEventEditProductSet?: boolean;
|
|
39
|
-
workHours?: WorkHour[];
|
|
40
|
-
providerHasBookingManagement: boolean;
|
|
41
|
-
isLoading?: boolean;
|
|
42
31
|
}
|
|
43
32
|
|
|
44
33
|
export const DateAndRecurrenceInput = ({
|
|
45
34
|
isEventEditProductSet,
|
|
46
|
-
providerHasBookingManagement,
|
|
47
|
-
workHours,
|
|
48
|
-
isLoading,
|
|
49
35
|
}: DateAndRecurrenceInputProps) => {
|
|
50
36
|
const {
|
|
51
37
|
control,
|
|
@@ -56,9 +42,6 @@ export const DateAndRecurrenceInput = ({
|
|
|
56
42
|
clearErrors,
|
|
57
43
|
} = useFormContext<DateAndRecurrenceInputValues>();
|
|
58
44
|
|
|
59
|
-
const [availableTimes, setAvailableTimes] = useState<string[]>([]);
|
|
60
|
-
const availableTimesFormRef = useRef<AvailableTimesControlRef>();
|
|
61
|
-
|
|
62
45
|
const { fields, append, update, move } = useFieldArray({
|
|
63
46
|
name: "menuRecurrences",
|
|
64
47
|
control,
|
|
@@ -95,46 +78,13 @@ export const DateAndRecurrenceInput = ({
|
|
|
95
78
|
const { t } = useTranslation("Design");
|
|
96
79
|
|
|
97
80
|
// in this method we should fulfill the form with a proper data
|
|
98
|
-
const handleRecurringDateChange =
|
|
99
|
-
next: RecurringDatePickerInputValues
|
|
100
|
-
) => {
|
|
101
|
-
const isAvailableTimesFormValid =
|
|
102
|
-
await availableTimesFormRef.current?.trigger();
|
|
103
|
-
if (!isAvailableTimesFormValid) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
if (next?.startTime && next?.endTime) {
|
|
107
|
-
const startTime = DateTime.fromISO(next.startTime);
|
|
108
|
-
const endTime = DateTime.fromISO(next.endTime);
|
|
109
|
-
const { availableTimes } = availableTimesFormRef.current.getValues();
|
|
110
|
-
const validAvalilableTimes = availableTimes.every((time) => {
|
|
111
|
-
const currentAvailableTime = DateTime.fromFormat(time, TIME_FORMAT);
|
|
112
|
-
|
|
113
|
-
return (
|
|
114
|
-
currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
|
|
115
|
-
currentAvailableTime.diff(endTime, "minutes").minutes <= 0
|
|
116
|
-
);
|
|
117
|
-
});
|
|
118
|
-
if (!validAvalilableTimes) {
|
|
119
|
-
availableTimesFormRef.current.setError("availableTimes", {
|
|
120
|
-
message: t("Validation:fieldTimeBetween", {
|
|
121
|
-
attribute: t("Design:startTimesSmall"),
|
|
122
|
-
min: startTime.toFormat(TIME_FORMAT),
|
|
123
|
-
max: endTime.toFormat(TIME_FORMAT),
|
|
124
|
-
}),
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
81
|
+
const handleRecurringDateChange = (next: RecurringDatePickerInputValues) => {
|
|
131
82
|
const values = {
|
|
132
83
|
rrule: next.rrule,
|
|
133
84
|
startDate: next.startDate,
|
|
134
85
|
endDate: next.endDate,
|
|
135
86
|
startTime: next.startTime,
|
|
136
87
|
endTime: next.endTime,
|
|
137
|
-
...availableTimesFormRef.current.getValues(),
|
|
138
88
|
} as Partial<ProductSetRecurrence>;
|
|
139
89
|
|
|
140
90
|
if (editState.values?.id) {
|
|
@@ -157,7 +107,6 @@ export const DateAndRecurrenceInput = ({
|
|
|
157
107
|
// Hotfix for an issue with Popover close & open actions
|
|
158
108
|
setTimeout(() => {
|
|
159
109
|
setEditState({ index, values: next });
|
|
160
|
-
setAvailableTimes(next.availableTimes || []);
|
|
161
110
|
setIsDatePopoverVisible(() => true);
|
|
162
111
|
}, 100);
|
|
163
112
|
};
|
|
@@ -227,25 +176,7 @@ export const DateAndRecurrenceInput = ({
|
|
|
227
176
|
defaultValues={editState.values}
|
|
228
177
|
onChange={handleRecurringDateChange}
|
|
229
178
|
onDelete={handleDelete}
|
|
230
|
-
|
|
231
|
-
{providerHasBookingManagement && (
|
|
232
|
-
<AvailableTimesControl
|
|
233
|
-
workHours={workHours}
|
|
234
|
-
isLoading={isLoading}
|
|
235
|
-
defaultValues={availableTimes}
|
|
236
|
-
ref={availableTimesFormRef}
|
|
237
|
-
errorMessage={
|
|
238
|
-
errors?.menuRecurrences?.[`${editState?.index}`]
|
|
239
|
-
?.availableTimes?.message
|
|
240
|
-
}
|
|
241
|
-
clearErrorMessage={() =>
|
|
242
|
-
clearErrors(
|
|
243
|
-
`menuRecurrences.${editState?.index}.availableTimes`
|
|
244
|
-
)
|
|
245
|
-
}
|
|
246
|
-
/>
|
|
247
|
-
)}
|
|
248
|
-
</RecurringDatePickerInput>
|
|
179
|
+
/>
|
|
249
180
|
</Popover.Content>
|
|
250
181
|
</Popover>
|
|
251
182
|
}
|
|
@@ -270,10 +201,6 @@ export const DateAndRecurrenceInput = ({
|
|
|
270
201
|
key={menuRecurrence._id}
|
|
271
202
|
menuRecurrence={menuRecurrence}
|
|
272
203
|
onEdit={() => handleOnEdit(menuRecurrence, index)}
|
|
273
|
-
errorMessage={
|
|
274
|
-
errors?.menuRecurrences?.[`${index}`]?.availableTimes
|
|
275
|
-
?.message
|
|
276
|
-
}
|
|
277
204
|
/>
|
|
278
205
|
))}
|
|
279
206
|
</SortableContext>
|
|
@@ -67,6 +67,7 @@ Empty.args = {
|
|
|
67
67
|
type: "sale",
|
|
68
68
|
termsAndConditions: "",
|
|
69
69
|
operationalCost: OPERATIONAL_COST_CUSTOMER,
|
|
70
|
+
isDefault: false,
|
|
70
71
|
menuRecurrence: {
|
|
71
72
|
id: 38,
|
|
72
73
|
menuId: 257,
|
|
@@ -86,6 +87,7 @@ Default.args = {
|
|
|
86
87
|
type: "sale",
|
|
87
88
|
termsAndConditions: "",
|
|
88
89
|
operationalCost: OPERATIONAL_COST_CUSTOMER,
|
|
90
|
+
isDefault: true,
|
|
89
91
|
menuRecurrence: {
|
|
90
92
|
id: 38,
|
|
91
93
|
menuId: 257,
|
|
@@ -7,13 +7,8 @@ import {
|
|
|
7
7
|
OPERATIONAL_COST_CUSTOMER,
|
|
8
8
|
OPERATIONAL_COST_PROVIDER,
|
|
9
9
|
OPERATIONAL_COST_TYPES,
|
|
10
|
-
RELY_ON_PEOPLE_QUANTITY,
|
|
11
|
-
RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY,
|
|
12
|
-
RELY_ON_PEOPLE_PRODUCT_QUANTITY,
|
|
13
10
|
OperationalCostType,
|
|
14
11
|
ProductSetType,
|
|
15
|
-
RELY_ON_PEOPLE_TYPES,
|
|
16
|
-
RelyOnPeopleType,
|
|
17
12
|
} from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
18
13
|
import { useId } from "@react-aria/utils";
|
|
19
14
|
import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
|
|
@@ -21,7 +16,6 @@ import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/Email
|
|
|
21
16
|
import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper";
|
|
22
17
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
23
18
|
import { ruleForUrlWithProtocol } from "@licklist/plugins/dist/validation/Rules/urlRule";
|
|
24
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
25
19
|
import { WarningMessage } from "../../static";
|
|
26
20
|
import { SelectItem } from "../../types/generic/SelectItem";
|
|
27
21
|
import {
|
|
@@ -40,12 +34,6 @@ const OPERATIONAL_COST_TITLES = {
|
|
|
40
34
|
[OPERATIONAL_COST_CUSTOMER]: "operationalCostCustomer",
|
|
41
35
|
} as const;
|
|
42
36
|
|
|
43
|
-
const RELY_ON_PEOPLE_TYPE_TITLES = {
|
|
44
|
-
[RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY]: "peopleProductCapacityQuantity",
|
|
45
|
-
[RELY_ON_PEOPLE_PRODUCT_QUANTITY]: "peopleProductQuantity",
|
|
46
|
-
[RELY_ON_PEOPLE_QUANTITY]: "peopleQuantity",
|
|
47
|
-
};
|
|
48
|
-
|
|
49
37
|
export interface TemplateItem {
|
|
50
38
|
id: string;
|
|
51
39
|
value: EmailTemplate | SmsTemplate;
|
|
@@ -57,9 +45,9 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
|
|
|
57
45
|
type: ProductSetType;
|
|
58
46
|
termsAndConditions: string;
|
|
59
47
|
thankYouPageUrl: string;
|
|
48
|
+
isDefault: boolean;
|
|
60
49
|
operationalCost: OperationalCostType;
|
|
61
50
|
productGroups?: SelectItem[];
|
|
62
|
-
relyOnPeopleType?: RelyOnPeopleType | null;
|
|
63
51
|
fieldSetId?: number;
|
|
64
52
|
steps?: Step[];
|
|
65
53
|
emailTemplates?: TemplateItem[];
|
|
@@ -84,8 +72,6 @@ export interface ProductSetControlProps {
|
|
|
84
72
|
fieldSets?: FieldSet[];
|
|
85
73
|
showEmailTemplate?: boolean;
|
|
86
74
|
showSmsTemplate?: boolean;
|
|
87
|
-
workHours?: WorkHour[];
|
|
88
|
-
providerHasBookingManagement?: boolean;
|
|
89
75
|
}
|
|
90
76
|
|
|
91
77
|
export function ProductSetControl({
|
|
@@ -99,8 +85,6 @@ export function ProductSetControl({
|
|
|
99
85
|
isCreateAction,
|
|
100
86
|
showEmailTemplate,
|
|
101
87
|
showSmsTemplate,
|
|
102
|
-
workHours,
|
|
103
|
-
providerHasBookingManagement = false,
|
|
104
88
|
}: ProductSetControlProps) {
|
|
105
89
|
const { t } = useTranslation(["Design", "Validation", "Notification"]);
|
|
106
90
|
const {
|
|
@@ -116,7 +100,6 @@ export function ProductSetControl({
|
|
|
116
100
|
|
|
117
101
|
const nameId = useId();
|
|
118
102
|
const termsAndConditionsId = useId();
|
|
119
|
-
const relyOnPeopleTypeId = useId();
|
|
120
103
|
|
|
121
104
|
return (
|
|
122
105
|
<Row
|
|
@@ -162,9 +145,6 @@ export function ProductSetControl({
|
|
|
162
145
|
{isCreateAction && (
|
|
163
146
|
<DateAndRecurrenceInput
|
|
164
147
|
isEventEditProductSet={isEventEditProductSet}
|
|
165
|
-
workHours={workHours}
|
|
166
|
-
isLoading={isLoading}
|
|
167
|
-
providerHasBookingManagement={providerHasBookingManagement}
|
|
168
148
|
/>
|
|
169
149
|
)}
|
|
170
150
|
|
|
@@ -196,6 +176,15 @@ export function ProductSetControl({
|
|
|
196
176
|
</Form.Group>
|
|
197
177
|
)}
|
|
198
178
|
/> */}
|
|
179
|
+
{/* <Form.Check
|
|
180
|
+
{...register("isDefault")}
|
|
181
|
+
id="isDefaultId"
|
|
182
|
+
name="isDefault"
|
|
183
|
+
label={t("Design:setAsDraft")}
|
|
184
|
+
custom
|
|
185
|
+
className="is-default-checkbox"
|
|
186
|
+
disabled={isLoading}
|
|
187
|
+
/> */}
|
|
199
188
|
|
|
200
189
|
<Form.Group>
|
|
201
190
|
<Form.Label className="mb-0">
|
|
@@ -231,29 +220,6 @@ export function ProductSetControl({
|
|
|
231
220
|
</Form.Control>
|
|
232
221
|
</Form.Group>
|
|
233
222
|
|
|
234
|
-
<Form.Group controlId={relyOnPeopleTypeId}>
|
|
235
|
-
<Form.Label>{t("peopleQuantityType")}</Form.Label>
|
|
236
|
-
<Form.Control
|
|
237
|
-
{...register("relyOnPeopleType")}
|
|
238
|
-
as="select"
|
|
239
|
-
defaultValue={null}
|
|
240
|
-
>
|
|
241
|
-
<option value="">{t("notRequired")}</option>
|
|
242
|
-
{Object.keys(RELY_ON_PEOPLE_TYPES).map((relyOnPeopleType) => (
|
|
243
|
-
<option
|
|
244
|
-
value={RELY_ON_PEOPLE_TYPES[relyOnPeopleType]}
|
|
245
|
-
key={RELY_ON_PEOPLE_TYPES[relyOnPeopleType]}
|
|
246
|
-
>
|
|
247
|
-
{t(
|
|
248
|
-
RELY_ON_PEOPLE_TYPE_TITLES[
|
|
249
|
-
RELY_ON_PEOPLE_TYPES[relyOnPeopleType]
|
|
250
|
-
]
|
|
251
|
-
)}
|
|
252
|
-
</option>
|
|
253
|
-
))}
|
|
254
|
-
</Form.Control>
|
|
255
|
-
</Form.Group>
|
|
256
|
-
|
|
257
223
|
<Form.Group controlId={termsAndConditionsId}>
|
|
258
224
|
<Form.Label>{t("Design:termsAndConditions")}</Form.Label>
|
|
259
225
|
<Form.Control
|
|
@@ -11,13 +11,11 @@ import { Icon } from "../../static";
|
|
|
11
11
|
export interface ProductSetRecurrenceControlProps {
|
|
12
12
|
menuRecurrence?: { _id: string } & Partial<ProductSetRecurrence>;
|
|
13
13
|
onEdit?: (onEdit: Partial<ProductSetRecurrence>) => void;
|
|
14
|
-
errorMessage?: string;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export const ProductSetRecurrenceControl = ({
|
|
18
17
|
menuRecurrence,
|
|
19
18
|
onEdit,
|
|
20
|
-
errorMessage,
|
|
21
19
|
}: ProductSetRecurrenceControlProps) => {
|
|
22
20
|
const { formatDate } = useIntl();
|
|
23
21
|
const { t } = useTranslation("Design");
|
|
@@ -32,7 +30,7 @@ export const ProductSetRecurrenceControl = ({
|
|
|
32
30
|
|
|
33
31
|
return (
|
|
34
32
|
<div
|
|
35
|
-
className="sortable-tree-root
|
|
33
|
+
className="sortable-tree-root"
|
|
36
34
|
style={{
|
|
37
35
|
transform: CSS.Translate.toString(transform),
|
|
38
36
|
transition,
|
|
@@ -58,14 +56,10 @@ export const ProductSetRecurrenceControl = ({
|
|
|
58
56
|
{formatDate(menuRecurrence.startDate, {
|
|
59
57
|
dateStyle: "medium",
|
|
60
58
|
})}{" "}
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
dateStyle: "medium",
|
|
66
|
-
})}
|
|
67
|
-
</>
|
|
68
|
-
)}
|
|
59
|
+
-{" "}
|
|
60
|
+
{formatDate(menuRecurrence.endDate, {
|
|
61
|
+
dateStyle: "medium",
|
|
62
|
+
})}
|
|
69
63
|
</span>
|
|
70
64
|
|
|
71
65
|
<div
|
|
@@ -86,9 +80,6 @@ export const ProductSetRecurrenceControl = ({
|
|
|
86
80
|
{getHumanReadableDate(menuRecurrence)}
|
|
87
81
|
</span>
|
|
88
82
|
</div>
|
|
89
|
-
<div className={`manual-form-error ${!errorMessage && "d-none"}`}>
|
|
90
|
-
{errorMessage}
|
|
91
|
-
</div>
|
|
92
83
|
</div>
|
|
93
84
|
);
|
|
94
85
|
};
|
|
@@ -48,6 +48,7 @@ const getCategoryDefaultValue = (
|
|
|
48
48
|
maxSubItems: null,
|
|
49
49
|
quantityType: QUANTITY_TYPE_STANDARD,
|
|
50
50
|
type: categoryType,
|
|
51
|
+
isRelyOnPeople: categoryType === CATEGORY_TYPE_TICKETS,
|
|
51
52
|
isTimeRelated: false,
|
|
52
53
|
collectUserInfo: false,
|
|
53
54
|
hasTicket: categoryType === CATEGORY_TYPE_TICKETS,
|
|
@@ -71,7 +72,6 @@ export function ProductCategoriesControl({
|
|
|
71
72
|
providerHasMap,
|
|
72
73
|
expandedProductCategories,
|
|
73
74
|
setExpandedProductCategories,
|
|
74
|
-
zones,
|
|
75
75
|
} = useContext(ProductSetLoadingContext);
|
|
76
76
|
const form = useFormContext<ProductSetFormValues>();
|
|
77
77
|
const [isSelectCategoryVisible, setIsSelectCategoryVisible] = useState(false);
|
|
@@ -287,7 +287,6 @@ export function ProductCategoriesControl({
|
|
|
287
287
|
quantityType={productCategory.quantityType}
|
|
288
288
|
hasTicket={productCategory?.hasTicket}
|
|
289
289
|
stepIndex={stepIndex}
|
|
290
|
-
zones={zones}
|
|
291
290
|
productCategoryIndex={index}
|
|
292
291
|
categoryType={productCategory.type}
|
|
293
292
|
/>
|