@licklist/design 0.44.486-dev.7 → 0.44.486-dev.71
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/iframe/available.svg.js +1 -0
- package/dist/assets/iframe/limited.svg.js +1 -0
- package/dist/assets/iframe/soldOut.svg.js +1 -0
- package/dist/assets/logo/bookedit.svg +9 -11
- package/dist/assets/logo/bookedit.svg.js +1 -1
- package/dist/assets/logo/favicon.svg +12 -0
- package/dist/assets/logo/licklist.svg +0 -2
- package/dist/assets/logo/licklist.svg.js +1 -1
- package/dist/availability-indicator/AvailabilityIndicator.d.ts +9 -0
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -0
- package/dist/availability-indicator/AvailabilityIndicator.js +1 -0
- package/dist/availability-indicator/index.d.ts +2 -0
- package/dist/availability-indicator/index.d.ts.map +1 -0
- package/dist/calendar/Calendar.d.ts +21 -0
- package/dist/calendar/Calendar.d.ts.map +1 -0
- package/dist/calendar/Calendar.js +1 -0
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -0
- package/dist/calendar/components/CalendarButtons/index.d.ts.map +1 -0
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +5 -0
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -0
- package/dist/calendar/components/CalendarDates/index.d.ts.map +1 -0
- package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
- package/dist/calendar/components/CalendarSelect/CalendarSelect.js +1 -0
- package/dist/calendar/components/CalendarSelect/index.d.ts.map +1 -0
- package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
- package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
- package/dist/calendar/index.d.ts +4 -0
- package/dist/calendar/index.d.ts.map +1 -0
- package/dist/calendar/utils/index.d.ts +5 -0
- package/dist/calendar/utils/index.d.ts.map +1 -0
- package/dist/calendar/utils/index.js +1 -0
- package/dist/date-time-button/DateTimeButton.d.ts +7 -1
- 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 +29 -0
- 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-card/ActivityCard.d.ts +17 -0
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-card/ActivityCard.js +1 -0
- package/dist/iframe/activity-card/index.d.ts +2 -0
- package/dist/iframe/activity-card/index.d.ts.map +1 -0
- package/dist/iframe/event/index.d.ts +0 -2
- 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 +2 -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/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 +4 -1
- 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 +2 -1
- 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 +4 -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/order-process/constants.d.ts +1 -0
- 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 +7 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/types/index.js +1 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
- package/dist/index.d.ts +3 -0
- 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/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
- package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
- package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
- package/dist/number-of-people-input/components/index.d.ts +2 -0
- package/dist/number-of-people-input/components/index.d.ts.map +1 -0
- package/dist/number-of-people-input/index.d.ts +3 -0
- package/dist/number-of-people-input/index.d.ts.map +1 -0
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +5 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +6 -3
- 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 +2 -1
- 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 +3 -1
- 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 +3 -1
- 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 +2 -1
- 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 +0 -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/product-set/utils/index.d.ts +10 -0
- 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/components/FormGroupControll.d.ts +7 -0
- package/dist/provider/location-input/components/FormGroupControll.d.ts.map +1 -0
- package/dist/provider/location-input/components/FormGroupControll.js +1 -0
- package/dist/provider/location-input/components/index.d.ts +2 -0
- package/dist/provider/location-input/components/index.d.ts.map +1 -0
- package/dist/provider/location-input/index.d.ts +1 -0
- 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 +3 -1
- 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 +8 -1
- 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 +2 -1
- 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 +4 -1
- 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 +1 -0
- 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/filters/SaleFilters.d.ts +1 -0
- package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
- 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 +2 -1
- 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/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
- package/{src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → dist/styles/activity-card/ListActivitiesCard.scss} +2 -1
- package/dist/styles/activity-card/_index.scss +2 -0
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
- package/dist/styles/availability-indicator/_index.scss +1 -0
- package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
- package/dist/styles/date-time-button/_index.scss +1 -0
- package/dist/styles/events/EventCard.scss +12 -5
- package/dist/styles/form/CustomCheckbox.scss +6 -0
- package/dist/styles/header/Header.scss +0 -4
- package/dist/styles/iframe-events/Card.scss +1 -0
- package/dist/styles/notification/Notification.scss +4 -0
- package/dist/styles/packages.scss +3 -1
- package/dist/styles/resources-blocking/_index.scss +5 -0
- package/dist/styles/sales/BookingResults.scss +14 -6
- package/dist/styles/themes/bookedit/_index.scss +1 -0
- package/dist/styles/zones/ZoneForm.scss +3 -0
- package/dist/types/iframe.d.ts +1 -0
- 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 +2 -0
- 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/GameDurationControl.d.ts +7 -0
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
- package/dist/zone/form/components/GameDurationControl.js +1 -0
- 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 +9 -11
- package/src/assets/logo/favicon.svg +12 -0
- package/src/assets/logo/licklist.svg +0 -2
- package/src/availability-indicator/AvailabilityIndicator.tsx +59 -0
- package/src/availability-indicator/index.ts +1 -0
- package/src/calendar/Calendar.stories.tsx +33 -0
- package/src/calendar/Calendar.tsx +46 -0
- package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
- package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +24 -19
- package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
- package/src/calendar/index.ts +3 -0
- package/src/calendar/utils/index.ts +28 -0
- package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
- package/src/date-time-button/DateTimeButton.tsx +19 -22
- package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -12
- 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 +6 -2
- package/src/events/event-card/utils.ts +93 -16
- package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
- package/src/file-upload/FileUpload.tsx +3 -1
- package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
- package/src/iframe/activity-card/ActivityCard.tsx +77 -0
- package/src/iframe/activity-card/index.ts +1 -0
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -2
- package/src/iframe/event/index.ts +0 -7
- package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +8 -2
- package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -2
- package/src/iframe/index.ts +1 -3
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +4 -3
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -1
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +17 -8
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +1 -15
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +15 -29
- package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
- package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +62 -32
- package/src/iframe/order-process/constants.ts +1 -0
- package/src/iframe/page/Page.stories.tsx +2 -2
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
- package/src/iframe/payment/order-items-table/types/index.ts +18 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
- 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 +3 -0
- package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
- package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
- package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
- package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
- package/src/number-of-people-input/components/index.ts +1 -0
- package/src/number-of-people-input/index.ts +2 -0
- package/src/product-set/control/DateAndRecurrenceInput.tsx +75 -2
- package/src/product-set/control/ProductSetControl.stories.tsx +0 -2
- package/src/product-set/control/ProductSetControl.tsx +44 -10
- package/src/product-set/control/ProductSetRecurrenceControl.tsx +14 -5
- package/src/product-set/form/ProductCategoriesControl.tsx +2 -1
- package/src/product-set/form/ProductSetForm.stories.tsx +9 -12
- package/src/product-set/form/ProductSetForm.tsx +19 -3
- package/src/product-set/form/ProductsControl.tsx +10 -0
- package/src/product-set/product/ProductControl.tsx +28 -1
- package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
- package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +1 -30
- package/src/product-set/utils/index.ts +38 -0
- package/src/provider/location-input/LocationInput.tsx +21 -20
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/location-input/components/FormGroupControll.tsx +16 -0
- package/src/provider/location-input/components/index.ts +1 -0
- package/src/provider/location-input/index.ts +1 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +5 -13
- package/src/provider/venue-form/VenueForm.stories.tsx +24 -0
- package/src/provider/venue-form/VenueForm.tsx +55 -4
- package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
- package/src/recurrence-input/RecurrenceInput.tsx +12 -2
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -11
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +9 -0
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/sales/booking/results/BookingResults.stories.tsx +12 -7
- package/src/sales/booking/results/components/ResultCard.tsx +24 -3
- package/src/sales/coupon/control/CouponFormControl.tsx +5 -0
- package/src/sales/filters/SaleFilters.tsx +1 -0
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
- package/src/sales/source-of-sales/SourceOfSalesChart.tsx +31 -28
- package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
- package/src/static/RestrictedAccess.tsx +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +8 -1
- package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
- package/{dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → src/styles/activity-card/ListActivitiesCard.scss} +2 -1
- package/src/styles/activity-card/_index.scss +2 -0
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
- package/src/styles/availability-indicator/_index.scss +1 -0
- package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
- package/src/styles/date-time-button/_index.scss +1 -0
- package/src/styles/events/EventCard.scss +12 -5
- package/src/styles/form/CustomCheckbox.scss +6 -0
- package/src/styles/header/Header.scss +0 -4
- package/src/styles/iframe-events/Card.scss +1 -0
- package/src/styles/notification/Notification.scss +4 -0
- package/src/styles/packages.scss +3 -1
- package/src/styles/resources-blocking/_index.scss +5 -0
- package/src/styles/sales/BookingResults.scss +14 -6
- package/src/styles/themes/bookedit/_index.scss +1 -0
- package/src/styles/zones/ZoneForm.scss +3 -0
- package/src/types/iframe.ts +1 -0
- package/src/typings.d.ts +11 -0
- package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
- package/src/zone/form/ZoneForm.tsx +1 -2
- package/src/zone/form/components/AvailableTimesControl.tsx +89 -88
- package/src/zone/form/components/GameDurationControl.tsx +46 -0
- package/src/zone/form/components/ZoneControl.tsx +4 -5
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +3 -59
- package/src/zone/form/utils/dates.ts +29 -36
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
- package/dist/iframe/activity-cards/index.d.ts +0 -3
- package/dist/iframe/activity-cards/index.d.ts.map +0 -1
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
- package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/index.d.ts +0 -4
- package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
- package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
- package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/utils/index.js +0 -1
- package/dist/iframe/event/event-details/EventDetails.d.ts +0 -10
- package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
- package/dist/iframe/event/event-details/EventDetails.js +0 -1
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
- package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/index.d.ts +0 -2
- package/dist/iframe/event/event-details/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
- package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
- package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/routes.js +0 -1
- package/dist/styles/iframe-customers-journey/_index.scss +0 -3
- package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
- package/src/iframe/activity-cards/index.ts +0 -2
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
- package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
- package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
- package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
- package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
- package/src/iframe/event/event-calendar/index.ts +0 -6
- package/src/iframe/event/event-calendar/types/index.ts +0 -6
- package/src/iframe/event/event-calendar/utils/index.ts +0 -11
- package/src/iframe/event/event-details/EventDetails.stories.tsx +0 -187
- package/src/iframe/event/event-details/EventDetails.tsx +0 -92
- package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
- package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
- package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
- package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
- package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
- package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
- package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
- package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
- package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
- package/src/iframe/event/event-details/index.ts +0 -1
- package/src/iframe/event/event-details/utils/index.ts +0 -1
- package/src/iframe/event/event-details/utils/routes.ts +0 -6
- package/src/styles/iframe-customers-journey/_index.scss +0 -3
- /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
- /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
- /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
- /package/dist/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
- /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
- /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
- /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
|
@@ -48,7 +48,6 @@ const getCategoryDefaultValue = (
|
|
|
48
48
|
maxSubItems: null,
|
|
49
49
|
quantityType: QUANTITY_TYPE_STANDARD,
|
|
50
50
|
type: categoryType,
|
|
51
|
-
isRelyOnPeople: categoryType === CATEGORY_TYPE_TICKETS,
|
|
52
51
|
isTimeRelated: false,
|
|
53
52
|
collectUserInfo: false,
|
|
54
53
|
hasTicket: categoryType === CATEGORY_TYPE_TICKETS,
|
|
@@ -72,6 +71,7 @@ export function ProductCategoriesControl({
|
|
|
72
71
|
providerHasMap,
|
|
73
72
|
expandedProductCategories,
|
|
74
73
|
setExpandedProductCategories,
|
|
74
|
+
zones,
|
|
75
75
|
} = useContext(ProductSetLoadingContext);
|
|
76
76
|
const form = useFormContext<ProductSetFormValues>();
|
|
77
77
|
const [isSelectCategoryVisible, setIsSelectCategoryVisible] = useState(false);
|
|
@@ -287,6 +287,7 @@ export function ProductCategoriesControl({
|
|
|
287
287
|
quantityType={productCategory.quantityType}
|
|
288
288
|
hasTicket={productCategory?.hasTicket}
|
|
289
289
|
stepIndex={stepIndex}
|
|
290
|
+
zones={zones}
|
|
290
291
|
productCategoryIndex={index}
|
|
291
292
|
categoryType={productCategory.type}
|
|
292
293
|
/>
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
OPERATIONAL_COST_CUSTOMER,
|
|
13
13
|
OPERATIONAL_COST_PROVIDER,
|
|
14
|
+
RELY_ON_PEOPLE_PRODUCT_QUANTITY,
|
|
14
15
|
} from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
15
16
|
import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
|
|
16
17
|
import { ProductSetForm, ProductSetFormProps } from "./ProductSetForm";
|
|
@@ -22,13 +23,17 @@ export default {
|
|
|
22
23
|
export const Default: Story<ProductSetFormProps> = (args) => {
|
|
23
24
|
const providerHasMap = boolean("providerHasMap", true);
|
|
24
25
|
|
|
25
|
-
return
|
|
26
|
+
return (
|
|
27
|
+
<ProductSetForm {...args} providerHasMap={providerHasMap} isCreateAction />
|
|
28
|
+
);
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
export const Empty: Story<ProductSetFormProps> = (args) => {
|
|
29
32
|
const providerHasMap = boolean("providerHasMap", true);
|
|
30
33
|
|
|
31
|
-
return
|
|
34
|
+
return (
|
|
35
|
+
<ProductSetForm {...args} providerHasMap={providerHasMap} isCreateAction />
|
|
36
|
+
);
|
|
32
37
|
};
|
|
33
38
|
|
|
34
39
|
export const Valid: Story<ProductSetFormProps> = (args) => {
|
|
@@ -74,6 +79,7 @@ Default.args = {
|
|
|
74
79
|
{
|
|
75
80
|
createdAt: "2023-05-08T15:55:28.000+03:00",
|
|
76
81
|
deletedAt: null,
|
|
82
|
+
defaultDuration: 30,
|
|
77
83
|
description: "Zone description 2",
|
|
78
84
|
id: 2,
|
|
79
85
|
image: null,
|
|
@@ -101,8 +107,8 @@ Default.args = {
|
|
|
101
107
|
name: "Example",
|
|
102
108
|
type: "sale",
|
|
103
109
|
termsAndConditions: "",
|
|
104
|
-
isDefault: true,
|
|
105
110
|
operationalCost: OPERATIONAL_COST_CUSTOMER,
|
|
111
|
+
relyOnPeopleType: RELY_ON_PEOPLE_PRODUCT_QUANTITY,
|
|
106
112
|
steps: [
|
|
107
113
|
{
|
|
108
114
|
id: 1,
|
|
@@ -114,7 +120,6 @@ Default.args = {
|
|
|
114
120
|
minSubItems: 1,
|
|
115
121
|
maxSubItems: 10,
|
|
116
122
|
quantityType: "constant",
|
|
117
|
-
isRelyOnPeople: false,
|
|
118
123
|
isTimeRelated: false,
|
|
119
124
|
hasTicket: false,
|
|
120
125
|
allowDeposits: false,
|
|
@@ -183,7 +188,6 @@ Default.args = {
|
|
|
183
188
|
minSubItems: 0,
|
|
184
189
|
maxSubItems: 0,
|
|
185
190
|
quantityType: "recharging",
|
|
186
|
-
isRelyOnPeople: false,
|
|
187
191
|
isTimeRelated: false,
|
|
188
192
|
hasTicket: false,
|
|
189
193
|
allowDeposits: false,
|
|
@@ -202,7 +206,6 @@ Default.args = {
|
|
|
202
206
|
minSubItems: 0,
|
|
203
207
|
maxSubItems: 0,
|
|
204
208
|
quantityType: "recharging",
|
|
205
|
-
isRelyOnPeople: false,
|
|
206
209
|
isTimeRelated: false,
|
|
207
210
|
hasTicket: false,
|
|
208
211
|
allowDeposits: false,
|
|
@@ -288,7 +291,6 @@ Default.args = {
|
|
|
288
291
|
minSubItems: 0,
|
|
289
292
|
maxSubItems: null,
|
|
290
293
|
quantityType: "recharging",
|
|
291
|
-
isRelyOnPeople: false,
|
|
292
294
|
isTimeRelated: false,
|
|
293
295
|
hasTicket: false,
|
|
294
296
|
allowDeposits: false,
|
|
@@ -849,7 +851,6 @@ Empty.args = {
|
|
|
849
851
|
name: "Example",
|
|
850
852
|
type: "sale",
|
|
851
853
|
termsAndConditions: "",
|
|
852
|
-
isDefault: true,
|
|
853
854
|
operationalCost: OPERATIONAL_COST_PROVIDER,
|
|
854
855
|
steps: [],
|
|
855
856
|
},
|
|
@@ -862,7 +863,6 @@ ServerErrors.args = {
|
|
|
862
863
|
name: "",
|
|
863
864
|
type: "sale",
|
|
864
865
|
termsAndConditions: "",
|
|
865
|
-
isDefault: true,
|
|
866
866
|
operationalCost: OPERATIONAL_COST_PROVIDER,
|
|
867
867
|
steps: [],
|
|
868
868
|
},
|
|
@@ -876,7 +876,6 @@ Valid.args = {
|
|
|
876
876
|
name: "Example",
|
|
877
877
|
type: "sale",
|
|
878
878
|
termsAndConditions: "",
|
|
879
|
-
isDefault: true,
|
|
880
879
|
operationalCost: OPERATIONAL_COST_CUSTOMER,
|
|
881
880
|
menuRecurrences: [
|
|
882
881
|
{
|
|
@@ -897,7 +896,6 @@ Valid.args = {
|
|
|
897
896
|
minSubItems: 0,
|
|
898
897
|
maxSubItems: 0,
|
|
899
898
|
quantityType: "recharging",
|
|
900
|
-
isRelyOnPeople: false,
|
|
901
899
|
isTimeRelated: false,
|
|
902
900
|
hasTicket: false,
|
|
903
901
|
allowDeposits: false,
|
|
@@ -1112,7 +1110,6 @@ Valid.args = {
|
|
|
1112
1110
|
minSubItems: 0,
|
|
1113
1111
|
maxSubItems: 0,
|
|
1114
1112
|
quantityType: "recharging",
|
|
1115
|
-
isRelyOnPeople: false,
|
|
1116
1113
|
isTimeRelated: false,
|
|
1117
1114
|
hasTicket: false,
|
|
1118
1115
|
allowDeposits: false,
|
|
@@ -11,6 +11,7 @@ import { isEqual } from "lodash";
|
|
|
11
11
|
// eslint-disable-next-line max-len
|
|
12
12
|
import { ProviderBookingManagementSetting } from "@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper";
|
|
13
13
|
import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
|
|
14
|
+
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
14
15
|
import { Dialog, useDialogContext } from "../../modals/dialog";
|
|
15
16
|
import {
|
|
16
17
|
ProductSetControl,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
import { Step } from "../types";
|
|
21
22
|
import { ProductSetContextProvider, ProductSetLoadingContext } from "./context";
|
|
22
23
|
import { SelectItem } from "../../types/generic/SelectItem";
|
|
23
|
-
import { getFilteredTemplates } from "../utils";
|
|
24
|
+
import { checkAvailableTimesErrors, getFilteredTemplates } from "../utils";
|
|
24
25
|
|
|
25
26
|
export interface WithIsLoading {
|
|
26
27
|
isLoading: boolean;
|
|
@@ -49,6 +50,7 @@ export interface ProductSetFormProps
|
|
|
49
50
|
providerHasBookingManagement?: ProviderBookingManagementSetting["hasBookingManagement"];
|
|
50
51
|
zones?: Zone[] | null;
|
|
51
52
|
isCreateAction?: boolean;
|
|
53
|
+
workHours?: WorkHour[];
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export function ProductSetForm({
|
|
@@ -64,6 +66,7 @@ export function ProductSetForm({
|
|
|
64
66
|
providerHasBookingManagement,
|
|
65
67
|
zones,
|
|
66
68
|
isCreateAction,
|
|
69
|
+
workHours,
|
|
67
70
|
...shared
|
|
68
71
|
}: ProductSetFormProps) {
|
|
69
72
|
const { t } = useTranslation("Design");
|
|
@@ -83,6 +86,15 @@ export function ProductSetForm({
|
|
|
83
86
|
const { setError, reset } = form;
|
|
84
87
|
const formValues = form.watch();
|
|
85
88
|
|
|
89
|
+
const submitHandler = (onSubmit: (values: ProductSetFormValues) => void) => {
|
|
90
|
+
return (values: ProductSetFormValues) => {
|
|
91
|
+
if (checkAvailableTimesErrors({ values, setError, t })) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
onSubmit(values);
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
86
98
|
useEffect(() => {
|
|
87
99
|
if (!defaultValues || isEqual(defaultValues, formValues)) {
|
|
88
100
|
return;
|
|
@@ -127,7 +139,7 @@ export function ProductSetForm({
|
|
|
127
139
|
/>
|
|
128
140
|
|
|
129
141
|
<FormProvider {...form}>
|
|
130
|
-
<Form onSubmit={form.handleSubmit(onSubmitAndRedirect)}>
|
|
142
|
+
<Form onSubmit={form.handleSubmit(submitHandler(onSubmitAndRedirect))}>
|
|
131
143
|
<ProductSetLoadingContext.Consumer>
|
|
132
144
|
{({ isLoading: contextIsLoading }) => {
|
|
133
145
|
return (
|
|
@@ -147,6 +159,8 @@ export function ProductSetForm({
|
|
|
147
159
|
isLoading={isLoading}
|
|
148
160
|
isCreateAction={isCreateAction}
|
|
149
161
|
companyName={companyName}
|
|
162
|
+
workHours={workHours}
|
|
163
|
+
providerHasBookingManagement={providerHasBookingManagement}
|
|
150
164
|
/>
|
|
151
165
|
<Row>
|
|
152
166
|
<Col md={6} sm={12} />
|
|
@@ -158,7 +172,9 @@ export function ProductSetForm({
|
|
|
158
172
|
{onSubmitNoRedirect && (
|
|
159
173
|
<Button
|
|
160
174
|
className="product-set-save-btn mt-5 ml-5 d-no dne d-md-block"
|
|
161
|
-
onClick={form.handleSubmit(
|
|
175
|
+
onClick={form.handleSubmit(
|
|
176
|
+
submitHandler(onSubmitNoRedirect)
|
|
177
|
+
)}
|
|
162
178
|
disabled={
|
|
163
179
|
isLoading || contextIsLoading || !formValues.name
|
|
164
180
|
}
|
|
@@ -14,6 +14,7 @@ import { generateUuid } from "@licklist/core/dist/Services";
|
|
|
14
14
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
15
15
|
|
|
16
16
|
import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
17
|
+
import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
|
|
17
18
|
import { ProductControl, ProductControlProps, ProductSetFormValues } from "..";
|
|
18
19
|
import { SortableTree } from "../../sortable-tree";
|
|
19
20
|
import { CreateProductSetItem } from "../item/CreateProductSetItem";
|
|
@@ -32,6 +33,7 @@ interface ProductsControlProps extends WithIsLoading {
|
|
|
32
33
|
productCategoryIndex: number;
|
|
33
34
|
hasTicket?: boolean;
|
|
34
35
|
categoryType: CategoryType;
|
|
36
|
+
zones?: Zone[];
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
const getDefaultProductValue = (sort: number): Product => ({
|
|
@@ -74,6 +76,7 @@ export function ProductsControl({
|
|
|
74
76
|
productCategoryIndex,
|
|
75
77
|
hasTicket,
|
|
76
78
|
categoryType,
|
|
79
|
+
zones,
|
|
77
80
|
}: ProductsControlProps) {
|
|
78
81
|
const { t } = useTranslation("Design");
|
|
79
82
|
const form = useFormContext<ProductSetFormValues>();
|
|
@@ -89,6 +92,12 @@ export function ProductsControl({
|
|
|
89
92
|
getValues,
|
|
90
93
|
} = form;
|
|
91
94
|
|
|
95
|
+
const zoneId = watch(
|
|
96
|
+
`steps.${stepIndex}.productCategories.${productCategoryIndex}.zoneId`
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
const catergoryZone = zones?.find((zone) => zone.id === Number(zoneId));
|
|
100
|
+
|
|
92
101
|
const productControlFieldName =
|
|
93
102
|
`steps.${stepIndex}.productCategories.${productCategoryIndex}.products` as const;
|
|
94
103
|
|
|
@@ -245,6 +254,7 @@ export function ProductsControl({
|
|
|
245
254
|
onProductNameChange={onChange}
|
|
246
255
|
hasTicket={hasTicket}
|
|
247
256
|
categoryType={categoryType}
|
|
257
|
+
zoneDuration={catergoryZone?.defaultDuration}
|
|
248
258
|
/>
|
|
249
259
|
}
|
|
250
260
|
onDelete={() => onProductRemove(index)}
|
|
@@ -113,6 +113,7 @@ export interface ProductControlProps<T>
|
|
|
113
113
|
productName: string;
|
|
114
114
|
hasTicket?: boolean;
|
|
115
115
|
categoryType?: CategoryType;
|
|
116
|
+
zoneDuration?: number;
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
export function ProductControl<T extends FormValues>({
|
|
@@ -126,6 +127,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
126
127
|
productName,
|
|
127
128
|
hasTicket,
|
|
128
129
|
categoryType,
|
|
130
|
+
zoneDuration,
|
|
129
131
|
}: ProductControlProps<T>) {
|
|
130
132
|
const {
|
|
131
133
|
register,
|
|
@@ -190,6 +192,16 @@ export function ProductControl<T extends FormValues>({
|
|
|
190
192
|
[handleImageUploading]
|
|
191
193
|
);
|
|
192
194
|
|
|
195
|
+
const onChangeGameCapacity = (value: number) => {
|
|
196
|
+
if (!zoneDuration) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
setValue(
|
|
200
|
+
`${fieldNamePrefix}.duration` as Path<T>,
|
|
201
|
+
(value * zoneDuration) as UnpackNestedValue<PathValue<T, Path<T>>>
|
|
202
|
+
);
|
|
203
|
+
};
|
|
204
|
+
|
|
193
205
|
const onImageRemove = useCallback(
|
|
194
206
|
(id, path) => {
|
|
195
207
|
handleImageRemove(String(id), path);
|
|
@@ -372,6 +384,14 @@ export function ProductControl<T extends FormValues>({
|
|
|
372
384
|
<FormNumberInput
|
|
373
385
|
fieldName={`${fieldNamePrefix}.capacity`}
|
|
374
386
|
label={t("capacity")}
|
|
387
|
+
rules={{
|
|
388
|
+
min: {
|
|
389
|
+
value: 1,
|
|
390
|
+
message: t("Validation:fieldRequired", {
|
|
391
|
+
attribute: t("capacity"),
|
|
392
|
+
}) as string,
|
|
393
|
+
},
|
|
394
|
+
}}
|
|
375
395
|
/>
|
|
376
396
|
</Col>
|
|
377
397
|
</Row>
|
|
@@ -383,7 +403,11 @@ export function ProductControl<T extends FormValues>({
|
|
|
383
403
|
<FormNumberInput
|
|
384
404
|
fieldName={`${fieldNamePrefix}.capacity`}
|
|
385
405
|
label={t("capacity")}
|
|
406
|
+
onChange={onChangeGameCapacity}
|
|
386
407
|
rules={{
|
|
408
|
+
required: t("Validation:fieldRequired", {
|
|
409
|
+
attribute: t("capacity"),
|
|
410
|
+
}) as string,
|
|
387
411
|
min: {
|
|
388
412
|
value: 1,
|
|
389
413
|
message: t("Validation:fieldRequired", {
|
|
@@ -398,10 +422,13 @@ export function ProductControl<T extends FormValues>({
|
|
|
398
422
|
fieldName={`${fieldNamePrefix}.duration`}
|
|
399
423
|
label={t("durationMinutes")}
|
|
400
424
|
rules={{
|
|
425
|
+
required: t("Validation:fieldRequired", {
|
|
426
|
+
attribute: t("capacity"),
|
|
427
|
+
}) as string,
|
|
401
428
|
min: {
|
|
402
429
|
value: 1,
|
|
403
430
|
message: t("Validation:fieldRequired", {
|
|
404
|
-
attribute: t("
|
|
431
|
+
attribute: t("capacity"),
|
|
405
432
|
}) as string,
|
|
406
433
|
},
|
|
407
434
|
}}
|
|
@@ -28,7 +28,6 @@ export interface ProductCategoryControlValues extends FormValues {
|
|
|
28
28
|
maxSubItems: number | null;
|
|
29
29
|
quantityType: QuantityType;
|
|
30
30
|
type: CategoryType;
|
|
31
|
-
isRelyOnPeople: boolean;
|
|
32
31
|
isTimeRelated: boolean;
|
|
33
32
|
collectUserInfo: boolean;
|
|
34
33
|
hasTicket: boolean;
|
|
@@ -97,7 +96,6 @@ export function ProductCategoryControl({
|
|
|
97
96
|
const minSubItemsId = useId();
|
|
98
97
|
const maxSubItemsId = useId();
|
|
99
98
|
const quantityType = useId();
|
|
100
|
-
const isRelyOnPeopleId = useId();
|
|
101
99
|
const isTimeRelatedId = useId();
|
|
102
100
|
const collectUserInfoId = useId();
|
|
103
101
|
const hasTicketId = useId();
|
|
@@ -332,7 +330,7 @@ export function ProductCategoryControl({
|
|
|
332
330
|
<Row>
|
|
333
331
|
<Col>
|
|
334
332
|
<Form.Group controlId={zoneId}>
|
|
335
|
-
<Form.Label>
|
|
333
|
+
<Form.Label>{t("Design:zone")}</Form.Label>
|
|
336
334
|
<Controller
|
|
337
335
|
control={control}
|
|
338
336
|
name={`${fieldNamePrefix}.zoneId`}
|
|
@@ -360,12 +358,6 @@ export function ProductCategoryControl({
|
|
|
360
358
|
attribute: t("zone"),
|
|
361
359
|
}),
|
|
362
360
|
},
|
|
363
|
-
validate: (value) => {
|
|
364
|
-
if (value) return true;
|
|
365
|
-
return t("Validation:fieldRequired", {
|
|
366
|
-
attribute: t("zone"),
|
|
367
|
-
}) as string;
|
|
368
|
-
},
|
|
369
361
|
}}
|
|
370
362
|
/>
|
|
371
363
|
<Form.Control.Feedback type="invalid">
|
|
@@ -470,27 +462,6 @@ export function ProductCategoryControl({
|
|
|
470
462
|
</Form.Group>
|
|
471
463
|
)}
|
|
472
464
|
|
|
473
|
-
<Form.Group
|
|
474
|
-
controlId={isRelyOnPeopleId}
|
|
475
|
-
className="advanced-switch-container"
|
|
476
|
-
>
|
|
477
|
-
<Form.Label>{t("isRelyOnPeople")}</Form.Label>
|
|
478
|
-
|
|
479
|
-
<div>
|
|
480
|
-
<Controller
|
|
481
|
-
render={({ field: { name, value, onChange } }) => (
|
|
482
|
-
<BooleanSwitch
|
|
483
|
-
name={name}
|
|
484
|
-
value={Boolean(value)}
|
|
485
|
-
onChange={onChange}
|
|
486
|
-
disabled={isLoading || category.hasTicket}
|
|
487
|
-
/>
|
|
488
|
-
)}
|
|
489
|
-
control={control}
|
|
490
|
-
name={`${fieldNamePrefix}.isRelyOnPeople` as const}
|
|
491
|
-
/>
|
|
492
|
-
</div>
|
|
493
|
-
</Form.Group>
|
|
494
465
|
{!category.hasTicket && (
|
|
495
466
|
<Form.Group
|
|
496
467
|
controlId={isTimeRelatedId}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper";
|
|
2
2
|
import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper";
|
|
3
|
+
import { TFunction } from "i18next";
|
|
4
|
+
import { UseFormSetError } from "react-hook-form";
|
|
3
5
|
import { TemplateItem } from "../control/ProductSetControl";
|
|
6
|
+
import { ProductSetFormValues } from "../form/ProductSetForm";
|
|
7
|
+
|
|
8
|
+
interface CheckAvailableTimesErrors {
|
|
9
|
+
values: ProductSetFormValues;
|
|
10
|
+
setError: UseFormSetError<ProductSetFormValues>;
|
|
11
|
+
t: TFunction;
|
|
12
|
+
}
|
|
4
13
|
|
|
5
14
|
export const moveArrayElements = <T>(
|
|
6
15
|
array: T[],
|
|
@@ -42,3 +51,32 @@ export const getFilteredTemplates = (
|
|
|
42
51
|
label: template?.notification?.name,
|
|
43
52
|
}));
|
|
44
53
|
};
|
|
54
|
+
|
|
55
|
+
export const checkAvailableTimesErrors = ({
|
|
56
|
+
values,
|
|
57
|
+
setError,
|
|
58
|
+
t,
|
|
59
|
+
}: CheckAvailableTimesErrors) => {
|
|
60
|
+
let hasError = false;
|
|
61
|
+
|
|
62
|
+
const hasCategoryWithZone = values?.steps?.some(
|
|
63
|
+
(step) => !!step?.productCategories.some((category) => !!category?.zoneId)
|
|
64
|
+
);
|
|
65
|
+
if (!hasCategoryWithZone) {
|
|
66
|
+
return hasError;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
values?.menuRecurrences?.forEach((recurrence, index: number) => {
|
|
70
|
+
if (!recurrence?.availableTimes?.length) {
|
|
71
|
+
hasError = true;
|
|
72
|
+
setError(`menuRecurrences.${index}.availableTimes` as const, {
|
|
73
|
+
type: "validate",
|
|
74
|
+
message: t("Validation:fieldMinNumber", {
|
|
75
|
+
attribute: t("startTimes"),
|
|
76
|
+
min: 1,
|
|
77
|
+
}),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return hasError;
|
|
82
|
+
};
|
|
@@ -5,6 +5,7 @@ import { useFormContext } from "react-hook-form";
|
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import CountryCodeSelect from "../../static/CountryCodeSelect";
|
|
7
7
|
import { LocationInputValues } from ".";
|
|
8
|
+
import { FormGroupControll } from "./components";
|
|
8
9
|
|
|
9
10
|
export function LocationInput() {
|
|
10
11
|
const {
|
|
@@ -13,32 +14,32 @@ export function LocationInput() {
|
|
|
13
14
|
} = useFormContext<LocationInputValues>();
|
|
14
15
|
const { t } = useTranslation("Design");
|
|
15
16
|
|
|
16
|
-
const addressId = useId();
|
|
17
|
-
const cityId = useId();
|
|
18
|
-
const stateId = useId();
|
|
19
|
-
const postcodeId = useId();
|
|
20
17
|
const countryId = useId();
|
|
21
18
|
|
|
22
19
|
return (
|
|
23
20
|
<>
|
|
24
21
|
<input {...register("location.latitude")} type="hidden" />
|
|
25
22
|
<input {...register("location.longitude")} type="hidden" />
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
23
|
+
<FormGroupControll
|
|
24
|
+
error={errors?.location?.street}
|
|
25
|
+
name="location.street"
|
|
26
|
+
label={t("locationStreet")}
|
|
27
|
+
/>
|
|
28
|
+
<FormGroupControll
|
|
29
|
+
error={errors?.location?.city}
|
|
30
|
+
name="location.city"
|
|
31
|
+
label={t("locationCity")}
|
|
32
|
+
/>
|
|
33
|
+
<FormGroupControll
|
|
34
|
+
error={errors?.location?.state}
|
|
35
|
+
name="location.state"
|
|
36
|
+
label={t("locationState")}
|
|
37
|
+
/>
|
|
38
|
+
<FormGroupControll
|
|
39
|
+
error={errors?.location?.postcode}
|
|
40
|
+
name="location.postcode"
|
|
41
|
+
label={t("locationPostcode")}
|
|
42
|
+
/>
|
|
42
43
|
<Form.Group controlId={countryId}>
|
|
43
44
|
<Form.Label>{t("locationCountry")}</Form.Label>
|
|
44
45
|
<CountryCodeSelect
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
2
|
import { useFormContext } from "react-hook-form";
|
|
3
3
|
import en from "react-phone-number-input/locale/en.json";
|
|
4
4
|
import { LocationInputValues } from ".";
|
|
@@ -13,7 +13,7 @@ export function LocationInputDescription() {
|
|
|
13
13
|
"postcode",
|
|
14
14
|
"country",
|
|
15
15
|
] as const;
|
|
16
|
-
const fields = fieldNames.reduce<
|
|
16
|
+
const fields = fieldNames.reduce<ReactElement[]>((acc, field) => {
|
|
17
17
|
const value = values?.[field];
|
|
18
18
|
if (!value) return acc;
|
|
19
19
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Form } from "react-bootstrap";
|
|
3
|
+
import { useFormContext } from "react-hook-form";
|
|
4
|
+
|
|
5
|
+
export const FormGroupControll = ({ name, label, error }) => {
|
|
6
|
+
const { register } = useFormContext();
|
|
7
|
+
return (
|
|
8
|
+
<Form.Group>
|
|
9
|
+
<Form.Label>{label}</Form.Label>
|
|
10
|
+
<Form.Control {...register(name)} isInvalid={!!error} />
|
|
11
|
+
<Form.Control.Feedback type="invalid">
|
|
12
|
+
{error?.message}
|
|
13
|
+
</Form.Control.Feedback>
|
|
14
|
+
</Form.Group>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FormGroupControll";
|
|
@@ -4,7 +4,6 @@ import { useFormContext } from "react-hook-form";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { useId } from "@react-aria/utils";
|
|
6
6
|
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
7
|
-
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
8
7
|
import { Typeahead, TypeaheadOptions } from "../../typeahead";
|
|
9
8
|
import { MAX_DESCRIPTION_CHARACTERS_LENGTH } from "../constants";
|
|
10
9
|
import {
|
|
@@ -70,8 +69,7 @@ export function ProviderDetailsInput({
|
|
|
70
69
|
isInvalid={Boolean(errors.name)}
|
|
71
70
|
/>
|
|
72
71
|
<Form.Control.Feedback type="invalid">
|
|
73
|
-
{
|
|
74
|
-
errors.name?.message}
|
|
72
|
+
{errors.name?.message}
|
|
75
73
|
</Form.Control.Feedback>
|
|
76
74
|
</Form.Group>
|
|
77
75
|
|
|
@@ -95,8 +93,7 @@ export function ProviderDetailsInput({
|
|
|
95
93
|
isInvalid={Boolean(errors.description)}
|
|
96
94
|
/>
|
|
97
95
|
<Form.Control.Feedback type="invalid">
|
|
98
|
-
{
|
|
99
|
-
errors.description?.message}
|
|
96
|
+
{errors.description?.message}
|
|
100
97
|
</Form.Control.Feedback>
|
|
101
98
|
</Form.Group>
|
|
102
99
|
|
|
@@ -120,10 +117,7 @@ export function ProviderDetailsInput({
|
|
|
120
117
|
isInvalid={Boolean(errors.email)}
|
|
121
118
|
/>
|
|
122
119
|
<Form.Control.Feedback type="invalid">
|
|
123
|
-
{
|
|
124
|
-
errors.email?.message}
|
|
125
|
-
{HookFormService.hasError(errors.email, "pattern") &&
|
|
126
|
-
errors.email?.message}
|
|
120
|
+
{errors.email?.message}
|
|
127
121
|
</Form.Control.Feedback>
|
|
128
122
|
</Form.Group>
|
|
129
123
|
|
|
@@ -141,8 +135,7 @@ export function ProviderDetailsInput({
|
|
|
141
135
|
isInvalid={Boolean(errors.phone)}
|
|
142
136
|
/>
|
|
143
137
|
<Form.Control.Feedback type="invalid">
|
|
144
|
-
{
|
|
145
|
-
errors.phone?.message}
|
|
138
|
+
{errors.phone?.message}
|
|
146
139
|
</Form.Control.Feedback>
|
|
147
140
|
</Form.Group>
|
|
148
141
|
|
|
@@ -163,8 +156,7 @@ export function ProviderDetailsInput({
|
|
|
163
156
|
isInvalid={Boolean(errors.website)}
|
|
164
157
|
/>
|
|
165
158
|
<Form.Control.Feedback type="invalid">
|
|
166
|
-
{
|
|
167
|
-
errors.website?.message}
|
|
159
|
+
{errors.website?.message}
|
|
168
160
|
</Form.Control.Feedback>
|
|
169
161
|
</Form.Group>
|
|
170
162
|
{/* If admin has only 1 company - he dont need to set up it */}
|
|
@@ -11,6 +11,29 @@ const categories = Array.from({ length: 6 }, (_, i) => ({
|
|
|
11
11
|
}),
|
|
12
12
|
}));
|
|
13
13
|
|
|
14
|
+
const errorResponse = {
|
|
15
|
+
name: ["The name field is required."],
|
|
16
|
+
email: ["The email field is required."],
|
|
17
|
+
phone: ["The phone field is required."],
|
|
18
|
+
website: ["The website must be a string."],
|
|
19
|
+
description: ["The description must be a string."],
|
|
20
|
+
"location.street": ["The location.street must be a string."],
|
|
21
|
+
"location.city": ["The location.city must be a string."],
|
|
22
|
+
"location.state": ["The location.state must be a string."],
|
|
23
|
+
"location.country": [
|
|
24
|
+
"The location.country must be a string.",
|
|
25
|
+
"Invalid ISO3166-A2 country code.",
|
|
26
|
+
],
|
|
27
|
+
"categories.0": [
|
|
28
|
+
"The categories.0 must be an integer.",
|
|
29
|
+
"The categories.0 must be between 0 and 20 digits.",
|
|
30
|
+
],
|
|
31
|
+
"categories.1": [
|
|
32
|
+
"The categories.1 must be an integer.",
|
|
33
|
+
"The categories.1 must be between 0 and 20 digits.",
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
|
|
14
37
|
const defaultValues: VenueFormValues = {
|
|
15
38
|
name: "Sample provider",
|
|
16
39
|
description: "Description",
|
|
@@ -58,4 +81,5 @@ WithDefaultValues.args = {
|
|
|
58
81
|
defaultValues,
|
|
59
82
|
categories,
|
|
60
83
|
linkTypes,
|
|
84
|
+
errorResponse,
|
|
61
85
|
};
|