@licklist/design 0.78.7 → 0.78.8
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/affiliate/form/AffiliateForm.js +6 -2
- package/dist/auth/AccessDenied/AccessDenied.d.ts.map +1 -1
- package/dist/auth/AccessDenied/AccessDenied.js +4 -3
- package/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +10 -6
- package/dist/auth/ChangePassword/ChangePasswordComponent.d.ts.map +1 -1
- package/dist/auth/ChangePassword/ChangePasswordComponent.js +36 -41
- package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
- package/dist/auth/Layout/AuthNavComponent.js +2 -3
- package/dist/auth/Layout/UserNavDropDown.d.ts.map +1 -1
- package/dist/auth/Layout/UserNavDropDown.js +8 -9
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +57 -60
- package/dist/auth/Logout/Logout.d.ts.map +1 -1
- package/dist/auth/Logout/Logout.js +4 -2
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterComponent.js +53 -58
- package/dist/auth/ResetPassword/ResetPasswordComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordComponent.js +26 -30
- package/dist/auth/Social/SocialCallbackComponent.d.ts.map +1 -1
- package/dist/auth/Social/SocialCallbackComponent.js +3 -3
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts +2 -2
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +0 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.d.ts +1 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +0 -1
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts +2 -2
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.d.ts +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +1 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +3 -4
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +5 -6
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +1 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -1
- package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.d.ts.map +1 -1
- package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.js +3 -2
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.js +3 -3
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts +2 -2
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/OrderItemsTable.js +0 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +0 -5
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/payment-form/PaymentForm.js +0 -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/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -3
- package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/modals/dialog/Dialog.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.js +39 -41
- package/dist/modals/dialog/DialogContext.d.ts +2 -2
- package/dist/modals/dialog/DialogContext.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/pages/PrivacyComponent.d.ts +3 -0
- package/dist/pages/PrivacyComponent.d.ts.map +1 -0
- package/dist/pages/PrivacyComponent.js +536 -0
- package/dist/pages/TermsComponent.d.ts +3 -0
- package/dist/pages/TermsComponent.d.ts.map +1 -0
- package/dist/pages/TermsComponent.js +682 -0
- package/dist/pages/index.d.ts +3 -0
- package/dist/pages/index.d.ts.map +1 -0
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +3 -2
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -2
- package/dist/product-set/utils/index.d.ts +1 -1
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/sales/notes/NotesTableRow.js +0 -1
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.d.ts.map +1 -1
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.js +1 -3
- package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.d.ts.map +1 -1
- package/dist/setting/dashboard/snippets/card/SnippetCard.d.ts.map +1 -1
- package/dist/setting/dashboard/snippets/card/SnippetCard.js +4 -4
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +14 -21
- package/dist/static/RestrictedAccess.d.ts.map +1 -1
- package/dist/static/RestrictedAccess.js +3 -2
- package/dist/static/index.js +1 -1
- package/dist/striped-static-table/StripedStaticTable.js +0 -1
- package/dist/table/ReactTableHelperComponent.d.ts.map +1 -1
- package/dist/table/ReactTableHelperComponent.js +3 -3
- package/dist/table/TableHelperComponent.d.ts.map +1 -1
- package/dist/table/TableHelperComponent.js +3 -3
- package/dist/venue-map-sets/card/VenueMapSetCard.d.ts.map +1 -1
- package/dist/venue-map-sets/card/VenueMapSetCard.js +4 -3
- package/dist/zone/card/ZoneCard.d.ts.map +1 -1
- package/dist/zone/card/ZoneCard.js +4 -3
- package/package.json +23 -20
- package/src/affiliate/form/AffiliateForm.tsx +4 -2
- package/src/auth/AccessDenied/AccessDenied.tsx +4 -3
- package/src/auth/Authorizer.tsx +11 -6
- package/src/auth/ChangePassword/ChangePasswordComponent.tsx +21 -26
- package/src/auth/Layout/AuthNavComponent.tsx +2 -3
- package/src/auth/Layout/UserNavDropDown.tsx +6 -7
- package/src/auth/Login/LoginComponent.tsx +42 -46
- package/src/auth/Logout/Logout.stories.tsx +12 -14
- package/src/auth/Logout/Logout.tsx +4 -3
- package/src/auth/Register/RegisterComponent.tsx +35 -41
- package/src/auth/ResetPassword/ResetPasswordComponent.tsx +16 -20
- package/src/auth/Social/SocialCallbackComponent.tsx +4 -4
- package/src/custom-fields/field-set/providers/CustomFieldSetsProvider.tsx +2 -2
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -0
- package/src/events/event-card/EventCard.tsx +10 -8
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -0
- package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +13 -8
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +12 -4
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +18 -20
- package/src/iframe/event/event-navigation-footer/EventNavigationFooter.tsx +3 -2
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -5
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.tsx +3 -3
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +3 -3
- package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +1 -1
- package/src/iframe/payment/payment-page/PaymentPage.tsx +1 -1
- package/src/iframe/ryft/RyftPaymentForm.tsx +2 -5
- package/src/iframe/ryft/utils/ryft-form.ts +1 -1
- package/src/index.ts +1 -0
- package/src/modals/dialog/Dialog.tsx +35 -36
- package/src/modals/dialog/DialogContext.tsx +8 -2
- package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
- package/src/pages/PrivacyComponent.tsx +318 -0
- package/src/pages/TermsComponent.tsx +306 -0
- package/src/pages/index.ts +2 -0
- package/src/product-set/card/ProductSetCard.tsx +3 -2
- package/src/product-set/form/ProductSetForm.tsx +2 -1
- package/src/product-set/utils/index.ts +15 -14
- package/src/recurrence-input/RecurrenceInput.tsx +4 -3
- package/src/sales/payment-form/components/RyftPayment/RyftPayment.tsx +1 -3
- package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +1 -0
- package/src/setting/dashboard/snippets/card/SnippetCard.tsx +4 -3
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -9
- package/src/static/RestrictedAccess.tsx +3 -6
- package/src/table/ReactTableHelperComponent.tsx +3 -5
- package/src/table/TableHelperComponent.tsx +3 -3
- package/src/venue-map-sets/card/VenueMapSetCard.tsx +4 -3
- package/src/zone/card/ZoneCard.tsx +4 -3
- package/yarn.lock +474 -542
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, useState } from 'react'
|
|
2
2
|
import { CustomFieldSetsContext, ValuesType } from '../contexts'
|
|
3
3
|
|
|
4
|
-
export const CustomFieldSetsProvider
|
|
4
|
+
export const CustomFieldSetsProvider = ({ children }: PropsWithChildren) => {
|
|
5
5
|
const [values, setValues] = useState<ValuesType>({})
|
|
6
6
|
|
|
7
7
|
return (
|
|
@@ -33,7 +33,7 @@ export interface EventCardProps extends HasPermissionProp {
|
|
|
33
33
|
onPreview: () => void
|
|
34
34
|
onEdit: () => void
|
|
35
35
|
onCopy: () => void
|
|
36
|
-
onRemove
|
|
36
|
+
onRemove?: () => void
|
|
37
37
|
onOpenQrCode: () => void
|
|
38
38
|
eventStatistic?: EventStatistic | null
|
|
39
39
|
eventMetadata?: EventMetadata | null
|
|
@@ -212,13 +212,15 @@ export function EventCard({
|
|
|
212
212
|
>
|
|
213
213
|
<FaCopy />
|
|
214
214
|
</button>
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
215
|
+
{onRemove && (
|
|
216
|
+
<button
|
|
217
|
+
type='button'
|
|
218
|
+
className='event-card-link-button'
|
|
219
|
+
onClick={onRemove}
|
|
220
|
+
>
|
|
221
|
+
<FaTrashAlt />
|
|
222
|
+
</button>
|
|
223
|
+
)}
|
|
222
224
|
</>
|
|
223
225
|
)}
|
|
224
226
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react'
|
|
2
2
|
|
|
3
|
-
export const DropdownWrapper
|
|
3
|
+
export const DropdownWrapper = ({ children }: PropsWithChildren) => (
|
|
4
4
|
<div className='canvas-dropdown-wrapper'>
|
|
5
5
|
<div className='arrow' />
|
|
6
6
|
<div className='children-container'>{children}</div>
|
|
@@ -5,13 +5,15 @@ import { isEmpty, uniqBy } from 'lodash'
|
|
|
5
5
|
import { useTranslation } from 'react-i18next'
|
|
6
6
|
import { useIntl } from 'react-intl'
|
|
7
7
|
import { Currency } from '@licklist/core/dist/Config'
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
MenuStep,
|
|
10
|
+
Product,
|
|
11
|
+
} from '@licklist/plugins/dist/types/context/sale/menuSteps'
|
|
9
12
|
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
|
|
10
|
-
import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps'
|
|
11
13
|
import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper'
|
|
12
|
-
import { NumberInputHorizontal } from 'src/sales'
|
|
13
14
|
import clsx from 'clsx'
|
|
14
15
|
import { ProductCategory } from 'dist/product-set/types'
|
|
16
|
+
import { NumberInputHorizontal } from '../../../sales'
|
|
15
17
|
import { MAX_PRODUCT_NUMBER } from '../../order-process/components/CategoryProduct/constants'
|
|
16
18
|
import { FormOrderItem } from '../../order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput'
|
|
17
19
|
import { getOrderProductModifiersPrice } from '../../order-process/components/BookingSummary/utils'
|
|
@@ -63,20 +65,23 @@ export const ProductWithModifierSetForm = ({
|
|
|
63
65
|
const defaultProductQuantity = editOrderModifier?.productQuantity ?? 0
|
|
64
66
|
|
|
65
67
|
const valuesOrder = watch()
|
|
66
|
-
const productQuantity =
|
|
68
|
+
const productQuantity =
|
|
69
|
+
valuesOrder?.product?.quantity ?? defaultProductQuantity
|
|
67
70
|
|
|
68
71
|
const orderModifiersSets =
|
|
69
72
|
valuesOrder[`${product.id}`]?.orderProductModifiers || []
|
|
70
73
|
|
|
71
74
|
const filteredOrderModifiers = filteredOrderModifierSets(orderModifiersSets)
|
|
72
75
|
|
|
73
|
-
const orderModifierSets: OrderModifierByProduct[] = useMemo(
|
|
76
|
+
const orderModifierSets: OrderModifierByProduct[] = useMemo(
|
|
77
|
+
() => [
|
|
74
78
|
{
|
|
75
79
|
productQuantity: productQuantity ?? 1,
|
|
76
80
|
modifiers: filteredOrderModifiers,
|
|
77
81
|
},
|
|
78
|
-
]
|
|
79
|
-
|
|
82
|
+
],
|
|
83
|
+
[filteredOrderModifiers, productQuantity],
|
|
84
|
+
)
|
|
80
85
|
|
|
81
86
|
const onSubmit = (event) => {
|
|
82
87
|
event.preventDefault()
|
|
@@ -180,7 +185,7 @@ export const ProductWithModifierSetForm = ({
|
|
|
180
185
|
isLoading={isSubmitting}
|
|
181
186
|
/>
|
|
182
187
|
</div>
|
|
183
|
-
<div className='
|
|
188
|
+
<div className='d-flex flex-column align-items-center justify-content-center'>
|
|
184
189
|
<div className='modifier-price pb-4 pl-5'>
|
|
185
190
|
{formatToCurrency(product.price)}
|
|
186
191
|
</div>
|
package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useDialogContext, DialogContextProvider } from 'src/modals'
|
|
2
1
|
import { Modal } from 'react-bootstrap'
|
|
3
2
|
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
|
|
4
3
|
import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps'
|
|
5
|
-
import { TicketDescription } from 'src/iframe/event'
|
|
6
4
|
import clsx from 'clsx'
|
|
7
5
|
import { ProductCategory } from 'dist/product-set/types'
|
|
6
|
+
import { useDialogContext, DialogContextProvider } from '../../../modals'
|
|
7
|
+
import { TicketDescription } from '../../event'
|
|
8
8
|
import { FormOrderItem } from '../../order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput'
|
|
9
9
|
import { useOnWindowUnmount } from '../../order-process/components/utils/useOnWindowUnmount'
|
|
10
10
|
import { ProductWithModifierSetForm } from './ProductWithModifierSetForm'
|
|
@@ -48,12 +48,20 @@ export const ProductWithModifierSetModal = ({
|
|
|
48
48
|
</button>
|
|
49
49
|
</div>
|
|
50
50
|
<div className='right-block' id='select-event-container'>
|
|
51
|
-
<div
|
|
51
|
+
<div
|
|
52
|
+
className={clsx(
|
|
53
|
+
'manual-booking-container',
|
|
54
|
+
!product.images.length && 'tw-mt-8',
|
|
55
|
+
)}
|
|
56
|
+
>
|
|
52
57
|
<div className='manual-booking-header'>
|
|
53
58
|
<TicketDescription
|
|
54
59
|
title={product.name}
|
|
55
60
|
description={product.description}
|
|
56
|
-
className={clsx(
|
|
61
|
+
className={clsx(
|
|
62
|
+
'iframe-event__product-description',
|
|
63
|
+
!product.images.length && 'mt-6',
|
|
64
|
+
)}
|
|
57
65
|
classNameProductModal='d-block'
|
|
58
66
|
images={product.images}
|
|
59
67
|
isRequired={product.isRequired}
|
package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx
CHANGED
|
@@ -10,8 +10,8 @@ import { xor } from 'lodash'
|
|
|
10
10
|
import clsx from 'clsx'
|
|
11
11
|
import { Currency } from '@licklist/core/dist/Config'
|
|
12
12
|
import { useIntl } from 'react-intl'
|
|
13
|
-
import { MAX_PRODUCT_NUMBER } from '
|
|
14
|
-
import { NumberInputHorizontal } from '
|
|
13
|
+
import { MAX_PRODUCT_NUMBER } from '../../../order-process/components/CategoryProduct/constants'
|
|
14
|
+
import { NumberInputHorizontal } from '../../../../sales'
|
|
15
15
|
import { selectModifierType } from '../../utils'
|
|
16
16
|
|
|
17
17
|
interface ModifiersSetControllProps {
|
|
@@ -2,7 +2,7 @@ import { useEffect } from 'react'
|
|
|
2
2
|
import { useFormContext, Controller } from 'react-hook-form'
|
|
3
3
|
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
|
|
4
4
|
import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps'
|
|
5
|
-
import { useTranslation } from 'react-i18next'
|
|
5
|
+
import { useTranslation } from 'react-i18next'
|
|
6
6
|
import { ModifiersSetControl } from './ModifierSetControll'
|
|
7
7
|
import { orderProductModifiersQuantity } from '../../utils'
|
|
8
8
|
|
|
@@ -69,25 +69,23 @@ export const ProductControl = ({
|
|
|
69
69
|
return true
|
|
70
70
|
},
|
|
71
71
|
}}
|
|
72
|
-
render={({ fieldState: { error } }) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
)
|
|
90
|
-
}}
|
|
72
|
+
render={({ fieldState: { error } }) => (
|
|
73
|
+
<>
|
|
74
|
+
<ModifiersSetControl
|
|
75
|
+
modifierSet={modifierSet}
|
|
76
|
+
productId={product.id}
|
|
77
|
+
modifiers={modifierSet.modifiers}
|
|
78
|
+
isEditMode={!!editOrderModifier?.modifiers}
|
|
79
|
+
orderProductModifierSets={editOrderModifier?.modifiers}
|
|
80
|
+
isLoading={isLoading}
|
|
81
|
+
/>
|
|
82
|
+
{error?.message && (
|
|
83
|
+
<div className='invalid-feedback d-flex pl-4'>
|
|
84
|
+
{error?.message}!
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
</>
|
|
88
|
+
)}
|
|
91
89
|
/>
|
|
92
90
|
</div>
|
|
93
91
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next'
|
|
2
2
|
import Button from 'react-bootstrap/Button'
|
|
3
|
-
import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
|
|
4
3
|
import { FaArrowLeft, FaArrowRight } from 'react-icons/fa'
|
|
4
|
+
import { useNavigate } from 'react-router-dom'
|
|
5
5
|
|
|
6
6
|
interface PaginationDotsProps {
|
|
7
7
|
amount: number
|
|
@@ -33,13 +33,14 @@ export function EventNavigationFooter({
|
|
|
33
33
|
// @TODO remove and adjust components that uses old interface
|
|
34
34
|
// used onSubmit for old cases
|
|
35
35
|
const submitButtonProps = onSubmit ? { onSubmit } : { type: 'submit' }
|
|
36
|
+
const navigate = useNavigate()
|
|
36
37
|
|
|
37
38
|
const onPrevButtonClick = () => {
|
|
38
39
|
if (activeElement === 1) {
|
|
39
40
|
if (onPrevStep) {
|
|
40
41
|
onPrevStep()
|
|
41
42
|
} else {
|
|
42
|
-
|
|
43
|
+
navigate(-1)
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
return
|
|
@@ -10,10 +10,8 @@ import {
|
|
|
10
10
|
Product,
|
|
11
11
|
ProductCategory,
|
|
12
12
|
} from '@licklist/plugins/dist/types/context/sale/menuSteps'
|
|
13
|
-
import { Button } from 'react-bootstrap'
|
|
14
|
-
import { FaTrashAlt } from 'react-icons/fa'
|
|
15
|
-
import { ProductWithModifierSetModal } from 'src/iframe/ProductWithModifierModal'
|
|
16
13
|
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
|
|
14
|
+
import { ProductWithModifierSetModal } from '../../../ProductWithModifierModal'
|
|
17
15
|
import { TicketDescription } from '../../../event/ticket-description'
|
|
18
16
|
import { ProductQuantityInput } from './components/ProductQuantityInput'
|
|
19
17
|
import { FormOrderItem } from './components/ProductQuantityInput/ProductQuantityInput'
|
|
@@ -160,8 +158,8 @@ export const CategoryProduct = ({
|
|
|
160
158
|
).orderModifiersSets
|
|
161
159
|
?.filter((_, index) => index !== modifierIndex)
|
|
162
160
|
.concat(value.orderModifiersSets)
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
|
|
162
|
+
onChange({
|
|
165
163
|
...value,
|
|
166
164
|
orderModifiersSets: editedOrderModifiersSets,
|
|
167
165
|
quantity: editedOrderModifiersSets.reduce(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useMemo, useEffect, useState, useCallback } from 'react'
|
|
2
|
-
import { useLocation,
|
|
2
|
+
import { useLocation, useNavigate } from 'react-router-dom'
|
|
3
3
|
import clsx from 'clsx'
|
|
4
4
|
import { useTranslation } from 'react-i18next'
|
|
5
5
|
import { SnippetLoader } from '../../../../static'
|
|
@@ -22,7 +22,7 @@ export const NavigationSteps = ({
|
|
|
22
22
|
}: NavigationStepsProps) => {
|
|
23
23
|
const { t } = useTranslation('Design')
|
|
24
24
|
const location = useLocation()
|
|
25
|
-
const
|
|
25
|
+
const navigate = useNavigate()
|
|
26
26
|
|
|
27
27
|
const containerRef = useRef<HTMLDivElement>(null)
|
|
28
28
|
const containerWrapperRef = useRef<HTMLDivElement>(null)
|
|
@@ -45,7 +45,7 @@ export const NavigationSteps = ({
|
|
|
45
45
|
pathname: string,
|
|
46
46
|
queryParams?: Record<string, string>,
|
|
47
47
|
) => {
|
|
48
|
-
|
|
48
|
+
navigate({
|
|
49
49
|
pathname,
|
|
50
50
|
search: new URLSearchParams(queryParams).toString(),
|
|
51
51
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
import { useIntl } from 'react-intl'
|
|
4
4
|
import * as Config from '@licklist/core/dist/Config'
|
|
@@ -15,14 +15,14 @@ export type PaymentCardProps = {
|
|
|
15
15
|
isFreePayment?: boolean
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export const PaymentCard
|
|
18
|
+
export const PaymentCard = ({
|
|
19
19
|
order,
|
|
20
20
|
totalWithDiscount,
|
|
21
21
|
recalculatedFee,
|
|
22
22
|
discountBlock,
|
|
23
23
|
paymentDetail,
|
|
24
24
|
isFreePayment,
|
|
25
|
-
}) => {
|
|
25
|
+
}: PropsWithChildren<PaymentCardProps>) => {
|
|
26
26
|
const { t } = useTranslation(['Design'])
|
|
27
27
|
const { formatNumber } = useIntl()
|
|
28
28
|
|
|
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'
|
|
|
4
4
|
import { Button, Col } from 'react-bootstrap'
|
|
5
5
|
import { PaymentSessionContext } from '@licklist/plugins/dist/context/payment/PaymentSessionContext'
|
|
6
6
|
import { PaymentLinkResponse } from '@licklist/plugins/dist/hooks/Api/usePaymentApi'
|
|
7
|
-
import { BookingSummaryProps } from '
|
|
7
|
+
import { BookingSummaryProps } from '../../order-process/components/BookingSummary/types'
|
|
8
8
|
// eslint-disable-next-line max-len
|
|
9
9
|
import { SummaryTotalBlock } from '../../order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock'
|
|
10
10
|
import { LoaderIndicator } from '../../../static'
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
import { useForm } from 'react-hook-form'
|
|
4
|
-
|
|
5
4
|
import Button from 'react-bootstrap/Button'
|
|
6
|
-
import { useHistory } from 'react-router-dom'
|
|
7
5
|
import Alert from 'react-bootstrap/Alert'
|
|
8
6
|
import {
|
|
9
7
|
STATUS_APPROVED,
|
|
@@ -16,7 +14,6 @@ import {
|
|
|
16
14
|
AttemptPaymentResponse,
|
|
17
15
|
} from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
|
|
18
16
|
import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
|
|
19
|
-
|
|
20
17
|
import { BlockLoader, ButtonLoader } from '../../static'
|
|
21
18
|
import { injectComponentsInRyftForm } from './utils/ryft-form'
|
|
22
19
|
|
|
@@ -72,7 +69,7 @@ export const RyftPaymentForm = ({
|
|
|
72
69
|
const showApplePayButton =
|
|
73
70
|
isAppUsingInIframe &&
|
|
74
71
|
providerPaymentSettings?.additionalPaymentMethodsEnabled
|
|
75
|
-
|
|
72
|
+
|
|
76
73
|
const [isValid, setIsValid] = useState(false)
|
|
77
74
|
const [isBtnDisabled, setIsBtnDisabled] = useState(false)
|
|
78
75
|
const [ryftInitFailure, setRyftInitFailure] = useState<boolean>(false)
|
|
@@ -214,7 +211,7 @@ export const RyftPaymentForm = ({
|
|
|
214
211
|
<Button
|
|
215
212
|
variant='primary'
|
|
216
213
|
onClick={() => {
|
|
217
|
-
|
|
214
|
+
window.location.reload()
|
|
218
215
|
}}
|
|
219
216
|
>
|
|
220
217
|
{t('Ryft:refresh')}
|
package/src/index.ts
CHANGED
|
@@ -32,42 +32,41 @@ export const Dialog = ({
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
<Modal
|
|
36
|
+
show={isActive}
|
|
37
|
+
onHide={onDecline}
|
|
38
|
+
animation={false}
|
|
39
|
+
size='sm'
|
|
40
|
+
centered
|
|
41
|
+
className='text-center justify-content-center rounded'
|
|
42
|
+
>
|
|
43
|
+
{/* @ts-ignore */}
|
|
44
|
+
<Modal.Header className='justify-content-center border-0'>
|
|
45
|
+
{title && <Modal.Title as='h6'>{title}</Modal.Title>}
|
|
46
|
+
</Modal.Header>
|
|
47
|
+
{content && (
|
|
48
|
+
<Modal.Body className='justify-content-center'>{content}</Modal.Body>
|
|
49
|
+
)}
|
|
50
|
+
<Modal.Footer className='border-0 justify-content-center'>
|
|
51
|
+
{customButtons || (
|
|
52
|
+
<>
|
|
53
|
+
<Button
|
|
54
|
+
variant='secondary'
|
|
55
|
+
className='modal-buttons'
|
|
56
|
+
onClick={declineHandler}
|
|
57
|
+
>
|
|
58
|
+
{t('cancel')}
|
|
59
|
+
</Button>
|
|
60
|
+
<Button
|
|
61
|
+
variant='primary'
|
|
62
|
+
className='modal-buttons'
|
|
63
|
+
onClick={approveHandler}
|
|
64
|
+
>
|
|
65
|
+
{t('Design:confirm')}
|
|
66
|
+
</Button>
|
|
67
|
+
</>
|
|
49
68
|
)}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<>
|
|
53
|
-
<Button
|
|
54
|
-
variant='secondary'
|
|
55
|
-
className='modal-buttons'
|
|
56
|
-
onClick={declineHandler}
|
|
57
|
-
>
|
|
58
|
-
{t('cancel')}
|
|
59
|
-
</Button>
|
|
60
|
-
<Button
|
|
61
|
-
variant='primary'
|
|
62
|
-
className='modal-buttons'
|
|
63
|
-
onClick={approveHandler}
|
|
64
|
-
>
|
|
65
|
-
{t('Design:confirm')}
|
|
66
|
-
</Button>
|
|
67
|
-
</>
|
|
68
|
-
)}
|
|
69
|
-
</Modal.Footer>
|
|
70
|
-
</Modal>
|
|
71
|
-
</>
|
|
69
|
+
</Modal.Footer>
|
|
70
|
+
</Modal>
|
|
72
71
|
)
|
|
73
72
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
createContext,
|
|
3
|
+
useContext,
|
|
4
|
+
useState,
|
|
5
|
+
useCallback,
|
|
6
|
+
PropsWithChildren,
|
|
7
|
+
} from 'react'
|
|
2
8
|
|
|
3
9
|
interface IDialogContext {
|
|
4
10
|
isShownDialog: boolean
|
|
@@ -20,7 +26,7 @@ export const DialogContext = createContext<IDialogContext>({
|
|
|
20
26
|
onApproveDialog: () => undefined,
|
|
21
27
|
})
|
|
22
28
|
|
|
23
|
-
export const DialogContextProvider
|
|
29
|
+
export const DialogContextProvider = ({ children }: PropsWithChildren) => {
|
|
24
30
|
const [isShownDialog, setShownDialog] = useState(false)
|
|
25
31
|
|
|
26
32
|
const showDialog = () => {
|
|
@@ -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
|