@licklist/design 0.71.24 → 0.72.0-dev.1
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/EventCard.d.ts +2 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +11 -2
- 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 +26 -6
- 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/EventCard.tsx +15 -4
- 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 +34 -16
- 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 +10 -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 +188 -188
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useMemo } from 'react'
|
|
2
|
-
import { uniqueId } from 'lodash'
|
|
2
|
+
import { uniqueId, flatMap, flatten, map } from 'lodash'
|
|
3
3
|
import { useIntl } from 'react-intl'
|
|
4
4
|
import { useTranslation } from 'react-i18next'
|
|
5
5
|
import { Product } from '@licklist/core/dist/DataMapper/Product/ProductDataMapper'
|
|
6
|
+
import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper'
|
|
6
7
|
import {
|
|
7
8
|
PAYMENT_TYPE_VAT,
|
|
8
9
|
PAYMENT_TYPE_FEE,
|
|
@@ -12,6 +13,10 @@ import { StaticTableData } from '../../../../table'
|
|
|
12
13
|
import { getProductQuantityAndPrice, getTotalSumByCategory } from '../utils'
|
|
13
14
|
import { OrderItemsTableProps, SummaryItem } from '../types'
|
|
14
15
|
import { getOrderSummaryItems } from '../utils/paymentSummary'
|
|
16
|
+
import { Order } from '@licklist/core/dist/DataMapper'
|
|
17
|
+
import { OrderPayment } from '@licklist/core/dist/DataMapper/Order/OrderPaymentDataMapper'
|
|
18
|
+
import { OrderProduct } from '@licklist/core/dist/DataMapper/Order/OrderProductDataMapper'
|
|
19
|
+
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
|
|
15
20
|
|
|
16
21
|
const CURRENCY_DEFAULT = 'GBP'
|
|
17
22
|
export const PAYMENT_TYPE_TRANSLATE_KEYS = {
|
|
@@ -50,19 +55,67 @@ export const useTableData = ({
|
|
|
50
55
|
),
|
|
51
56
|
})
|
|
52
57
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
order
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
const reworkProductStructure = (order: OrderProduct) =>
|
|
59
|
+
order
|
|
60
|
+
? flatMap(order, (item) => {
|
|
61
|
+
if (!item || !Array.isArray(item)) return []
|
|
62
|
+
return item.map((modGroup, idx) => ({
|
|
63
|
+
deletedAt: order.deletedAt ?? null,
|
|
64
|
+
id: `${order.id}-${idx + 1}`, // Ensuring uniqueness with string concatenation
|
|
65
|
+
orderId: order.orderId ?? null,
|
|
66
|
+
price: order.price ?? 0,
|
|
67
|
+
productId: order.productId ?? '',
|
|
68
|
+
quantity: modGroup.productQuantity ?? 1,
|
|
69
|
+
deposit: order.deposit ?? 0,
|
|
70
|
+
orderProductModifiers: modGroup.modifiers.map((mod) => ({
|
|
71
|
+
modifierId: mod.modifierId ?? '',
|
|
72
|
+
price: mod.price ?? 0,
|
|
73
|
+
productId: mod.productId ?? '',
|
|
74
|
+
quantity: mod.quantity ?? 1,
|
|
75
|
+
modifierSetId: mod.modifierSetId ?? '',
|
|
76
|
+
modifier: mod.modifier ?? null,
|
|
77
|
+
})),
|
|
78
|
+
}))
|
|
79
|
+
})
|
|
80
|
+
: []
|
|
81
|
+
|
|
82
|
+
const renderProductItem = ({
|
|
83
|
+
product,
|
|
84
|
+
productsForCategory,
|
|
85
|
+
}: {
|
|
86
|
+
product: OrderProduct
|
|
87
|
+
productsForCategory: Product[]
|
|
88
|
+
}) => {
|
|
89
|
+
if (product.quantity === 0) {
|
|
90
|
+
return null
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const name =
|
|
94
|
+
productsForCategory.find((item) => item.id === product.productId)?.name || ''
|
|
58
95
|
|
|
96
|
+
return {
|
|
97
|
+
key: product.id,
|
|
98
|
+
name,
|
|
99
|
+
quantity: (
|
|
100
|
+
<div className='quantity'>
|
|
101
|
+
<div className='multiplier'>x</div>
|
|
102
|
+
{product.quantity}
|
|
103
|
+
</div>
|
|
104
|
+
),
|
|
105
|
+
price: formatPrice(product.price),
|
|
106
|
+
modifier: product?.orderProductModifiers?.map(renderModifierItem) || [],
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const renderModifierItem = (orderModifier: OrderModifier) => {
|
|
111
|
+
const { quantity, modifier, modifierId, price } = orderModifier
|
|
59
112
|
if (quantity === 0) {
|
|
60
113
|
return null
|
|
61
114
|
}
|
|
62
115
|
|
|
63
116
|
return {
|
|
64
|
-
key:
|
|
65
|
-
name:
|
|
117
|
+
key: modifierId,
|
|
118
|
+
name: ` - ${modifier?.name || ''}`,
|
|
66
119
|
quantity: (
|
|
67
120
|
<div className='quantity'>
|
|
68
121
|
<div className='multiplier'>x</div>
|
|
@@ -80,15 +133,33 @@ export const useTableData = ({
|
|
|
80
133
|
|
|
81
134
|
return productCategories.reduce(
|
|
82
135
|
(previousValues: StaticTableData[], categoryId) => {
|
|
83
|
-
const
|
|
136
|
+
const productsForCategory = order?.products.filter(
|
|
84
137
|
(product) => product.productCategoryId === categoryId,
|
|
85
138
|
)
|
|
86
139
|
|
|
140
|
+
const products = order.orderProducts.filter((el) =>
|
|
141
|
+
productsForCategory
|
|
142
|
+
.map((product) => product.id)
|
|
143
|
+
.includes(el.productId),
|
|
144
|
+
)
|
|
145
|
+
|
|
87
146
|
if (!products.length) {
|
|
88
147
|
return previousValues
|
|
89
148
|
}
|
|
90
|
-
|
|
91
|
-
|
|
149
|
+
const productsWithReworkedModifier = products.map((product) => {
|
|
150
|
+
if (!product.orderProductModifiers.length) return product
|
|
151
|
+
return reworkProductStructure(product)
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
const filteredProducts = flatten(productsWithReworkedModifier).map(
|
|
155
|
+
(product) =>
|
|
156
|
+
renderProductItem({ product , productsForCategory }),
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
const productWithModifier = flatMap(filteredProducts, (item) => [
|
|
160
|
+
item,
|
|
161
|
+
...item.modifier,
|
|
162
|
+
])
|
|
92
163
|
|
|
93
164
|
if (!filteredProducts.length) {
|
|
94
165
|
return previousValues
|
|
@@ -96,8 +167,8 @@ export const useTableData = ({
|
|
|
96
167
|
|
|
97
168
|
return [
|
|
98
169
|
...previousValues,
|
|
99
|
-
renderCategoryItem(
|
|
100
|
-
...
|
|
170
|
+
renderCategoryItem(productsForCategory),
|
|
171
|
+
...productWithModifier,
|
|
101
172
|
]
|
|
102
173
|
},
|
|
103
174
|
[],
|
|
@@ -133,6 +204,5 @@ export const useTableData = ({
|
|
|
133
204
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
205
|
[order, externalDiscount, isPaymentProcessed],
|
|
135
206
|
)
|
|
136
|
-
|
|
137
207
|
return data
|
|
138
208
|
}
|
|
@@ -6,6 +6,7 @@ import { Product } from '@licklist/core/dist/DataMapper/Product/ProductDataMappe
|
|
|
6
6
|
import { PAYMENT_TYPE_DISCOUNT } from '@licklist/core/dist/DataMapper/Order/PaymentDataMapper'
|
|
7
7
|
import { PaymentDetail } from '@licklist/core/dist/DataMapper/Order/PaymentDetailDataMapper'
|
|
8
8
|
import { PAYMENT_TYPE_TRANSLATE_KEYS } from '../hooks/useTableData'
|
|
9
|
+
import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper'
|
|
9
10
|
|
|
10
11
|
const TRANSLATE_KEYS = {
|
|
11
12
|
totalAmount: 'totalPaid',
|
|
@@ -28,6 +29,7 @@ export const calculateTotalPrice = (
|
|
|
28
29
|
order: Order,
|
|
29
30
|
externalPaymentDetails?: ExternalPaymnetDetail[],
|
|
30
31
|
) => {
|
|
32
|
+
|
|
31
33
|
const totalPrice =
|
|
32
34
|
order?.orderProducts?.reduce(
|
|
33
35
|
(total: number, product) =>
|
|
@@ -125,5 +127,26 @@ export const getTotalSumByCategory = (
|
|
|
125
127
|
product,
|
|
126
128
|
)
|
|
127
129
|
|
|
130
|
+
const modifierFromProduct = orderProducts.find(
|
|
131
|
+
(orderProduct) => orderProduct.productId === product.id,
|
|
132
|
+
)?.orderProductModifiers
|
|
133
|
+
if (modifierFromProduct) {
|
|
134
|
+
const modifierPrice = modifierFromProduct.reduce(
|
|
135
|
+
(prevSum: number, { modifiers }) => {
|
|
136
|
+
const modifiersPrices = modifiers.reduce(
|
|
137
|
+
(prevSumModifier: number, modifier: OrderModifier) =>
|
|
138
|
+
prevSumModifier + modifier.price * modifier.quantity,
|
|
139
|
+
0,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
return prevSum + modifiersPrices
|
|
143
|
+
},
|
|
144
|
+
0,
|
|
145
|
+
)
|
|
146
|
+
const priceWithModifier = price + modifierPrice
|
|
147
|
+
|
|
148
|
+
return prevSum + priceWithModifier * quantity
|
|
149
|
+
}
|
|
150
|
+
|
|
128
151
|
return prevSum + price * quantity
|
|
129
152
|
}, 0)
|
|
@@ -23,7 +23,7 @@ const paymentNotProcessedSummary = ({
|
|
|
23
23
|
? getExternalPaymentDetail(paymentDetail)
|
|
24
24
|
: undefined
|
|
25
25
|
|
|
26
|
-
const total = calculateTotalPrice(order, externalPaymentDetail)
|
|
26
|
+
const total = order?.fullAmount || calculateTotalPrice(order, externalPaymentDetail)
|
|
27
27
|
|
|
28
28
|
const summaryItems: SummaryItem[] = [
|
|
29
29
|
{
|
|
@@ -58,9 +58,10 @@ const processedPaymentSummary = ({
|
|
|
58
58
|
price: getPaymentValueByType(order.payments, key),
|
|
59
59
|
}))
|
|
60
60
|
|
|
61
|
-
const total = calculateTotalPrice(order, externalPaymentDetail)
|
|
61
|
+
const total = order.fullAmount || calculateTotalPrice(order, externalPaymentDetail)
|
|
62
62
|
|
|
63
63
|
const totalDiscount = calculateTotalDiscount(order.payments)
|
|
64
|
+
|
|
64
65
|
let summaryItems: SummaryItem[] = [
|
|
65
66
|
{
|
|
66
67
|
translateKey: AMOUNT_TOTAL,
|
|
@@ -59,20 +59,19 @@ export const PaymentStatusPage = ({
|
|
|
59
59
|
|
|
60
60
|
if (isLoading) return <LoaderIndicator isLoaded={false} />
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
orderTotalAmountByFormValues > orderCartAmountByFormValues;
|
|
62
|
+
const orderCartAmountByFormValues = cartSumByOrderProducts({
|
|
63
|
+
orderProducts:
|
|
64
|
+
bookingSummaryProps?.formValues &&
|
|
65
|
+
Object.values(bookingSummaryProps?.formValues),
|
|
66
|
+
})
|
|
67
|
+
const orderTotalAmountByFormValues = cartSumByOrderProducts({
|
|
68
|
+
orderProducts:
|
|
69
|
+
bookingSummaryProps?.formValues &&
|
|
70
|
+
Object.values(bookingSummaryProps?.formValues),
|
|
71
|
+
isTotalSum: true,
|
|
72
|
+
})
|
|
73
|
+
const hasRemaingToPay =
|
|
74
|
+
orderTotalAmountByFormValues > orderCartAmountByFormValues
|
|
76
75
|
|
|
77
76
|
// User can fill promocode only in iframe appcliation.
|
|
78
77
|
// It didn't possible via payment link. This check will
|
|
@@ -81,9 +80,9 @@ const hasRemaingToPay =
|
|
|
81
80
|
// For payment status page booking summary props can be empty
|
|
82
81
|
// so we should also check for them
|
|
83
82
|
const isCalculatedAmountGreaterThanOrderAmount =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
!hasRemaingToPay &&
|
|
84
|
+
bookingSummaryProps &&
|
|
85
|
+
orderCartAmountByFormValues > totalAmount
|
|
87
86
|
|
|
88
87
|
return (
|
|
89
88
|
<Page
|
|
@@ -140,7 +139,7 @@ const hasRemaingToPay =
|
|
|
140
139
|
<>
|
|
141
140
|
{isCalculatedAmountGreaterThanOrderAmount && (
|
|
142
141
|
<SummaryTotalBlock
|
|
143
|
-
|
|
142
|
+
label={t(hasRemaingToPay ? 'payNow' : 'total')}
|
|
144
143
|
amount={
|
|
145
144
|
orderCartAmountByFormValues +
|
|
146
145
|
(bookingSummaryProps?.transactionFee || 0)
|
|
@@ -159,9 +158,9 @@ const hasRemaingToPay =
|
|
|
159
158
|
(bookingSummaryProps?.transactionFee || 0)
|
|
160
159
|
}
|
|
161
160
|
/>
|
|
162
|
-
|
|
161
|
+
{hasRemaingToPay && (
|
|
163
162
|
<SummaryTotalBlock
|
|
164
|
-
label={t(
|
|
163
|
+
label={t('remaining')}
|
|
165
164
|
amount={
|
|
166
165
|
orderTotalAmountByFormValues -
|
|
167
166
|
orderCartAmountByFormValues
|
|
@@ -61,20 +61,22 @@ export const injectComponentsInRyftForm = ({
|
|
|
61
61
|
divider.id = 'mobile-pay-divider'
|
|
62
62
|
container.id = 'mobile-pay-divider-container'
|
|
63
63
|
container.append(dividerText, divider)
|
|
64
|
-
const payIframe = document.getElementById(
|
|
64
|
+
const payIframe = document.getElementById('ryft-pay-iframe')
|
|
65
65
|
if (payIframe) {
|
|
66
66
|
const formBox = document.getElementById('form-disable-box')
|
|
67
67
|
if (formBox) {
|
|
68
|
-
formBox.style.display = isDisableButton ?
|
|
68
|
+
formBox.style.display = isDisableButton ? 'block' : 'none'
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const googleButton = document.getElementById(
|
|
72
72
|
'gpay-button-online-api-id',
|
|
73
73
|
) as HTMLButtonElement
|
|
74
|
-
const appleButton =document.getElementById(
|
|
74
|
+
const appleButton = document.getElementById(
|
|
75
|
+
'ryft-pay-apple-pay-button',
|
|
76
|
+
) as HTMLButtonElement
|
|
75
77
|
if (googleButton) {
|
|
76
78
|
googleButton.disabled = isDisableButton
|
|
77
|
-
googleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
79
|
+
googleButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
78
80
|
}
|
|
79
81
|
if (appleButton) {
|
|
80
82
|
appleButton.disabled = isDisableButton
|
|
@@ -86,7 +88,6 @@ export const injectComponentsInRyftForm = ({
|
|
|
86
88
|
const applePayButton = document.createElement('button')
|
|
87
89
|
applePayButton.id = 'apple-pay'
|
|
88
90
|
applePayButton.type = 'button'
|
|
89
|
-
applePayButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
90
91
|
applePayButton.className = 'bg-dark btn btn-primary apple-pay-button'
|
|
91
92
|
applePayButton.textContent = t('Events:payWithApple')
|
|
92
93
|
applePayButton.onclick = onApplePayButtonClick
|
package/src/layout/DropDown.tsx
CHANGED
|
@@ -35,6 +35,8 @@ export function EmailTemplateCard({
|
|
|
35
35
|
return (
|
|
36
36
|
<div className='snippet-template-card'>
|
|
37
37
|
<div className='snippet-template-card-header'>
|
|
38
|
+
{/* TODO fix issue react router types
|
|
39
|
+
@ts-expect-error */}
|
|
38
40
|
<Link to={href}>{name}</Link>
|
|
39
41
|
{hasPermission && Boolean(onRemove) && (
|
|
40
42
|
<ConfirmModal
|
|
@@ -434,6 +434,7 @@ export const EmailTemplateControl = forwardRef(
|
|
|
434
434
|
`templateOptionValues.${option?.id}.value`,
|
|
435
435
|
)}
|
|
436
436
|
type='number'
|
|
437
|
+
onWheel={(event) => event.currentTarget.blur()}
|
|
437
438
|
placeholder={t(`Design:${option.name}`)}
|
|
438
439
|
id={option.name + option.id}
|
|
439
440
|
defaultValue={option.selectedValue || ''}
|
|
@@ -33,6 +33,8 @@ export function SmsTemplateCard({
|
|
|
33
33
|
return (
|
|
34
34
|
<div className='snippet-template-card'>
|
|
35
35
|
<div className='snippet-template-card-header'>
|
|
36
|
+
{/* TODO fix issue react router types
|
|
37
|
+
@ts-expect-error */}
|
|
36
38
|
<Link to={href}>{name}</Link>
|
|
37
39
|
{hasPermission && Boolean(onRemove) && (
|
|
38
40
|
<ConfirmModal
|
|
@@ -198,7 +198,8 @@ export const DateAndRecurrenceInput = ({
|
|
|
198
198
|
move(prevIndex, nextIndex)
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
const errorMessage =
|
|
201
|
+
const errorMessage =
|
|
202
|
+
errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
|
|
202
203
|
|
|
203
204
|
useEffect(() => {
|
|
204
205
|
if (fields.length) {
|
|
@@ -308,9 +309,7 @@ export const DateAndRecurrenceInput = ({
|
|
|
308
309
|
})}
|
|
309
310
|
/>
|
|
310
311
|
|
|
311
|
-
<div className='manual-form-error'>
|
|
312
|
-
{errorMessage}
|
|
313
|
-
</div>
|
|
312
|
+
<div className='manual-form-error'>{errorMessage}</div>
|
|
314
313
|
</div>
|
|
315
314
|
</OverlayTrigger>
|
|
316
315
|
</Form.Group>
|
|
@@ -195,7 +195,8 @@ export const DateInput = ({
|
|
|
195
195
|
}, 100)
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
const errorMessage =
|
|
198
|
+
const errorMessage =
|
|
199
|
+
errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
|
|
199
200
|
|
|
200
201
|
return (
|
|
201
202
|
<Form.Group>
|
|
@@ -284,9 +285,7 @@ export const DateInput = ({
|
|
|
284
285
|
})}
|
|
285
286
|
/>
|
|
286
287
|
|
|
287
|
-
<div className='manual-form-error'>
|
|
288
|
-
{errorMessage}
|
|
289
|
-
</div>
|
|
288
|
+
<div className='manual-form-error'>{errorMessage}</div>
|
|
290
289
|
</div>
|
|
291
290
|
</OverlayTrigger>
|
|
292
291
|
</Form.Group>
|
|
@@ -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
|
|
@@ -216,7 +229,7 @@ export function ProductsControl({
|
|
|
216
229
|
id={String(product._id)}
|
|
217
230
|
isExpanded={isFirstProductAdded}
|
|
218
231
|
isInvalid={!!categoryProductErrors}
|
|
219
|
-
title={value}
|
|
232
|
+
title={`${value} (ID:${product.id})`}
|
|
220
233
|
isOverride={isOverrides}
|
|
221
234
|
badge={
|
|
222
235
|
<Badge className='product-badge'>{t('product')}</Badge>
|
|
@@ -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,
|