@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
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
OPERATIONAL_COST_CUSTOMER,
|
|
13
13
|
OPERATIONAL_COST_PROVIDER,
|
|
14
|
-
RELY_ON_PEOPLE_PRODUCT_QUANTITY,
|
|
15
14
|
} from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
16
15
|
import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
|
|
17
16
|
import { ProductSetForm, ProductSetFormProps } from "./ProductSetForm";
|
|
@@ -23,17 +22,13 @@ export default {
|
|
|
23
22
|
export const Default: Story<ProductSetFormProps> = (args) => {
|
|
24
23
|
const providerHasMap = boolean("providerHasMap", true);
|
|
25
24
|
|
|
26
|
-
return
|
|
27
|
-
<ProductSetForm {...args} providerHasMap={providerHasMap} isCreateAction />
|
|
28
|
-
);
|
|
25
|
+
return <ProductSetForm {...args} providerHasMap={providerHasMap} />;
|
|
29
26
|
};
|
|
30
27
|
|
|
31
28
|
export const Empty: Story<ProductSetFormProps> = (args) => {
|
|
32
29
|
const providerHasMap = boolean("providerHasMap", true);
|
|
33
30
|
|
|
34
|
-
return
|
|
35
|
-
<ProductSetForm {...args} providerHasMap={providerHasMap} isCreateAction />
|
|
36
|
-
);
|
|
31
|
+
return <ProductSetForm {...args} providerHasMap={providerHasMap} />;
|
|
37
32
|
};
|
|
38
33
|
|
|
39
34
|
export const Valid: Story<ProductSetFormProps> = (args) => {
|
|
@@ -79,7 +74,6 @@ Default.args = {
|
|
|
79
74
|
{
|
|
80
75
|
createdAt: "2023-05-08T15:55:28.000+03:00",
|
|
81
76
|
deletedAt: null,
|
|
82
|
-
defaultDuration: 30,
|
|
83
77
|
description: "Zone description 2",
|
|
84
78
|
id: 2,
|
|
85
79
|
image: null,
|
|
@@ -107,8 +101,8 @@ Default.args = {
|
|
|
107
101
|
name: "Example",
|
|
108
102
|
type: "sale",
|
|
109
103
|
termsAndConditions: "",
|
|
104
|
+
isDefault: true,
|
|
110
105
|
operationalCost: OPERATIONAL_COST_CUSTOMER,
|
|
111
|
-
relyOnPeopleType: RELY_ON_PEOPLE_PRODUCT_QUANTITY,
|
|
112
106
|
steps: [
|
|
113
107
|
{
|
|
114
108
|
id: 1,
|
|
@@ -120,6 +114,7 @@ Default.args = {
|
|
|
120
114
|
minSubItems: 1,
|
|
121
115
|
maxSubItems: 10,
|
|
122
116
|
quantityType: "constant",
|
|
117
|
+
isRelyOnPeople: false,
|
|
123
118
|
isTimeRelated: false,
|
|
124
119
|
hasTicket: false,
|
|
125
120
|
allowDeposits: false,
|
|
@@ -188,6 +183,7 @@ Default.args = {
|
|
|
188
183
|
minSubItems: 0,
|
|
189
184
|
maxSubItems: 0,
|
|
190
185
|
quantityType: "recharging",
|
|
186
|
+
isRelyOnPeople: false,
|
|
191
187
|
isTimeRelated: false,
|
|
192
188
|
hasTicket: false,
|
|
193
189
|
allowDeposits: false,
|
|
@@ -206,6 +202,7 @@ Default.args = {
|
|
|
206
202
|
minSubItems: 0,
|
|
207
203
|
maxSubItems: 0,
|
|
208
204
|
quantityType: "recharging",
|
|
205
|
+
isRelyOnPeople: false,
|
|
209
206
|
isTimeRelated: false,
|
|
210
207
|
hasTicket: false,
|
|
211
208
|
allowDeposits: false,
|
|
@@ -291,6 +288,7 @@ Default.args = {
|
|
|
291
288
|
minSubItems: 0,
|
|
292
289
|
maxSubItems: null,
|
|
293
290
|
quantityType: "recharging",
|
|
291
|
+
isRelyOnPeople: false,
|
|
294
292
|
isTimeRelated: false,
|
|
295
293
|
hasTicket: false,
|
|
296
294
|
allowDeposits: false,
|
|
@@ -851,6 +849,7 @@ Empty.args = {
|
|
|
851
849
|
name: "Example",
|
|
852
850
|
type: "sale",
|
|
853
851
|
termsAndConditions: "",
|
|
852
|
+
isDefault: true,
|
|
854
853
|
operationalCost: OPERATIONAL_COST_PROVIDER,
|
|
855
854
|
steps: [],
|
|
856
855
|
},
|
|
@@ -863,6 +862,7 @@ ServerErrors.args = {
|
|
|
863
862
|
name: "",
|
|
864
863
|
type: "sale",
|
|
865
864
|
termsAndConditions: "",
|
|
865
|
+
isDefault: true,
|
|
866
866
|
operationalCost: OPERATIONAL_COST_PROVIDER,
|
|
867
867
|
steps: [],
|
|
868
868
|
},
|
|
@@ -876,6 +876,7 @@ Valid.args = {
|
|
|
876
876
|
name: "Example",
|
|
877
877
|
type: "sale",
|
|
878
878
|
termsAndConditions: "",
|
|
879
|
+
isDefault: true,
|
|
879
880
|
operationalCost: OPERATIONAL_COST_CUSTOMER,
|
|
880
881
|
menuRecurrences: [
|
|
881
882
|
{
|
|
@@ -896,6 +897,7 @@ Valid.args = {
|
|
|
896
897
|
minSubItems: 0,
|
|
897
898
|
maxSubItems: 0,
|
|
898
899
|
quantityType: "recharging",
|
|
900
|
+
isRelyOnPeople: false,
|
|
899
901
|
isTimeRelated: false,
|
|
900
902
|
hasTicket: false,
|
|
901
903
|
allowDeposits: false,
|
|
@@ -1110,6 +1112,7 @@ Valid.args = {
|
|
|
1110
1112
|
minSubItems: 0,
|
|
1111
1113
|
maxSubItems: 0,
|
|
1112
1114
|
quantityType: "recharging",
|
|
1115
|
+
isRelyOnPeople: false,
|
|
1113
1116
|
isTimeRelated: false,
|
|
1114
1117
|
hasTicket: false,
|
|
1115
1118
|
allowDeposits: false,
|
|
@@ -11,7 +11,6 @@ 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";
|
|
15
14
|
import { Dialog, useDialogContext } from "../../modals/dialog";
|
|
16
15
|
import {
|
|
17
16
|
ProductSetControl,
|
|
@@ -21,7 +20,7 @@ import {
|
|
|
21
20
|
import { Step } from "../types";
|
|
22
21
|
import { ProductSetContextProvider, ProductSetLoadingContext } from "./context";
|
|
23
22
|
import { SelectItem } from "../../types/generic/SelectItem";
|
|
24
|
-
import {
|
|
23
|
+
import { getFilteredTemplates } from "../utils";
|
|
25
24
|
|
|
26
25
|
export interface WithIsLoading {
|
|
27
26
|
isLoading: boolean;
|
|
@@ -50,7 +49,6 @@ export interface ProductSetFormProps
|
|
|
50
49
|
providerHasBookingManagement?: ProviderBookingManagementSetting["hasBookingManagement"];
|
|
51
50
|
zones?: Zone[] | null;
|
|
52
51
|
isCreateAction?: boolean;
|
|
53
|
-
workHours?: WorkHour[];
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
export function ProductSetForm({
|
|
@@ -66,7 +64,6 @@ export function ProductSetForm({
|
|
|
66
64
|
providerHasBookingManagement,
|
|
67
65
|
zones,
|
|
68
66
|
isCreateAction,
|
|
69
|
-
workHours,
|
|
70
67
|
...shared
|
|
71
68
|
}: ProductSetFormProps) {
|
|
72
69
|
const { t } = useTranslation("Design");
|
|
@@ -86,15 +83,6 @@ export function ProductSetForm({
|
|
|
86
83
|
const { setError, reset } = form;
|
|
87
84
|
const formValues = form.watch();
|
|
88
85
|
|
|
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
|
-
|
|
98
86
|
useEffect(() => {
|
|
99
87
|
if (!defaultValues || isEqual(defaultValues, formValues)) {
|
|
100
88
|
return;
|
|
@@ -139,7 +127,7 @@ export function ProductSetForm({
|
|
|
139
127
|
/>
|
|
140
128
|
|
|
141
129
|
<FormProvider {...form}>
|
|
142
|
-
<Form onSubmit={form.handleSubmit(
|
|
130
|
+
<Form onSubmit={form.handleSubmit(onSubmitAndRedirect)}>
|
|
143
131
|
<ProductSetLoadingContext.Consumer>
|
|
144
132
|
{({ isLoading: contextIsLoading }) => {
|
|
145
133
|
return (
|
|
@@ -159,8 +147,6 @@ export function ProductSetForm({
|
|
|
159
147
|
isLoading={isLoading}
|
|
160
148
|
isCreateAction={isCreateAction}
|
|
161
149
|
companyName={companyName}
|
|
162
|
-
workHours={workHours}
|
|
163
|
-
providerHasBookingManagement={providerHasBookingManagement}
|
|
164
150
|
/>
|
|
165
151
|
<Row>
|
|
166
152
|
<Col md={6} sm={12} />
|
|
@@ -172,9 +158,7 @@ export function ProductSetForm({
|
|
|
172
158
|
{onSubmitNoRedirect && (
|
|
173
159
|
<Button
|
|
174
160
|
className="product-set-save-btn mt-5 ml-5 d-no dne d-md-block"
|
|
175
|
-
onClick={form.handleSubmit(
|
|
176
|
-
submitHandler(onSubmitNoRedirect)
|
|
177
|
-
)}
|
|
161
|
+
onClick={form.handleSubmit(onSubmitNoRedirect)}
|
|
178
162
|
disabled={
|
|
179
163
|
isLoading || contextIsLoading || !formValues.name
|
|
180
164
|
}
|
|
@@ -14,7 +14,6 @@ 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";
|
|
18
17
|
import { ProductControl, ProductControlProps, ProductSetFormValues } from "..";
|
|
19
18
|
import { SortableTree } from "../../sortable-tree";
|
|
20
19
|
import { CreateProductSetItem } from "../item/CreateProductSetItem";
|
|
@@ -33,7 +32,6 @@ interface ProductsControlProps extends WithIsLoading {
|
|
|
33
32
|
productCategoryIndex: number;
|
|
34
33
|
hasTicket?: boolean;
|
|
35
34
|
categoryType: CategoryType;
|
|
36
|
-
zones?: Zone[];
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
const getDefaultProductValue = (sort: number): Product => ({
|
|
@@ -76,7 +74,6 @@ export function ProductsControl({
|
|
|
76
74
|
productCategoryIndex,
|
|
77
75
|
hasTicket,
|
|
78
76
|
categoryType,
|
|
79
|
-
zones,
|
|
80
77
|
}: ProductsControlProps) {
|
|
81
78
|
const { t } = useTranslation("Design");
|
|
82
79
|
const form = useFormContext<ProductSetFormValues>();
|
|
@@ -92,12 +89,6 @@ export function ProductsControl({
|
|
|
92
89
|
getValues,
|
|
93
90
|
} = form;
|
|
94
91
|
|
|
95
|
-
const zoneId = watch(
|
|
96
|
-
`steps.${stepIndex}.productCategories.${productCategoryIndex}.zoneId`
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
const catergoryZone = zones?.find((zone) => zone.id === Number(zoneId));
|
|
100
|
-
|
|
101
92
|
const productControlFieldName =
|
|
102
93
|
`steps.${stepIndex}.productCategories.${productCategoryIndex}.products` as const;
|
|
103
94
|
|
|
@@ -254,7 +245,6 @@ export function ProductsControl({
|
|
|
254
245
|
onProductNameChange={onChange}
|
|
255
246
|
hasTicket={hasTicket}
|
|
256
247
|
categoryType={categoryType}
|
|
257
|
-
zoneDuration={catergoryZone?.defaultDuration}
|
|
258
248
|
/>
|
|
259
249
|
}
|
|
260
250
|
onDelete={() => onProductRemove(index)}
|
|
@@ -113,7 +113,6 @@ export interface ProductControlProps<T>
|
|
|
113
113
|
productName: string;
|
|
114
114
|
hasTicket?: boolean;
|
|
115
115
|
categoryType?: CategoryType;
|
|
116
|
-
zoneDuration?: number;
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
export function ProductControl<T extends FormValues>({
|
|
@@ -127,7 +126,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
127
126
|
productName,
|
|
128
127
|
hasTicket,
|
|
129
128
|
categoryType,
|
|
130
|
-
zoneDuration,
|
|
131
129
|
}: ProductControlProps<T>) {
|
|
132
130
|
const {
|
|
133
131
|
register,
|
|
@@ -192,16 +190,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
192
190
|
[handleImageUploading]
|
|
193
191
|
);
|
|
194
192
|
|
|
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
|
-
|
|
205
193
|
const onImageRemove = useCallback(
|
|
206
194
|
(id, path) => {
|
|
207
195
|
handleImageRemove(String(id), path);
|
|
@@ -384,14 +372,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
384
372
|
<FormNumberInput
|
|
385
373
|
fieldName={`${fieldNamePrefix}.capacity`}
|
|
386
374
|
label={t("capacity")}
|
|
387
|
-
rules={{
|
|
388
|
-
min: {
|
|
389
|
-
value: 1,
|
|
390
|
-
message: t("Validation:fieldRequired", {
|
|
391
|
-
attribute: t("capacity"),
|
|
392
|
-
}) as string,
|
|
393
|
-
},
|
|
394
|
-
}}
|
|
395
375
|
/>
|
|
396
376
|
</Col>
|
|
397
377
|
</Row>
|
|
@@ -403,11 +383,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
403
383
|
<FormNumberInput
|
|
404
384
|
fieldName={`${fieldNamePrefix}.capacity`}
|
|
405
385
|
label={t("capacity")}
|
|
406
|
-
onChange={onChangeGameCapacity}
|
|
407
386
|
rules={{
|
|
408
|
-
required: t("Validation:fieldRequired", {
|
|
409
|
-
attribute: t("capacity"),
|
|
410
|
-
}) as string,
|
|
411
387
|
min: {
|
|
412
388
|
value: 1,
|
|
413
389
|
message: t("Validation:fieldRequired", {
|
|
@@ -422,13 +398,10 @@ export function ProductControl<T extends FormValues>({
|
|
|
422
398
|
fieldName={`${fieldNamePrefix}.duration`}
|
|
423
399
|
label={t("durationMinutes")}
|
|
424
400
|
rules={{
|
|
425
|
-
required: t("Validation:fieldRequired", {
|
|
426
|
-
attribute: t("capacity"),
|
|
427
|
-
}) as string,
|
|
428
401
|
min: {
|
|
429
402
|
value: 1,
|
|
430
403
|
message: t("Validation:fieldRequired", {
|
|
431
|
-
attribute: t("
|
|
404
|
+
attribute: t("duration"),
|
|
432
405
|
}) as string,
|
|
433
406
|
},
|
|
434
407
|
}}
|
|
@@ -28,6 +28,7 @@ export interface ProductCategoryControlValues extends FormValues {
|
|
|
28
28
|
maxSubItems: number | null;
|
|
29
29
|
quantityType: QuantityType;
|
|
30
30
|
type: CategoryType;
|
|
31
|
+
isRelyOnPeople: boolean;
|
|
31
32
|
isTimeRelated: boolean;
|
|
32
33
|
collectUserInfo: boolean;
|
|
33
34
|
hasTicket: boolean;
|
|
@@ -96,6 +97,7 @@ export function ProductCategoryControl({
|
|
|
96
97
|
const minSubItemsId = useId();
|
|
97
98
|
const maxSubItemsId = useId();
|
|
98
99
|
const quantityType = useId();
|
|
100
|
+
const isRelyOnPeopleId = useId();
|
|
99
101
|
const isTimeRelatedId = useId();
|
|
100
102
|
const collectUserInfoId = useId();
|
|
101
103
|
const hasTicketId = useId();
|
|
@@ -330,7 +332,7 @@ export function ProductCategoryControl({
|
|
|
330
332
|
<Row>
|
|
331
333
|
<Col>
|
|
332
334
|
<Form.Group controlId={zoneId}>
|
|
333
|
-
<Form.Label>
|
|
335
|
+
<Form.Label>Zone</Form.Label>
|
|
334
336
|
<Controller
|
|
335
337
|
control={control}
|
|
336
338
|
name={`${fieldNamePrefix}.zoneId`}
|
|
@@ -358,6 +360,12 @@ export function ProductCategoryControl({
|
|
|
358
360
|
attribute: t("zone"),
|
|
359
361
|
}),
|
|
360
362
|
},
|
|
363
|
+
validate: (value) => {
|
|
364
|
+
if (value) return true;
|
|
365
|
+
return t("Validation:fieldRequired", {
|
|
366
|
+
attribute: t("zone"),
|
|
367
|
+
}) as string;
|
|
368
|
+
},
|
|
361
369
|
}}
|
|
362
370
|
/>
|
|
363
371
|
<Form.Control.Feedback type="invalid">
|
|
@@ -462,6 +470,27 @@ export function ProductCategoryControl({
|
|
|
462
470
|
</Form.Group>
|
|
463
471
|
)}
|
|
464
472
|
|
|
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>
|
|
465
494
|
{!category.hasTicket && (
|
|
466
495
|
<Form.Group
|
|
467
496
|
controlId={isTimeRelatedId}
|
|
@@ -1,15 +1,6 @@
|
|
|
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";
|
|
5
3
|
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
|
-
}
|
|
13
4
|
|
|
14
5
|
export const moveArrayElements = <T>(
|
|
15
6
|
array: T[],
|
|
@@ -51,32 +42,3 @@ export const getFilteredTemplates = (
|
|
|
51
42
|
label: template?.notification?.name,
|
|
52
43
|
}));
|
|
53
44
|
};
|
|
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,7 +5,6 @@ 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";
|
|
9
8
|
|
|
10
9
|
export function LocationInput() {
|
|
11
10
|
const {
|
|
@@ -14,32 +13,32 @@ export function LocationInput() {
|
|
|
14
13
|
} = useFormContext<LocationInputValues>();
|
|
15
14
|
const { t } = useTranslation("Design");
|
|
16
15
|
|
|
16
|
+
const addressId = useId();
|
|
17
|
+
const cityId = useId();
|
|
18
|
+
const stateId = useId();
|
|
19
|
+
const postcodeId = useId();
|
|
17
20
|
const countryId = useId();
|
|
18
21
|
|
|
19
22
|
return (
|
|
20
23
|
<>
|
|
21
24
|
<input {...register("location.latitude")} type="hidden" />
|
|
22
25
|
<input {...register("location.longitude")} type="hidden" />
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
error={errors?.location?.postcode}
|
|
40
|
-
name="location.postcode"
|
|
41
|
-
label={t("locationPostcode")}
|
|
42
|
-
/>
|
|
26
|
+
<Form.Group controlId={addressId}>
|
|
27
|
+
<Form.Label>{t("locationStreet")}</Form.Label>
|
|
28
|
+
<Form.Control {...register("location.street")} />
|
|
29
|
+
</Form.Group>
|
|
30
|
+
<Form.Group controlId={cityId}>
|
|
31
|
+
<Form.Label>{t("locationCity")}</Form.Label>
|
|
32
|
+
<Form.Control {...register("location.city")} />
|
|
33
|
+
</Form.Group>
|
|
34
|
+
<Form.Group controlId={stateId}>
|
|
35
|
+
<Form.Label>{t("locationState")}</Form.Label>
|
|
36
|
+
<Form.Control {...register("location.state")} />
|
|
37
|
+
</Form.Group>
|
|
38
|
+
<Form.Group controlId={postcodeId}>
|
|
39
|
+
<Form.Label>{t("locationPostcode")}</Form.Label>
|
|
40
|
+
<Form.Control {...register("location.postcode")} />
|
|
41
|
+
</Form.Group>
|
|
43
42
|
<Form.Group controlId={countryId}>
|
|
44
43
|
<Form.Label>{t("locationCountry")}</Form.Label>
|
|
45
44
|
<CountryCodeSelect
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React 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<JSX.Element[]>((acc, field) => {
|
|
17
17
|
const value = values?.[field];
|
|
18
18
|
if (!value) return acc;
|
|
19
19
|
|
|
@@ -4,6 +4,7 @@ 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";
|
|
7
8
|
import { Typeahead, TypeaheadOptions } from "../../typeahead";
|
|
8
9
|
import { MAX_DESCRIPTION_CHARACTERS_LENGTH } from "../constants";
|
|
9
10
|
import {
|
|
@@ -69,7 +70,8 @@ export function ProviderDetailsInput({
|
|
|
69
70
|
isInvalid={Boolean(errors.name)}
|
|
70
71
|
/>
|
|
71
72
|
<Form.Control.Feedback type="invalid">
|
|
72
|
-
{errors.name
|
|
73
|
+
{HookFormService.hasError(errors.name, "required") &&
|
|
74
|
+
errors.name?.message}
|
|
73
75
|
</Form.Control.Feedback>
|
|
74
76
|
</Form.Group>
|
|
75
77
|
|
|
@@ -93,7 +95,8 @@ export function ProviderDetailsInput({
|
|
|
93
95
|
isInvalid={Boolean(errors.description)}
|
|
94
96
|
/>
|
|
95
97
|
<Form.Control.Feedback type="invalid">
|
|
96
|
-
{errors.description
|
|
98
|
+
{HookFormService.hasError(errors.description, "validate") &&
|
|
99
|
+
errors.description?.message}
|
|
97
100
|
</Form.Control.Feedback>
|
|
98
101
|
</Form.Group>
|
|
99
102
|
|
|
@@ -117,7 +120,10 @@ export function ProviderDetailsInput({
|
|
|
117
120
|
isInvalid={Boolean(errors.email)}
|
|
118
121
|
/>
|
|
119
122
|
<Form.Control.Feedback type="invalid">
|
|
120
|
-
{errors.email
|
|
123
|
+
{HookFormService.hasError(errors.email, "required") &&
|
|
124
|
+
errors.email?.message}
|
|
125
|
+
{HookFormService.hasError(errors.email, "pattern") &&
|
|
126
|
+
errors.email?.message}
|
|
121
127
|
</Form.Control.Feedback>
|
|
122
128
|
</Form.Group>
|
|
123
129
|
|
|
@@ -135,7 +141,8 @@ export function ProviderDetailsInput({
|
|
|
135
141
|
isInvalid={Boolean(errors.phone)}
|
|
136
142
|
/>
|
|
137
143
|
<Form.Control.Feedback type="invalid">
|
|
138
|
-
{errors.phone
|
|
144
|
+
{HookFormService.hasError(errors.phone, "required") &&
|
|
145
|
+
errors.phone?.message}
|
|
139
146
|
</Form.Control.Feedback>
|
|
140
147
|
</Form.Group>
|
|
141
148
|
|
|
@@ -156,7 +163,8 @@ export function ProviderDetailsInput({
|
|
|
156
163
|
isInvalid={Boolean(errors.website)}
|
|
157
164
|
/>
|
|
158
165
|
<Form.Control.Feedback type="invalid">
|
|
159
|
-
{errors.website
|
|
166
|
+
{HookFormService.hasError(errors.website, "pattern") &&
|
|
167
|
+
errors.website?.message}
|
|
160
168
|
</Form.Control.Feedback>
|
|
161
169
|
</Form.Group>
|
|
162
170
|
{/* If admin has only 1 company - he dont need to set up it */}
|
|
@@ -11,29 +11,6 @@ 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
|
-
|
|
37
14
|
const defaultValues: VenueFormValues = {
|
|
38
15
|
name: "Sample provider",
|
|
39
16
|
description: "Description",
|
|
@@ -81,5 +58,4 @@ WithDefaultValues.args = {
|
|
|
81
58
|
defaultValues,
|
|
82
59
|
categories,
|
|
83
60
|
linkTypes,
|
|
84
|
-
errorResponse,
|
|
85
61
|
};
|