@licklist/design 0.71.6-dev.8 → 0.71.6
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 +1 -2
- package/dist/auth/Login/LoginFormComponent.d.ts.map +1 -1
- package/dist/auth/Logout/Logout.js +0 -1
- 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 +0 -2
- 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/component/SaleDeadline/SaleDeadline.d.ts +1 -7
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +7 -10
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -3
- package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts +1 -0
- package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts.map +1 -1
- package/dist/events/edit-event-modal/hooks/useValidationOptions.js +6 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +0 -1
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +1 -2
- 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 +1 -2
- package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/utils/index.js +12 -24
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/EventVenueMap.js +0 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.js +4 -11
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +2 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts +2 -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 +2 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts +2 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.js +2 -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 -22
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +1 -4
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +2 -3
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
- package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.js +1 -2
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -6
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +5 -29
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +5 -15
- package/dist/iframe/ryft/RyftPaymentForm.js +0 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +5 -4
- package/dist/index.js +0 -1
- package/dist/layout/DropDown.d.ts +1 -2
- 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 +0 -3
- package/dist/notification/sms-template/card/SmsTemplateCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +0 -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/control/ProductSetControl.d.ts +0 -2
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +0 -5
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +2 -49
- package/dist/product-set/form/ProductSetForm.d.ts +2 -6
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +2 -3
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +2 -0
- package/dist/product-set/form/ProductsControl.js +0 -2
- package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +3 -0
- 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 +3 -0
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +0 -3
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -19
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.js +0 -1
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.js +0 -3
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.js +0 -3
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +2 -0
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +0 -21
- package/dist/sales/life-time-sales/LifeTimeSalesChart.js +0 -1
- package/dist/sales/manual-booking/select-event/SelectEvent.js +0 -1
- package/dist/sales/manual-booking/select-menu/SelectMenu.js +0 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +0 -1
- package/dist/sales/modals/refund-modal/RefundModal.d.ts.map +1 -1
- package/dist/sales/modals/refund-modal/RefundModal.js +0 -1
- 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 +1 -16
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
- 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 +1 -3
- package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +4 -10
- package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +0 -3
- 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 +0 -3
- package/dist/static/loader/LoaderIndicator.d.ts +3 -2
- package/dist/static/loader/LoaderIndicator.d.ts.map +1 -1
- package/dist/static/loader/LoaderIndicator.js +2 -4
- package/dist/static/loader/index.d.ts +0 -1
- 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 +0 -3
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +4 -1
- package/dist/styles/iframe-events/Calendar.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +0 -22
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +4 -2
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/static/Loader.scss +0 -9
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +0 -3
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +0 -3
- package/package.json +6 -8
- package/src/affiliate/form/AffiliateForm.tsx +0 -1
- package/src/auth/Layout/AuthNavComponent.tsx +0 -4
- package/src/auth/Login/LoginComponent.tsx +1 -3
- package/src/auth/Login/LoginFormComponent.tsx +0 -2
- package/src/auth/Register/RegisterComponent.tsx +0 -2
- package/src/auth/Register/RegisterFormComponent.tsx +0 -4
- package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +0 -4
- package/src/auth/Router.tsx +0 -2
- package/src/calendar/Calendar.stories.tsx +2 -2
- package/src/calendar/utils/index.ts +1 -1
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +19 -47
- package/src/events/edit-event-modal/hooks/useValidationOptions.tsx +5 -0
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -6
- package/src/events/event-card/utils.ts +9 -10
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -3
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +1 -2
- package/src/events/event-statistic-modal/utils/index.ts +32 -55
- package/src/events/event-venue-map/EventVenueMap.tsx +0 -1
- package/src/events/event-venue-map/hooks/useCanvasSize.ts +1 -5
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -0
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +6 -1
- package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +3 -0
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +3 -22
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -10
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +7 -4
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
- package/src/iframe/page/components/PageBody/constants.ts +0 -1
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +2 -10
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
- package/src/iframe/payment/payment-page/PaymentPage.tsx +18 -65
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +6 -27
- package/src/iframe/ryft/utils/ryft-form.ts +5 -6
- package/src/layout/DropDown.tsx +1 -1
- package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
- package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
- package/src/notification/sms-template/card/SmsTemplateCard.tsx +0 -2
- package/src/product-set/card/ProductSetCard.tsx +1 -7
- package/src/product-set/control/DateAndRecurrenceInput.tsx +4 -3
- package/src/product-set/control/DateInput.tsx +4 -3
- package/src/product-set/control/ProductSetControl.tsx +0 -5
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -38
- package/src/product-set/form/ProductSetForm.tsx +2 -8
- package/src/product-set/form/ProductZonesControl.tsx +4 -1
- package/src/product-set/form/SelectCategoryModal.tsx +2 -2
- package/src/product-set/form/SubProductsControl.tsx +3 -0
- package/src/product-set/form/VenueMapsControl.tsx +4 -1
- package/src/product-set/product/ProductControl.tsx +1 -0
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
- package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
- package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
- package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +0 -17
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
- package/src/resource/form/components/CapacityControl.tsx +0 -1
- package/src/resource/form/components/SortControl.tsx +0 -1
- package/src/sales/booking/results/components/ResultCard.tsx +2 -0
- package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
- package/src/sales/modals/refund-modal/RefundModal.tsx +0 -1
- package/src/setting/admin/AdminSettingForm.tsx +0 -4
- package/src/setting/admin/PaymentFeeForm.tsx +0 -5
- package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +0 -2
- package/src/snippet/snippet-template/preview/Preview.tsx +2 -1
- package/src/sortable-tree/SortableTreeItem.tsx +0 -6
- package/src/static/CurrencyNumberInput.tsx +0 -1
- package/src/static/date-range-input/utils/index.ts +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +0 -1
- package/src/static/loader/LoaderIndicator.tsx +3 -6
- package/src/static/loader/index.ts +0 -1
- package/src/static/number-input/NumberInput.tsx +0 -1
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +4 -1
- package/src/styles/iframe-events/Calendar.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +0 -22
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +4 -2
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/static/Loader.scss +0 -9
- package/src/zone/form/components/GameDurationControl.tsx +0 -1
- package/src/zone/form/components/SortControl.tsx +0 -1
- package/yarn.lock +948 -1176
- package/dist/static/loader/FullScreenLoader.d.ts +0 -8
- package/dist/static/loader/FullScreenLoader.d.ts.map +0 -1
- package/dist/static/loader/FullScreenLoader.js +0 -41
- package/src/static/loader/FullScreenLoader.tsx +0 -16
|
@@ -28,12 +28,14 @@ export type ProductsByMenuStepsProps = {
|
|
|
28
28
|
orderItems: OrderItems
|
|
29
29
|
step: MenuStep
|
|
30
30
|
productsWithErrors?: QuantityCheckProductInfo[]
|
|
31
|
+
isPaymentLink?: boolean
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export const ProductsByMenuStep = ({
|
|
34
35
|
orderItems,
|
|
35
36
|
step,
|
|
36
37
|
productsWithErrors = [],
|
|
38
|
+
isPaymentLink,
|
|
37
39
|
}: ProductsByMenuStepsProps) => {
|
|
38
40
|
const { productCategories } = step
|
|
39
41
|
|
|
@@ -61,6 +63,7 @@ export const ProductsByMenuStep = ({
|
|
|
61
63
|
|
|
62
64
|
return (
|
|
63
65
|
<ProductSummary
|
|
66
|
+
isPaymentLink={isPaymentLink}
|
|
64
67
|
key={orderItem.id}
|
|
65
68
|
name={orderItem.name}
|
|
66
69
|
productQuantityError={productQuantityError}
|
package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx
CHANGED
|
@@ -22,14 +22,7 @@ export const SummaryTotal = ({
|
|
|
22
22
|
|
|
23
23
|
const cartSum = isFreePayment
|
|
24
24
|
? 0
|
|
25
|
-
: cartSumByOrderProducts(
|
|
26
|
-
|
|
27
|
-
const totalSum = isFreePayment
|
|
28
|
-
? 0
|
|
29
|
-
: cartSumByOrderProducts({ orderProducts, isTotalSum: true }) +
|
|
30
|
-
transactionFee
|
|
31
|
-
|
|
32
|
-
const hasRemaingToPay = totalSum > cartSum
|
|
25
|
+
: cartSumByOrderProducts(orderProducts) + transactionFee
|
|
33
26
|
|
|
34
27
|
if (!orderProducts.length) {
|
|
35
28
|
return null
|
|
@@ -37,26 +30,14 @@ export const SummaryTotal = ({
|
|
|
37
30
|
|
|
38
31
|
return (
|
|
39
32
|
<div className='d-flex flex-column justify-content-between'>
|
|
40
|
-
<SummaryTotalBlock
|
|
41
|
-
|
|
42
|
-
amount={cartSum}
|
|
43
|
-
/>
|
|
33
|
+
<SummaryTotalBlock label={t('total')} amount={cartSum} />
|
|
34
|
+
|
|
44
35
|
{!!totalWithDiscount && !isFreePayment && (
|
|
45
36
|
<SummaryTotalBlock
|
|
46
37
|
label={t('totalWithDiscount')}
|
|
47
38
|
amount={totalWithDiscount + transactionFee}
|
|
48
39
|
/>
|
|
49
40
|
)}
|
|
50
|
-
{hasRemaingToPay && (
|
|
51
|
-
<>
|
|
52
|
-
<SummaryTotalBlock
|
|
53
|
-
label={t('remaining')}
|
|
54
|
-
amount={totalSum - cartSum}
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
<SummaryTotalBlock label={t('total')} amount={totalSum} />
|
|
58
|
-
</>
|
|
59
|
-
)}
|
|
60
41
|
</div>
|
|
61
42
|
)
|
|
62
43
|
}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { QuantityCheckProductInfo } from '@licklist/plugins/dist/types/Api/verifyStock'
|
|
2
2
|
import { OrderItem } from '@licklist/plugins/dist/types/context/Iframe/orderItems'
|
|
3
3
|
|
|
4
|
-
export const cartSumByOrderProducts = ({
|
|
5
|
-
orderProducts,
|
|
6
|
-
isTotalSum,
|
|
7
|
-
}: {
|
|
8
|
-
orderProducts?: OrderItem[]
|
|
9
|
-
isTotalSum?: boolean
|
|
10
|
-
}) => {
|
|
4
|
+
export const cartSumByOrderProducts = (orderProducts?: OrderItem[]) => {
|
|
11
5
|
if (!orderProducts || !orderProducts.length) {
|
|
12
6
|
return 0
|
|
13
7
|
}
|
|
14
8
|
return orderProducts.reduce((prevSumValue: number, product) => {
|
|
15
9
|
if (!product) return 0
|
|
16
|
-
const price =
|
|
17
|
-
? product?.price
|
|
18
|
-
: product?.deposit || product?.price
|
|
10
|
+
const price = product?.hasDeposit ? product?.deposit : product?.price
|
|
19
11
|
return prevSumValue + price * product.quantity
|
|
20
12
|
}, 0)
|
|
21
13
|
}
|
|
@@ -132,10 +132,13 @@ export const CategoryProduct = ({
|
|
|
132
132
|
</div>
|
|
133
133
|
<div className='iframe-event__product-price-wrapper'>
|
|
134
134
|
<span className='product-price'>
|
|
135
|
-
{formatNumber(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
{formatNumber(
|
|
136
|
+
category.allowDeposits ? product?.deposit : product.price,
|
|
137
|
+
{
|
|
138
|
+
style: 'currency',
|
|
139
|
+
currency: Config.Currency.GBP,
|
|
140
|
+
},
|
|
141
|
+
)}
|
|
139
142
|
</span>
|
|
140
143
|
<ProductQuantityInput
|
|
141
144
|
onChange={onChange}
|
package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx
CHANGED
|
@@ -89,7 +89,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
89
89
|
<FormControl
|
|
90
90
|
type='number'
|
|
91
91
|
onChange={(e) => handleChangeValue(Number(e.target.value))}
|
|
92
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
93
92
|
value={value}
|
|
94
93
|
min={0}
|
|
95
94
|
max={max}
|
|
@@ -102,14 +101,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
102
101
|
<button
|
|
103
102
|
type='button'
|
|
104
103
|
onClick={handleArrowUpClick}
|
|
105
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
106
|
-
onFocus={(event) =>
|
|
107
|
-
event.target.addEventListener(
|
|
108
|
-
'wheel',
|
|
109
|
-
(event) => event.preventDefault(),
|
|
110
|
-
{ passive: false },
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
104
|
className={`payment-number-input__btn-up ${
|
|
114
105
|
plusButtonGreyedOut && 'disabled-number-input-button'
|
|
115
106
|
}`}
|
|
@@ -2,7 +2,6 @@ import { useEffect, useMemo, useState, useRef } from 'react'
|
|
|
2
2
|
import { useWindowDimensions } from '@licklist/plugins/dist/hooks/Media/useWindowDimensions'
|
|
3
3
|
import {
|
|
4
4
|
TAB_WIDTH,
|
|
5
|
-
MOBILE_WIDTH,
|
|
6
5
|
STANDARD_BODY_PADDING,
|
|
7
6
|
STANDARD_HEADER_FOOTER_SIZE,
|
|
8
7
|
RIGHT_BLOCK_RESIZED_EVENT,
|
|
@@ -61,15 +60,6 @@ export const useResizePageBody = () => {
|
|
|
61
60
|
})
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
if (width <= MOBILE_WIDTH && Boolean(CALENDAR_WRAPPER_HEIGHT)) {
|
|
65
|
-
return {
|
|
66
|
-
maxHeight:
|
|
67
|
-
height -
|
|
68
|
-
STANDARD_BODY_PADDING -
|
|
69
|
-
rightBlockHeight -
|
|
70
|
-
CALENDAR_WRAPPER_HEIGHT,
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
63
|
return {
|
|
74
64
|
maxHeight:
|
|
75
65
|
height -
|
|
@@ -97,6 +87,7 @@ export const useResizePageBody = () => {
|
|
|
97
87
|
|
|
98
88
|
if (width >= TAB_WIDTH && !isContainerSizeApplied) {
|
|
99
89
|
isContainerSizeApplied.current = true
|
|
90
|
+
|
|
100
91
|
setLeftBlockContainerSizes({
|
|
101
92
|
width: leftBlockContainer.clientWidth,
|
|
102
93
|
height: leftBlockContainer.clientHeight,
|
|
@@ -126,6 +117,7 @@ export const useResizePageBody = () => {
|
|
|
126
117
|
) {
|
|
127
118
|
minimalMapSize.current = calculatedMinimalMapSize
|
|
128
119
|
}
|
|
120
|
+
|
|
129
121
|
return {
|
|
130
122
|
width: leftBlockContainer.clientWidth,
|
|
131
123
|
height: minimalMapSize.current,
|
|
@@ -28,7 +28,7 @@ interface PaymentProps extends RyftPaymentFormProps {
|
|
|
28
28
|
onFailIframePayment?: () => void
|
|
29
29
|
data?: PaymentLinkResponse | null
|
|
30
30
|
isLoading: boolean
|
|
31
|
-
bookingSummaryProps: BookingSummaryProps
|
|
31
|
+
bookingSummaryProps: Omit<BookingSummaryProps, 'totallWithDiscount'>
|
|
32
32
|
paymentMetadata?: PaymentMetadata
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -103,33 +103,17 @@ export const PaymentPage = ({
|
|
|
103
103
|
)
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
bookingSummaryProps?.formValues &&
|
|
106
|
+
const orderTotalAmountByFormValues = cartSumByOrderProducts(
|
|
107
|
+
bookingSummaryProps?.formValues &&
|
|
109
108
|
Object.values(bookingSummaryProps?.formValues),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const orderTotalAmountByFormValues = cartSumByOrderProducts({
|
|
113
|
-
orderProducts:
|
|
114
|
-
bookingSummaryProps?.formValues &&
|
|
115
|
-
Object.values(bookingSummaryProps?.formValues),
|
|
116
|
-
isTotalSum: true,
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
const hasRemaingToPay =
|
|
120
|
-
orderTotalAmountByFormValues > orderCartAmountByFormValues
|
|
109
|
+
)
|
|
121
110
|
|
|
122
111
|
// User can fill promo code only in iframe application.
|
|
123
112
|
// It isn't possible via payment link. This check will
|
|
124
113
|
// be applied when there is no metadata and in case when
|
|
125
114
|
// orderValues sum is greater than amount in order.
|
|
126
115
|
const isCalculatedAmountGreaterThanOrderAmount =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const isPaymentLinkWithRemainingToPay =
|
|
130
|
-
data?.remaining_to_pay && !!Number(data?.remaining_to_pay)
|
|
131
|
-
const totalPaidWithRemainingToPay =
|
|
132
|
-
data?.amount_to_pay && !!Number(data?.amount_to_pay)
|
|
116
|
+
orderTotalAmountByFormValues > data?.amount
|
|
133
117
|
|
|
134
118
|
return (
|
|
135
119
|
<Page className='payment_link'>
|
|
@@ -189,56 +173,25 @@ export const PaymentPage = ({
|
|
|
189
173
|
<>
|
|
190
174
|
{isCalculatedAmountGreaterThanOrderAmount && (
|
|
191
175
|
<SummaryTotalBlock
|
|
192
|
-
label={t(
|
|
176
|
+
label={t('total')}
|
|
193
177
|
amount={
|
|
194
|
-
|
|
178
|
+
orderTotalAmountByFormValues +
|
|
195
179
|
(bookingSummaryProps?.transactionFee || 0)
|
|
196
180
|
}
|
|
197
181
|
/>
|
|
198
182
|
)}
|
|
199
183
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<SummaryTotalBlock
|
|
212
|
-
label={t('remaningToPay')}
|
|
213
|
-
amount={Number(data?.remaining_to_pay)}
|
|
214
|
-
/>
|
|
215
|
-
)}
|
|
216
|
-
|
|
217
|
-
{totalPaidWithRemainingToPay && (
|
|
218
|
-
<SummaryTotalBlock
|
|
219
|
-
label={t('totalAmount')}
|
|
220
|
-
amount={Number(data?.amount_to_pay)}
|
|
221
|
-
/>
|
|
222
|
-
)}
|
|
223
|
-
{isPaymentLinkWithRemainingToPay &&
|
|
224
|
-
totalPaidWithRemainingToPay ? (
|
|
225
|
-
<SummaryTotalBlock
|
|
226
|
-
label={t('payNow')}
|
|
227
|
-
amount={data?.amount}
|
|
228
|
-
/>
|
|
229
|
-
) : (
|
|
230
|
-
<SummaryTotalBlock
|
|
231
|
-
label={t(
|
|
232
|
-
isCalculatedAmountGreaterThanOrderAmount
|
|
233
|
-
? 'totalWithDiscount'
|
|
234
|
-
: 'total',
|
|
235
|
-
)}
|
|
236
|
-
amount={
|
|
237
|
-
data?.amount +
|
|
238
|
-
(bookingSummaryProps?.transactionFee || 0)
|
|
239
|
-
}
|
|
240
|
-
/>
|
|
241
|
-
)}
|
|
184
|
+
<SummaryTotalBlock
|
|
185
|
+
label={t(
|
|
186
|
+
isCalculatedAmountGreaterThanOrderAmount
|
|
187
|
+
? 'totalWithDiscount'
|
|
188
|
+
: 'total',
|
|
189
|
+
)}
|
|
190
|
+
amount={
|
|
191
|
+
data?.amount +
|
|
192
|
+
(bookingSummaryProps?.transactionFee || 0)
|
|
193
|
+
}
|
|
194
|
+
/>
|
|
242
195
|
</>
|
|
243
196
|
)}
|
|
244
197
|
</div>
|
|
@@ -59,19 +59,9 @@ export const PaymentStatusPage = ({
|
|
|
59
59
|
|
|
60
60
|
if (isLoading) return <LoaderIndicator isLoaded={false} />
|
|
61
61
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
62
|
+
const orderTotalAmounByFormValues = cartSumByOrderProducts(
|
|
63
|
+
Object.values(bookingSummaryProps?.formValues ?? {}),
|
|
64
|
+
)
|
|
75
65
|
|
|
76
66
|
// User can fill promocode only in iframe appcliation.
|
|
77
67
|
// It didn't possible via payment link. This check will
|
|
@@ -80,9 +70,7 @@ export const PaymentStatusPage = ({
|
|
|
80
70
|
// For payment status page booking summary props can be empty
|
|
81
71
|
// so we should also check for them
|
|
82
72
|
const isCalculatedAmountGreaterThanOrderAmount =
|
|
83
|
-
|
|
84
|
-
bookingSummaryProps &&
|
|
85
|
-
orderCartAmountByFormValues > totalAmount
|
|
73
|
+
bookingSummaryProps && orderTotalAmounByFormValues > totalAmount
|
|
86
74
|
|
|
87
75
|
return (
|
|
88
76
|
<Page
|
|
@@ -139,9 +127,9 @@ export const PaymentStatusPage = ({
|
|
|
139
127
|
<>
|
|
140
128
|
{isCalculatedAmountGreaterThanOrderAmount && (
|
|
141
129
|
<SummaryTotalBlock
|
|
142
|
-
label={t(
|
|
130
|
+
label={t('total')}
|
|
143
131
|
amount={
|
|
144
|
-
|
|
132
|
+
orderTotalAmounByFormValues +
|
|
145
133
|
(bookingSummaryProps?.transactionFee || 0)
|
|
146
134
|
}
|
|
147
135
|
/>
|
|
@@ -158,15 +146,6 @@ export const PaymentStatusPage = ({
|
|
|
158
146
|
(bookingSummaryProps?.transactionFee || 0)
|
|
159
147
|
}
|
|
160
148
|
/>
|
|
161
|
-
{hasRemaingToPay && (
|
|
162
|
-
<SummaryTotalBlock
|
|
163
|
-
label={t('remaining')}
|
|
164
|
-
amount={
|
|
165
|
-
orderTotalAmountByFormValues -
|
|
166
|
-
orderCartAmountByFormValues
|
|
167
|
-
}
|
|
168
|
-
/>
|
|
169
|
-
)}
|
|
170
149
|
</>
|
|
171
150
|
)}
|
|
172
151
|
</div>
|
|
@@ -61,22 +61,20 @@ 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 =
|
|
75
|
-
'ryft-pay-apple-pay-button',
|
|
76
|
-
) as HTMLButtonElement
|
|
74
|
+
const appleButton =document.getElementById("ryft-pay-apple-pay-button") as HTMLButtonElement
|
|
77
75
|
if (googleButton) {
|
|
78
76
|
googleButton.disabled = isDisableButton
|
|
79
|
-
googleButton.style.opacity =
|
|
77
|
+
googleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
80
78
|
}
|
|
81
79
|
if (appleButton) {
|
|
82
80
|
appleButton.disabled = isDisableButton
|
|
@@ -88,6 +86,7 @@ export const injectComponentsInRyftForm = ({
|
|
|
88
86
|
const applePayButton = document.createElement('button')
|
|
89
87
|
applePayButton.id = 'apple-pay'
|
|
90
88
|
applePayButton.type = 'button'
|
|
89
|
+
applePayButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
91
90
|
applePayButton.className = 'bg-dark btn btn-primary apple-pay-button'
|
|
92
91
|
applePayButton.textContent = t('Events:payWithApple')
|
|
93
92
|
applePayButton.onclick = onApplePayButtonClick
|
package/src/layout/DropDown.tsx
CHANGED
|
@@ -35,8 +35,6 @@ 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 */}
|
|
40
38
|
<Link to={href}>{name}</Link>
|
|
41
39
|
{hasPermission && Boolean(onRemove) && (
|
|
42
40
|
<ConfirmModal
|
|
@@ -434,7 +434,6 @@ export const EmailTemplateControl = forwardRef(
|
|
|
434
434
|
`templateOptionValues.${option?.id}.value`,
|
|
435
435
|
)}
|
|
436
436
|
type='number'
|
|
437
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
438
437
|
placeholder={t(`Design:${option.name}`)}
|
|
439
438
|
id={option.name + option.id}
|
|
440
439
|
defaultValue={option.selectedValue || ''}
|
|
@@ -33,8 +33,6 @@ 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 */}
|
|
38
36
|
<Link to={href}>{name}</Link>
|
|
39
37
|
{hasPermission && Boolean(onRemove) && (
|
|
40
38
|
<ConfirmModal
|
|
@@ -136,13 +136,7 @@ export function ProductSetCard({
|
|
|
136
136
|
onClick={(e) => e.stopPropagation()}
|
|
137
137
|
>
|
|
138
138
|
{Boolean(onRemove) && (
|
|
139
|
-
<ConfirmModal
|
|
140
|
-
content={t(
|
|
141
|
-
override
|
|
142
|
-
? 'confirmRemoveProductSetWithOverrides'
|
|
143
|
-
: 'areUSureYouWantToPerformThisAction',
|
|
144
|
-
)}
|
|
145
|
-
>
|
|
139
|
+
<ConfirmModal>
|
|
146
140
|
{(confirm) => (
|
|
147
141
|
<MenuButton
|
|
148
142
|
onClick={() => {
|
|
@@ -198,8 +198,7 @@ export const DateAndRecurrenceInput = ({
|
|
|
198
198
|
move(prevIndex, nextIndex)
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
const errorMessage =
|
|
202
|
-
errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
|
|
201
|
+
const errorMessage = errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
|
|
203
202
|
|
|
204
203
|
useEffect(() => {
|
|
205
204
|
if (fields.length) {
|
|
@@ -309,7 +308,9 @@ export const DateAndRecurrenceInput = ({
|
|
|
309
308
|
})}
|
|
310
309
|
/>
|
|
311
310
|
|
|
312
|
-
<div className='manual-form-error'>
|
|
311
|
+
<div className='manual-form-error'>
|
|
312
|
+
{errorMessage}
|
|
313
|
+
</div>
|
|
313
314
|
</div>
|
|
314
315
|
</OverlayTrigger>
|
|
315
316
|
</Form.Group>
|
|
@@ -195,8 +195,7 @@ export const DateInput = ({
|
|
|
195
195
|
}, 100)
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
const errorMessage =
|
|
199
|
-
errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
|
|
198
|
+
const errorMessage = errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
|
|
200
199
|
|
|
201
200
|
return (
|
|
202
201
|
<Form.Group>
|
|
@@ -285,7 +284,9 @@ export const DateInput = ({
|
|
|
285
284
|
})}
|
|
286
285
|
/>
|
|
287
286
|
|
|
288
|
-
<div className='manual-form-error'>
|
|
287
|
+
<div className='manual-form-error'>
|
|
288
|
+
{errorMessage}
|
|
289
|
+
</div>
|
|
289
290
|
</div>
|
|
290
291
|
</OverlayTrigger>
|
|
291
292
|
</Form.Group>
|
|
@@ -23,7 +23,6 @@ import { ruleForUrlWithProtocol } from '@licklist/plugins/dist/validation/Rules/
|
|
|
23
23
|
import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
|
|
24
24
|
import { checkIfZoneCategory } from '@licklist/plugins'
|
|
25
25
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
|
|
26
|
-
import { SaleDeadline } from 'src/events/edit-event-modal/component/SaleDeadline'
|
|
27
26
|
import { WarningMessage } from '../../static'
|
|
28
27
|
import { SelectItem } from '../../types/generic/SelectItem'
|
|
29
28
|
import {
|
|
@@ -67,7 +66,6 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
|
|
|
67
66
|
productGroups?: SelectItem[]
|
|
68
67
|
relyOnPeopleType?: RelyOnPeopleType | null
|
|
69
68
|
fieldSetId?: number
|
|
70
|
-
saleDeadline?: number
|
|
71
69
|
steps: Step[]
|
|
72
70
|
emailTemplates?: TemplateItem[]
|
|
73
71
|
smsTemplates?: TemplateItem[]
|
|
@@ -95,7 +93,6 @@ export interface ProductSetControlProps {
|
|
|
95
93
|
workHours: WorkHour[] | undefined
|
|
96
94
|
providerHasBookingManagement?: boolean
|
|
97
95
|
isOverrides?: boolean
|
|
98
|
-
saleDeadline?: number
|
|
99
96
|
isCreateNewOverrides?: boolean
|
|
100
97
|
timeZone: string
|
|
101
98
|
}
|
|
@@ -225,8 +222,6 @@ export function ProductSetControl({
|
|
|
225
222
|
</>
|
|
226
223
|
)}
|
|
227
224
|
|
|
228
|
-
<SaleDeadline disabled={false} onlyBefore />
|
|
229
|
-
|
|
230
225
|
<div className='divider' />
|
|
231
226
|
|
|
232
227
|
<TutorialGifCard isOverrides={isOverrides} />
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
useFormContext,
|
|
9
9
|
useWatch,
|
|
10
10
|
} from 'react-hook-form'
|
|
11
|
-
import { FaBars, FaBowlingBall, FaCalendar, FaTicketAlt } from 'react-icons/fa'
|
|
12
11
|
import { useTranslation } from 'react-i18next'
|
|
13
12
|
import { useSensor, MouseSensor } from '@dnd-kit/core'
|
|
14
13
|
import {
|
|
@@ -26,11 +25,7 @@ import { ProductCategoryControl } from '../product-category'
|
|
|
26
25
|
import { ProductCategory } from '../types'
|
|
27
26
|
import { ProductsControl } from './ProductsControl'
|
|
28
27
|
import { ProductSetFormValues, WithIsLoading } from './ProductSetForm'
|
|
29
|
-
import {
|
|
30
|
-
SelectCategoryModal,
|
|
31
|
-
CATEGORY_TYPES_NAMES,
|
|
32
|
-
CategoryConfig,
|
|
33
|
-
} from './SelectCategoryModal'
|
|
28
|
+
import { SelectCategoryModal } from './SelectCategoryModal'
|
|
34
29
|
import { ProductSetLoadingContext } from './context'
|
|
35
30
|
import { VenueMapSetModal } from './VenueMapSetModal'
|
|
36
31
|
import { moveArrayElements, sortArrayByIndex } from '../utils'
|
|
@@ -38,29 +33,6 @@ import { useSortableTreeFunctions } from '../hooks/useSortableTreeFunctions'
|
|
|
38
33
|
// @TODO not for first release
|
|
39
34
|
// import Popover from "./ProductSetFormPopover";
|
|
40
35
|
|
|
41
|
-
const CATEGORIES_TYPE: Partial<Record<CategoryType, CategoryConfig>> = {
|
|
42
|
-
[CATEGORY_TYPES_NAMES.tickets]: {
|
|
43
|
-
label: 'tickets',
|
|
44
|
-
icon: <FaTicketAlt color='#0e8ce2' size={10} />,
|
|
45
|
-
},
|
|
46
|
-
[CATEGORY_TYPES_NAMES.bookings]: {
|
|
47
|
-
label: 'bookings',
|
|
48
|
-
icon: <FaCalendar color='#0e8ce2' size={10} />,
|
|
49
|
-
},
|
|
50
|
-
[CATEGORY_TYPES_NAMES.menuItems]: {
|
|
51
|
-
label: 'menuItems',
|
|
52
|
-
icon: <FaBars color='#0e8ce2' size={10} />,
|
|
53
|
-
},
|
|
54
|
-
[CATEGORY_TYPES_NAMES.game]: {
|
|
55
|
-
label: 'game',
|
|
56
|
-
icon: <FaBowlingBall color='#0e8ce2' size={10} />,
|
|
57
|
-
},
|
|
58
|
-
[CATEGORY_TYPES_NAMES.fixedDuration]: {
|
|
59
|
-
label: 'fixedDuration',
|
|
60
|
-
icon: <FaCalendar color='#0e8ce2' size={10} />,
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
|
|
64
36
|
interface ProductCategoriesControlProps extends WithIsLoading {
|
|
65
37
|
stepIndex: number
|
|
66
38
|
isOverrides?: boolean
|
|
@@ -86,7 +58,6 @@ const getCategoryDefaultValue = (
|
|
|
86
58
|
remainderExpireAfter: undefined,
|
|
87
59
|
hasBookingManagement: false,
|
|
88
60
|
weight: 0,
|
|
89
|
-
saleDeadlineCategory: 0,
|
|
90
61
|
isReusable: false,
|
|
91
62
|
hasSubEvents: false,
|
|
92
63
|
products: [],
|
|
@@ -257,8 +228,6 @@ export function ProductCategoriesControl({
|
|
|
257
228
|
setIsExpanded(productCategoryId)
|
|
258
229
|
}
|
|
259
230
|
|
|
260
|
-
const categoryType = CATEGORIES_TYPE[productCategory.type]
|
|
261
|
-
|
|
262
231
|
return (
|
|
263
232
|
<Controller
|
|
264
233
|
key={`product-category-${productCategory._id}`}
|
|
@@ -303,12 +272,6 @@ export function ProductCategoriesControl({
|
|
|
303
272
|
)}
|
|
304
273
|
modalClass={ProductSetModalClasses.category}
|
|
305
274
|
isNewAdded={showCategoryModal}
|
|
306
|
-
itemButton={
|
|
307
|
-
<div className='btn-outline-primary item-icon sm border border-primary rounded-sm'>
|
|
308
|
-
{categoryType.icon}
|
|
309
|
-
<span className='ml-2'>{t(categoryType.label)}</span>
|
|
310
|
-
</div>
|
|
311
|
-
}
|
|
312
275
|
body={
|
|
313
276
|
<ProductCategoryControl
|
|
314
277
|
isLoading={isLoading}
|
|
@@ -12,7 +12,7 @@ import { isEqual } from 'lodash'
|
|
|
12
12
|
import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper'
|
|
13
13
|
import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
|
|
14
14
|
import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
|
|
15
|
-
import { transformErrorToMessage } from '@licklist/plugins
|
|
15
|
+
import { transformErrorToMessage } from '@licklist/plugins'
|
|
16
16
|
import { Dialog, useDialogContext } from '../../modals/dialog'
|
|
17
17
|
import {
|
|
18
18
|
ProductSetControl,
|
|
@@ -28,16 +28,12 @@ import { ErrorModal } from '../../iframe/order-process/components/ErrorModal'
|
|
|
28
28
|
export interface WithIsLoading {
|
|
29
29
|
isLoading: boolean
|
|
30
30
|
}
|
|
31
|
-
export interface WithIdOptional {
|
|
32
|
-
id?: number
|
|
33
|
-
}
|
|
34
|
-
|
|
35
31
|
export interface WithId {
|
|
36
32
|
id: number
|
|
37
33
|
}
|
|
38
34
|
export interface ProductSetFormValues
|
|
39
35
|
extends FormValues,
|
|
40
|
-
|
|
36
|
+
WithId,
|
|
41
37
|
ProductSetControlValues {
|
|
42
38
|
steps: Step[]
|
|
43
39
|
isOverrides?: boolean
|
|
@@ -59,7 +55,6 @@ export interface ProductSetFormProps
|
|
|
59
55
|
isCreateAction?: boolean
|
|
60
56
|
isOverrides?: boolean
|
|
61
57
|
workHours?: WorkHour[]
|
|
62
|
-
saleDeadline?: number
|
|
63
58
|
isCreateNewOverrides?: boolean
|
|
64
59
|
timeZone: string
|
|
65
60
|
}
|
|
@@ -78,7 +73,6 @@ export function ProductSetForm({
|
|
|
78
73
|
zones,
|
|
79
74
|
isCreateAction,
|
|
80
75
|
workHours,
|
|
81
|
-
saleDeadline,
|
|
82
76
|
isOverrides,
|
|
83
77
|
isCreateNewOverrides,
|
|
84
78
|
timeZone,
|