@licklist/design 0.71.24 → 0.72.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/auth/Login/LoginFormComponent.d.ts.map +1 -1
- package/dist/auth/Logout/Logout.js +1 -0
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterFormComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordFormComponent.d.ts.map +1 -1
- package/dist/auth/Router.d.ts.map +1 -1
- package/dist/auth/Router.js +2 -0
- package/dist/calendar/utils/index.d.ts +1 -1
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts +3 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +11 -4
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +3 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +20 -6
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +3 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts +5 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +5 -3
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +2 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.js +2 -1
- package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/utils/index.js +3 -3
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/EventVenueMap.js +1 -0
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +18 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +295 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts +15 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +90 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts +14 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +404 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts +10 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +87 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts +2 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/index.d.ts +2 -0
- package/dist/iframe/ProductWithModifierModal/index.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/utils.d.ts +5 -0
- package/dist/iframe/ProductWithModifierModal/utils.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/utils.js +21 -0
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts +3 -1
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.js +10 -7
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts +5 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +12 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.js +3 -3
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +4 -0
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +29 -2
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +106 -2
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +13 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +3 -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 +95 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts +23 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts.map +1 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.js +62 -0
- package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts +2 -0
- package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts.map +1 -0
- package/dist/iframe/order-process/components/CategoryProduct/constants.js +4 -0
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts +6 -0
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts.map +1 -0
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.js +18 -0
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +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 +83 -10
- package/dist/iframe/payment/order-items-table/utils/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/index.js +15 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +2 -2
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +2 -2
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -0
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +4 -5
- package/dist/index.js +2 -1
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +3 -0
- package/dist/notification/sms-template/card/SmsTemplateCard.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +7 -2
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +7 -5
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +0 -2
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +25 -5
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +0 -3
- package/dist/product-set/form/VenueMapsControl.d.ts +1 -1
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +0 -3
- package/dist/product-set/form/context.d.ts +3 -1
- package/dist/product-set/form/context.d.ts.map +1 -1
- package/dist/product-set/form/context.js +2 -1
- package/dist/product-set/product/ProductControl.d.ts +8 -0
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +25 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +3 -0
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
- package/dist/product-set/utils/index.d.ts +88 -0
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +19 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +7 -3
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.js +1 -0
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.js +3 -0
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.js +3 -0
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +21 -0
- package/dist/sales/coupon/utils/index.d.ts +2 -1
- package/dist/sales/coupon/utils/index.d.ts.map +1 -1
- package/dist/sales/life-time-sales/LifeTimeSalesChart.js +1 -0
- package/dist/sales/manual-booking/select-event/SelectEvent.js +1 -0
- package/dist/sales/manual-booking/select-menu/SelectMenu.js +1 -0
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -0
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.js +16 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
- package/dist/setting/dashboard/snippet-templates/card/SnippetTemplateCard.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +3 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +3 -0
- package/dist/static/date-range-input/utils/index.d.ts +1 -1
- package/dist/static/date-range-input/utils/index.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +3 -0
- package/dist/static/loader/FullScreenLoader.d.ts +8 -0
- package/dist/static/loader/FullScreenLoader.d.ts.map +1 -0
- package/dist/static/loader/FullScreenLoader.js +41 -0
- package/dist/static/loader/LoaderIndicator.d.ts +2 -3
- package/dist/static/loader/LoaderIndicator.d.ts.map +1 -1
- package/dist/static/loader/LoaderIndicator.js +4 -2
- package/dist/static/loader/index.d.ts +1 -0
- package/dist/static/loader/index.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.js +3 -0
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
- package/dist/styles/date-time-button/DateTimeButton.scss +7 -0
- package/dist/styles/events/EditEventModal.scss +2 -0
- package/dist/styles/iframe-events/Calendar.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/iframe-page/Page.scss +16 -0
- package/dist/styles/iframe-page/PageBody.scss +4 -0
- package/dist/styles/modals/Modals.scss +16 -0
- package/dist/styles/product-set/EditProductSetElement.scss +1 -0
- package/dist/styles/product-set/ProductSetForm.scss +13 -3
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -4
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/ManualBooking.scss +6 -0
- package/dist/styles/static/Loader.scss +9 -0
- package/dist/styles/themes/bookedit/index.scss +19 -0
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +3 -0
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +3 -0
- package/package.json +8 -6
- package/src/affiliate/form/AffiliateForm.tsx +1 -0
- package/src/auth/Layout/AuthNavComponent.tsx +4 -0
- package/src/auth/Login/LoginComponent.tsx +3 -1
- package/src/auth/Login/LoginFormComponent.tsx +2 -0
- package/src/auth/Register/RegisterComponent.tsx +2 -0
- package/src/auth/Register/RegisterFormComponent.tsx +4 -0
- package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +4 -0
- package/src/auth/Router.tsx +2 -0
- package/src/calendar/Calendar.stories.tsx +2 -2
- package/src/calendar/utils/index.ts +1 -1
- package/src/events/edit-event-modal/IntervalInput.tsx +13 -3
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +24 -2
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +9 -7
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +9 -1
- package/src/events/event-card/utils.ts +10 -9
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +3 -1
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +2 -1
- package/src/events/event-statistic-modal/utils/index.ts +6 -5
- package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
- package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +212 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +76 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +393 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +98 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/index.ts +1 -0
- package/src/iframe/ProductWithModifierModal/index.ts +1 -0
- package/src/iframe/ProductWithModifierModal/utils.ts +29 -0
- package/src/iframe/event/ticket-description/TicketDescription.tsx +11 -4
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +24 -2
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +13 -11
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +45 -4
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +155 -75
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +58 -1
- package/src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx +86 -0
- package/src/iframe/order-process/components/CategoryProduct/constants.ts +1 -0
- package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +25 -0
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +1 -2
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +84 -14
- package/src/iframe/payment/order-items-table/utils/index.ts +23 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +3 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +19 -20
- package/src/iframe/ryft/utils/ryft-form.ts +6 -5
- package/src/layout/DropDown.tsx +1 -1
- package/src/notification/email-template/card/EmailTemplateCard.tsx +2 -0
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
- package/src/notification/sms-template/card/SmsTemplateCard.tsx +2 -0
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -4
- package/src/product-set/control/DateInput.tsx +3 -4
- package/src/product-set/form/ProductSetForm.tsx +17 -5
- package/src/product-set/form/ProductZonesControl.tsx +1 -4
- package/src/product-set/form/ProductsControl.tsx +33 -15
- package/src/product-set/form/SubProductsControl.tsx +0 -3
- package/src/product-set/form/VenueMapsControl.tsx +1 -4
- package/src/product-set/form/context.tsx +5 -0
- package/src/product-set/product/ProductControl.tsx +37 -2
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
- package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
- package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
- package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/product-set/utils/index.ts +19 -0
- package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
- package/src/recurrence-input/RecurrenceInput.tsx +9 -6
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
- package/src/resource/form/components/CapacityControl.tsx +1 -0
- package/src/resource/form/components/SortControl.tsx +1 -0
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
- package/src/sales/coupon/utils/index.ts +5 -3
- package/src/setting/admin/AdminSettingForm.tsx +4 -0
- package/src/setting/admin/PaymentFeeForm.tsx +5 -0
- package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +2 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +1 -2
- package/src/sortable-tree/SortableTreeItem.tsx +1 -6
- package/src/static/CurrencyNumberInput.tsx +1 -0
- package/src/static/date-range-input/utils/index.ts +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +1 -0
- package/src/static/loader/FullScreenLoader.tsx +16 -0
- package/src/static/loader/LoaderIndicator.tsx +6 -3
- package/src/static/loader/index.ts +1 -0
- package/src/static/number-input/NumberInput.tsx +1 -0
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
- package/src/styles/date-time-button/DateTimeButton.scss +7 -0
- package/src/styles/events/EditEventModal.scss +2 -0
- package/src/styles/iframe-events/Calendar.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/iframe-page/Page.scss +16 -0
- package/src/styles/iframe-page/PageBody.scss +4 -0
- package/src/styles/modals/Modals.scss +16 -0
- package/src/styles/product-set/EditProductSetElement.scss +1 -0
- package/src/styles/product-set/ProductSetForm.scss +13 -3
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -4
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/ManualBooking.scss +6 -0
- package/src/styles/static/Loader.scss +9 -0
- package/src/styles/themes/bookedit/index.scss +19 -0
- package/src/zone/form/components/GameDurationControl.tsx +1 -0
- package/src/zone/form/components/SortControl.tsx +1 -0
- package/yarn.lock +185 -185
|
@@ -6,13 +6,14 @@ import { TFunction, useTranslation } from 'react-i18next'
|
|
|
6
6
|
import { VenueMapSet } from '@licklist/core/dist/DataMapper/Product/VenueMapSetDataMapper'
|
|
7
7
|
import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery'
|
|
8
8
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService'
|
|
9
|
+
import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper'
|
|
9
10
|
|
|
10
11
|
import { isEqual } from 'lodash'
|
|
11
12
|
// eslint-disable-next-line max-len
|
|
12
13
|
import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper'
|
|
13
14
|
import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
|
|
14
15
|
import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
|
|
15
|
-
import { transformErrorToMessage } from '@licklist/plugins'
|
|
16
|
+
import { transformErrorToMessage } from '@licklist/plugins/dist/utils/error'
|
|
16
17
|
import { Dialog, useDialogContext } from '../../modals/dialog'
|
|
17
18
|
import {
|
|
18
19
|
ProductSetControl,
|
|
@@ -22,18 +23,26 @@ import {
|
|
|
22
23
|
import { Step } from '../types'
|
|
23
24
|
import { ProductSetContextProvider, ProductSetLoadingContext } from './context'
|
|
24
25
|
import { SelectItem } from '../../types/generic/SelectItem'
|
|
25
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
checkAvailableTimesErrors,
|
|
28
|
+
updateModifiersSetAtProductSetForm,
|
|
29
|
+
getFilteredTemplates,
|
|
30
|
+
} from '../utils'
|
|
26
31
|
import { ErrorModal } from '../../iframe/order-process/components/ErrorModal'
|
|
27
32
|
|
|
28
33
|
export interface WithIsLoading {
|
|
29
34
|
isLoading: boolean
|
|
30
35
|
}
|
|
36
|
+
export interface WithIdOptional {
|
|
37
|
+
id?: number
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
export interface WithId {
|
|
32
41
|
id: number
|
|
33
42
|
}
|
|
34
43
|
export interface ProductSetFormValues
|
|
35
44
|
extends FormValues,
|
|
36
|
-
|
|
45
|
+
WithIdOptional,
|
|
37
46
|
ProductSetControlValues {
|
|
38
47
|
steps: Step[]
|
|
39
48
|
isOverrides?: boolean
|
|
@@ -58,6 +67,7 @@ export interface ProductSetFormProps
|
|
|
58
67
|
saleDeadline?: number
|
|
59
68
|
isCreateNewOverrides?: boolean
|
|
60
69
|
timeZone: string
|
|
70
|
+
modifiersSetList?: ModifierSet[]
|
|
61
71
|
}
|
|
62
72
|
|
|
63
73
|
export function ProductSetForm({
|
|
@@ -67,6 +77,7 @@ export function ProductSetForm({
|
|
|
67
77
|
onSubmitAndRedirect,
|
|
68
78
|
onSubmitNoRedirect,
|
|
69
79
|
productGroupList,
|
|
80
|
+
modifiersSetList,
|
|
70
81
|
serverErrors,
|
|
71
82
|
providerHasMap = false,
|
|
72
83
|
venueMapSets = [],
|
|
@@ -91,7 +102,7 @@ export function ProductSetForm({
|
|
|
91
102
|
const [errorMessage, setErrorMessage] = useState('')
|
|
92
103
|
|
|
93
104
|
const form = useForm<ProductSetFormValues>({
|
|
94
|
-
defaultValues,
|
|
105
|
+
defaultValues: updateModifiersSetAtProductSetForm(defaultValues),
|
|
95
106
|
mode: 'onChange',
|
|
96
107
|
})
|
|
97
108
|
|
|
@@ -118,7 +129,7 @@ export function ProductSetForm({
|
|
|
118
129
|
if (!defaultValues || isEqual(defaultValues, formValues)) {
|
|
119
130
|
return
|
|
120
131
|
}
|
|
121
|
-
reset(defaultValues)
|
|
132
|
+
reset(updateModifiersSetAtProductSetForm(defaultValues))
|
|
122
133
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
123
134
|
}, [defaultValues])
|
|
124
135
|
|
|
@@ -158,6 +169,7 @@ export function ProductSetForm({
|
|
|
158
169
|
<ProductSetContextProvider
|
|
159
170
|
productGroupList={productGroupList}
|
|
160
171
|
providerHasMap={providerHasMap}
|
|
172
|
+
modifiersSetList={modifiersSetList}
|
|
161
173
|
venueMapSets={venueMapSets}
|
|
162
174
|
providerHasBookingManagement={providerHasBookingManagement}
|
|
163
175
|
zones={zones}
|
|
@@ -49,6 +49,8 @@ const getDefaultProductValue = (sort: number): Product => ({
|
|
|
49
49
|
maxQuantity: null,
|
|
50
50
|
totalQuantity: 0,
|
|
51
51
|
isAvailable: true,
|
|
52
|
+
modifiersSet: [],
|
|
53
|
+
modifiersSetsId: [],
|
|
52
54
|
isSoldOut: false,
|
|
53
55
|
isRequired: false,
|
|
54
56
|
isUnlimited: false,
|
|
@@ -139,6 +141,16 @@ export function ProductsControl({
|
|
|
139
141
|
],
|
|
140
142
|
})
|
|
141
143
|
|
|
144
|
+
const modifierSets = useWatch({
|
|
145
|
+
control,
|
|
146
|
+
name: [
|
|
147
|
+
...fields.map(
|
|
148
|
+
(_, index) =>
|
|
149
|
+
`${productControlFieldName}.${index}.modifiersSet` as const,
|
|
150
|
+
),
|
|
151
|
+
],
|
|
152
|
+
})
|
|
153
|
+
|
|
142
154
|
const categoryProductErrors =
|
|
143
155
|
errors?.steps?.[stepIndex]?.productCategories?.[productCategoryIndex]
|
|
144
156
|
?.products
|
|
@@ -199,6 +211,7 @@ export function ProductsControl({
|
|
|
199
211
|
: isOverrides && !!product.originalProductId
|
|
200
212
|
|
|
201
213
|
const isNewProductOverrides = isCreateNewOverrides && !!product.id
|
|
214
|
+
const modifiersSets = modifierSets[index]?.length || 0
|
|
202
215
|
|
|
203
216
|
return (
|
|
204
217
|
<Controller
|
|
@@ -226,21 +239,26 @@ export function ProductsControl({
|
|
|
226
239
|
edit={() => edit(index)}
|
|
227
240
|
secondaryBadge={getBadgeConfig(categoryType, t(categoryType))}
|
|
228
241
|
subTitle={
|
|
229
|
-
<div className='
|
|
230
|
-
<div className='product-set-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
<div className='d-flex justify-content-between'>
|
|
243
|
+
<div className='product-set-badges-container'>
|
|
244
|
+
<div className='product-set-subtitle-dot product-set-subtitle-product-dot' />
|
|
245
|
+
<span>
|
|
246
|
+
{`£${prices[index]} ${t('each')} - ${t('qty')}:${
|
|
247
|
+
!isUnlimitedQuantities[index]
|
|
248
|
+
? ` ${quantities[index]}`
|
|
249
|
+
: t(' unlimited')
|
|
250
|
+
} ${
|
|
251
|
+
!isUnlimitedQuantities[index]
|
|
252
|
+
? ` - ${t('possibleRevenue')} £${
|
|
253
|
+
prices[index] * quantities[index]
|
|
254
|
+
}`
|
|
255
|
+
: ''
|
|
256
|
+
} `}
|
|
257
|
+
</span>
|
|
258
|
+
</div>
|
|
259
|
+
{!!modifiersSets && (
|
|
260
|
+
<Badge className='modifier-badge'>{`${modifiersSets} ${t('modifiersSets')}`}</Badge>
|
|
261
|
+
)}
|
|
244
262
|
</div>
|
|
245
263
|
}
|
|
246
264
|
modalLabel={t('addNewProduct')}
|
|
@@ -70,9 +70,6 @@ export function SubProductsControl({
|
|
|
70
70
|
images: subProducts[index]?.images as Image[],
|
|
71
71
|
}
|
|
72
72
|
// @ts-expect-error TS2345
|
|
73
|
-
// @TODO fix prod type error
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
75
|
-
// @ts-ignore
|
|
76
73
|
append(subProductCopy)
|
|
77
74
|
}}
|
|
78
75
|
/>
|
|
@@ -3,9 +3,9 @@ import { Button } from 'react-bootstrap'
|
|
|
3
3
|
import { VenueMap } from '@licklist/core/dist/DataMapper/Product/VenueMapDataMapper'
|
|
4
4
|
import MediaService from '@licklist/plugins/dist/services/Media/MediaService'
|
|
5
5
|
import { PointProduct } from '@licklist/core/dist/DataMapper/Product/PointProductDataMapper'
|
|
6
|
+
import { Product } from '@licklist/core/dist/DataMapper/Product/ProductDataMapper'
|
|
6
7
|
import { FullscreenModal } from '../../modals/fullscreen'
|
|
7
8
|
import { EventVenueMap } from '../../events/event-venue-map'
|
|
8
|
-
import { Product } from '../types'
|
|
9
9
|
|
|
10
10
|
type VenueMapsControlProps = {
|
|
11
11
|
venueMaps?: VenueMap[]
|
|
@@ -46,9 +46,6 @@ export const VenueMapsControl = ({
|
|
|
46
46
|
url={image.url}
|
|
47
47
|
name={name}
|
|
48
48
|
points={points}
|
|
49
|
-
// @TODO fix prod type error
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
51
|
-
// @ts-ignore
|
|
52
49
|
products={products}
|
|
53
50
|
pointProducts={pointProducts}
|
|
54
51
|
onPointProductsChange={onPointProductsChange}
|
|
@@ -7,15 +7,18 @@ import {
|
|
|
7
7
|
Dispatch,
|
|
8
8
|
} from 'react'
|
|
9
9
|
import { VenueMapSet } from '@licklist/core/dist/DataMapper/Product/VenueMapSetDataMapper'
|
|
10
|
+
import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper'
|
|
10
11
|
// eslint-disable-next-line max-len
|
|
11
12
|
import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper'
|
|
12
13
|
import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
|
|
13
14
|
import { SelectItem } from '../../types/generic/SelectItem'
|
|
14
15
|
|
|
16
|
+
|
|
15
17
|
interface LoadingContext {
|
|
16
18
|
isLoading: boolean
|
|
17
19
|
setLoading: (loading: boolean) => void
|
|
18
20
|
productGroupList?: SelectItem[]
|
|
21
|
+
modifiersSetList?: ModifierSet[] | null
|
|
19
22
|
providerHasMap?: boolean | null
|
|
20
23
|
venueMapSets?: VenueMapSet[]
|
|
21
24
|
providerHasBookingManagement?: ProviderBookingManagementSetting['hasBookingManagement']
|
|
@@ -43,6 +46,7 @@ type ProductSetContextProviderProps = PropsWithChildren<
|
|
|
43
46
|
export function ProductSetContextProvider({
|
|
44
47
|
children,
|
|
45
48
|
productGroupList = [],
|
|
49
|
+
modifiersSetList =[],
|
|
46
50
|
providerHasMap = false,
|
|
47
51
|
venueMapSets = [],
|
|
48
52
|
providerHasBookingManagement,
|
|
@@ -62,6 +66,7 @@ export function ProductSetContextProvider({
|
|
|
62
66
|
isLoading: loading,
|
|
63
67
|
setLoading,
|
|
64
68
|
productGroupList,
|
|
69
|
+
modifiersSetList,
|
|
65
70
|
providerHasMap,
|
|
66
71
|
venueMapSets,
|
|
67
72
|
providerHasBookingManagement,
|
|
@@ -34,12 +34,13 @@ import {
|
|
|
34
34
|
} from 'react-hook-form'
|
|
35
35
|
import { useTranslation } from 'react-i18next'
|
|
36
36
|
import { useImages } from '@licklist/plugins/dist/hooks/Media/useImages'
|
|
37
|
-
|
|
38
37
|
import {
|
|
39
38
|
Image,
|
|
40
39
|
IMAGE_TYPE_IMAGE,
|
|
41
40
|
} from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
|
|
42
41
|
import { FaClipboard } from 'react-icons/fa'
|
|
42
|
+
import { Typeahead } from 'src/typeahead'
|
|
43
|
+
import { convertToTypeaheadOptions } from 'src/sales/coupon/utils'
|
|
43
44
|
import { checkIfZoneCategory } from '@licklist/plugins'
|
|
44
45
|
import { FileUpload } from '../../file-upload'
|
|
45
46
|
import { BooleanSwitch } from '../../static'
|
|
@@ -66,6 +67,14 @@ import { ProductZoneControlValues } from '../product-zone'
|
|
|
66
67
|
import { AdvancedOptions } from './advanced-options'
|
|
67
68
|
import { ProductZonesControl } from '../form/ProductZonesControl'
|
|
68
69
|
|
|
70
|
+
|
|
71
|
+
export interface ModifiersSet {
|
|
72
|
+
id: number
|
|
73
|
+
value?: string
|
|
74
|
+
name?: string
|
|
75
|
+
label?: string
|
|
76
|
+
}
|
|
77
|
+
|
|
69
78
|
// TO DO refactor this file
|
|
70
79
|
// and add correct types
|
|
71
80
|
export interface ProductControlValues
|
|
@@ -89,6 +98,8 @@ export interface ProductControlValues
|
|
|
89
98
|
hasSpecialNotes: boolean
|
|
90
99
|
minSpend?: number | null
|
|
91
100
|
type?: ProductType
|
|
101
|
+
modifiersSetsId?: Array<ModifiersSet>
|
|
102
|
+
modifiersSet?: Array<ModifiersSet>
|
|
92
103
|
weight?: number
|
|
93
104
|
tierId?: number
|
|
94
105
|
images: Image[] | null
|
|
@@ -112,6 +123,7 @@ export interface ProductControlProps<T>
|
|
|
112
123
|
hasTicket?: boolean
|
|
113
124
|
categoryType?: CategoryType
|
|
114
125
|
isOverrides?: boolean
|
|
126
|
+
|
|
115
127
|
}
|
|
116
128
|
|
|
117
129
|
export function ProductControl<T extends FormValues>({
|
|
@@ -127,6 +139,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
127
139
|
categoryType,
|
|
128
140
|
isOverrides = false,
|
|
129
141
|
}: ProductControlProps<T>) {
|
|
142
|
+
|
|
130
143
|
const {
|
|
131
144
|
register,
|
|
132
145
|
control,
|
|
@@ -136,14 +149,16 @@ export function ProductControl<T extends FormValues>({
|
|
|
136
149
|
watch,
|
|
137
150
|
} = useFormContext<T>()
|
|
138
151
|
|
|
139
|
-
const { setLoading } = useContext(ProductSetLoadingContext)
|
|
152
|
+
const { setLoading, modifiersSetList } = useContext(ProductSetLoadingContext)
|
|
140
153
|
const { t } = useTranslation(['Design', 'Validation', 'ProductSet'])
|
|
141
154
|
const [expanded, setExpanded] = useState(false)
|
|
155
|
+
|
|
142
156
|
const [initialImages, setInitialImages] = useState<Image[] | null>(null)
|
|
143
157
|
// @TODO: After checking "isUnlimited" checkbox need to reset field totalQuantity
|
|
144
158
|
const isUnlimited = Boolean(
|
|
145
159
|
watch(`${fieldNamePrefix}.isUnlimited` as Path<T>),
|
|
146
160
|
)
|
|
161
|
+
|
|
147
162
|
const advancedId = useId()
|
|
148
163
|
const nameId = useId()
|
|
149
164
|
|
|
@@ -201,6 +216,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
201
216
|
setInitialImages(formImages as Image[])
|
|
202
217
|
}, [getValues, setInitialImages, fieldNamePrefix])
|
|
203
218
|
|
|
219
|
+
|
|
204
220
|
useEffect(() => {
|
|
205
221
|
if (Array.isArray(images)) {
|
|
206
222
|
setValue(
|
|
@@ -213,6 +229,9 @@ export function ProductControl<T extends FormValues>({
|
|
|
213
229
|
|
|
214
230
|
const quantitySelector = quantityValue ?? '1'
|
|
215
231
|
const quantity = QUANTITY_TYPE_LIST_DTO[quantitySelector as string]
|
|
232
|
+
|
|
233
|
+
const modifierList = convertToTypeaheadOptions(modifiersSetList)
|
|
234
|
+
|
|
216
235
|
return (
|
|
217
236
|
<>
|
|
218
237
|
<Row>
|
|
@@ -355,6 +374,22 @@ export function ProductControl<T extends FormValues>({
|
|
|
355
374
|
</Form.Group>
|
|
356
375
|
</Col>
|
|
357
376
|
</Row>
|
|
377
|
+
<Row>
|
|
378
|
+
<Col>
|
|
379
|
+
<Form.Group className='mb-3'>
|
|
380
|
+
<Form.Label>{t('Design:addModifierSet')}</Form.Label>
|
|
381
|
+
<Typeahead
|
|
382
|
+
name='modifierList'
|
|
383
|
+
options={modifierList}
|
|
384
|
+
{...register(`${fieldNamePrefix}.modifiersSet` as Path<T>)}
|
|
385
|
+
isMultipleChoise
|
|
386
|
+
isCouponForm
|
|
387
|
+
placeholder={t('Design:choose')}
|
|
388
|
+
noOptionsMessage={t('Design:noSelectedModifier')}
|
|
389
|
+
/>
|
|
390
|
+
</Form.Group>
|
|
391
|
+
</Col>
|
|
392
|
+
</Row>
|
|
358
393
|
|
|
359
394
|
<Row className='my-4 mx-0 d-flex flex-column'>
|
|
360
395
|
{isZoneCategory && (
|
|
@@ -86,6 +86,7 @@ export function ProductBookingManagementControl<T extends FormValues>(
|
|
|
86
86
|
<Form.Control
|
|
87
87
|
ref={ref}
|
|
88
88
|
type='number'
|
|
89
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
89
90
|
min={0}
|
|
90
91
|
step={1}
|
|
91
92
|
value={value as string}
|
|
@@ -129,6 +130,7 @@ export function ProductBookingManagementControl<T extends FormValues>(
|
|
|
129
130
|
<Form.Control
|
|
130
131
|
ref={ref}
|
|
131
132
|
type='number'
|
|
133
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
132
134
|
min='0'
|
|
133
135
|
step='1'
|
|
134
136
|
value={value as string}
|
|
@@ -91,6 +91,7 @@ export const ProductDurationControl = <T,>({
|
|
|
91
91
|
<Form.Control
|
|
92
92
|
type='number'
|
|
93
93
|
min={0}
|
|
94
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
94
95
|
step={1}
|
|
95
96
|
value={durationHours}
|
|
96
97
|
disabled={disabled}
|
|
@@ -127,6 +128,7 @@ export const ProductDurationControl = <T,>({
|
|
|
127
128
|
type='number'
|
|
128
129
|
min={0}
|
|
129
130
|
step={1}
|
|
131
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
130
132
|
disabled={disabled}
|
|
131
133
|
value={durationMinutes}
|
|
132
134
|
isInvalid={isInvalid}
|
|
@@ -111,6 +111,7 @@ export function ProductQuantityConstantControl<T extends FormValues>(
|
|
|
111
111
|
type='number'
|
|
112
112
|
min={0}
|
|
113
113
|
step={1}
|
|
114
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
114
115
|
value={value as string}
|
|
115
116
|
isInvalid={HookFormService.isInvalid<T>(
|
|
116
117
|
`${fieldNamePrefix}.totalQuantity` as Path<T>,
|
|
@@ -165,6 +166,7 @@ export function ProductQuantityConstantControl<T extends FormValues>(
|
|
|
165
166
|
type='number'
|
|
166
167
|
min={0}
|
|
167
168
|
step={1}
|
|
169
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
168
170
|
value={value as string}
|
|
169
171
|
onChange={onChange}
|
|
170
172
|
onFocus={onFocus}
|
|
@@ -85,6 +85,7 @@ export function ProductQuantityControl<T extends FormValues>(
|
|
|
85
85
|
type='number'
|
|
86
86
|
min={0}
|
|
87
87
|
step={1}
|
|
88
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
88
89
|
value={value as string}
|
|
89
90
|
onChange={onChange}
|
|
90
91
|
onFocus={onFocus}
|
|
@@ -143,6 +144,7 @@ export function ProductQuantityControl<T extends FormValues>(
|
|
|
143
144
|
type='number'
|
|
144
145
|
min={0}
|
|
145
146
|
step={1}
|
|
147
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
146
148
|
value={value && (value as string)}
|
|
147
149
|
onFocus={onFocus}
|
|
148
150
|
onChange={onChange}
|
|
@@ -69,6 +69,7 @@ export function ProductQuantityRechargingControl<T extends FormValues>(
|
|
|
69
69
|
type='number'
|
|
70
70
|
min={0}
|
|
71
71
|
step={1}
|
|
72
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
72
73
|
{...register(`${fieldNamePrefix}.totalQuantity` as Path<T>, {
|
|
73
74
|
validate: (value) => {
|
|
74
75
|
if (unlimited) return true
|
|
@@ -221,6 +221,7 @@ export function ProductCategoryControl({
|
|
|
221
221
|
step={1}
|
|
222
222
|
value={value === null ? '' : value}
|
|
223
223
|
onChange={onChange}
|
|
224
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
224
225
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
225
226
|
`${fieldNamePrefix}.minSubItems` as const,
|
|
226
227
|
errors,
|
|
@@ -293,6 +294,7 @@ export function ProductCategoryControl({
|
|
|
293
294
|
name={name}
|
|
294
295
|
value={value === null ? '' : value}
|
|
295
296
|
onChange={onChange}
|
|
297
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
296
298
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
297
299
|
`${fieldNamePrefix}.maxSubItems` as const,
|
|
298
300
|
errors,
|
|
@@ -353,6 +355,7 @@ export function ProductCategoryControl({
|
|
|
353
355
|
min={0}
|
|
354
356
|
step={1}
|
|
355
357
|
type='number'
|
|
358
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
356
359
|
disabled={isOverride}
|
|
357
360
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
358
361
|
`${fieldNamePrefix}.overallQuantity`,
|
|
@@ -543,6 +546,7 @@ export function ProductCategoryControl({
|
|
|
543
546
|
step={1}
|
|
544
547
|
value={value}
|
|
545
548
|
onChange={onChange}
|
|
549
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
546
550
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
547
551
|
`${fieldNamePrefix}.remainderExpireAfter` as const,
|
|
548
552
|
errors,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EmailTemplate } from '@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper'
|
|
2
2
|
import { SmsTemplate } from '@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper'
|
|
3
|
+
import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper'
|
|
4
|
+
import { convertToTypeaheadOptions } from 'src/sales/coupon/utils'
|
|
3
5
|
import { TFunction } from 'react-i18next'
|
|
4
6
|
import { UseFormSetError } from 'react-hook-form'
|
|
5
7
|
import { checkIfZoneCategory } from '@licklist/plugins'
|
|
@@ -7,6 +9,7 @@ import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDat
|
|
|
7
9
|
import { TemplateItem } from '../control/ProductSetControl'
|
|
8
10
|
import { ProductSetFormValues } from '../form/ProductSetForm'
|
|
9
11
|
|
|
12
|
+
|
|
10
13
|
interface CheckAvailableTimesErrors {
|
|
11
14
|
values: ProductSetFormValues
|
|
12
15
|
setError: UseFormSetError<ProductSetFormValues>
|
|
@@ -58,6 +61,22 @@ export const getFilteredTemplates = (
|
|
|
58
61
|
}))
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
export const updateModifiersSetAtProductSetForm = (data: ProductSetFormValues) => ({
|
|
65
|
+
...data,
|
|
66
|
+
steps: data.steps.map(step => ({
|
|
67
|
+
...step,
|
|
68
|
+
productCategories: step.productCategories.map(category => ({
|
|
69
|
+
...category,
|
|
70
|
+
products: category.products.map(product => ({
|
|
71
|
+
...product,
|
|
72
|
+
modifiersSet: product?.modifiersSet
|
|
73
|
+
? convertToTypeaheadOptions(product.modifiersSet as ModifierSet[])
|
|
74
|
+
: [],
|
|
75
|
+
})),
|
|
76
|
+
})),
|
|
77
|
+
})),
|
|
78
|
+
});
|
|
79
|
+
|
|
61
80
|
export const checkAvailableTimesErrors = ({
|
|
62
81
|
values,
|
|
63
82
|
setError,
|
|
@@ -109,6 +109,7 @@ function RecurrenceEndInput({
|
|
|
109
109
|
type='number'
|
|
110
110
|
min={1}
|
|
111
111
|
max={500}
|
|
112
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
112
113
|
disabled={disabled || !count || count === 500}
|
|
113
114
|
aria-label='Occurrence count'
|
|
114
115
|
value={count ?? defaultOccurrences[frequency]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable prefer-destructuring */
|
|
2
2
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3
3
|
import { DateTime } from 'luxon'
|
|
4
|
-
import { useEffect, useReducer } from 'react'
|
|
4
|
+
import { useEffect, useReducer, useState } from 'react'
|
|
5
5
|
import RRule, { Frequency, Weekday } from 'rrule'
|
|
6
6
|
import RecurrenceEndInput, { defaultOccurrences } from './RecurrenceEndInput'
|
|
7
7
|
import RecurrenceIntervalAndFrequencyInput from './RecurrenceIntervalAndFrequencyInput'
|
|
@@ -39,10 +39,13 @@ export function RecurrenceInput({
|
|
|
39
39
|
// TODO: unhardcode timezone
|
|
40
40
|
() =>
|
|
41
41
|
onChange(
|
|
42
|
-
RRule.optionsToString({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
RRule.optionsToString({
|
|
43
|
+
freq: state.freq,
|
|
44
|
+
count: state.count,
|
|
45
|
+
interval: state.interval,
|
|
46
|
+
byweekday: state.byweekday,
|
|
47
|
+
tzid: 'Europe/London',
|
|
48
|
+
}).replace('RRULE:', ''),
|
|
46
49
|
),
|
|
47
50
|
[state],
|
|
48
51
|
)
|
|
@@ -54,8 +57,8 @@ export function RecurrenceInput({
|
|
|
54
57
|
frequency={state.freq}
|
|
55
58
|
onChange={({ interval, frequency }) => {
|
|
56
59
|
updateState({
|
|
57
|
-
interval,
|
|
58
60
|
freq: frequency,
|
|
61
|
+
interval,
|
|
59
62
|
byweekday:
|
|
60
63
|
frequency === state.freq
|
|
61
64
|
? state.byweekday
|
|
@@ -27,6 +27,7 @@ export const CapacityControl = ({ isLoading }: CapacityControlProps) => {
|
|
|
27
27
|
required: true,
|
|
28
28
|
min: 1,
|
|
29
29
|
})}
|
|
30
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
30
31
|
placeholder={t('Design:capacity')}
|
|
31
32
|
isInvalid={Boolean(errors.capacity)}
|
|
32
33
|
disabled={isLoading}
|