@licklist/design 0.71.5-dev.8 → 0.71.5
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/Login/LoginComponent.js +1 -2
- 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 -4
- 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-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 +4 -5
- package/dist/events/event-statistic-modal/utils/index.d.ts +1 -1
- package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/utils/index.js +13 -34
- 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/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/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +3 -4
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +5 -4
- package/dist/layout/DropDown.d.ts +1 -2
- package/dist/layout/DropDown.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/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.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/advanced-options/AdvancedOptions.js +0 -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/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/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/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +0 -7
- 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/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +0 -3
- 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 +1 -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 +3 -1
- package/dist/styles/sales/BookingResults.scss +1 -1
- 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 +7 -9
- package/src/affiliate/form/AffiliateForm.tsx +0 -1
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +16 -42
- 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-statistic-modal/EventStatisticModal.tsx +1 -3
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +3 -5
- package/src/events/event-statistic-modal/utils/index.ts +32 -68
- 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/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 -11
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
- package/src/iframe/ryft/RyftPaymentForm.tsx +8 -10
- package/src/iframe/ryft/utils/ryft-form.ts +5 -6
- package/src/layout/DropDown.tsx +1 -1
- package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
- 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 +3 -0
- 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/setting/admin/PaymentFeeForm.tsx +0 -5
- package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
- package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
- package/src/sortable-tree/SortableTreeItem.tsx +0 -6
- package/src/static/CurrencyNumberInput.tsx +0 -1
- package/src/static/form-number-input/FormNumberInput.tsx +0 -1
- package/src/static/number-input/NumberInput.tsx +0 -1
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -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 +3 -1
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/zone/form/components/GameDurationControl.tsx +0 -1
- package/src/zone/form/components/SortControl.tsx +0 -1
- package/yarn.lock +339 -366
|
@@ -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,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from 'react-icons/fa'
|
|
26
26
|
import { ProductSetLoadingContext } from './context'
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const CATEGORY_TYPES_NAMES = {
|
|
29
29
|
menuItems: CATEGORY_TYPE_MENU_ITEMS,
|
|
30
30
|
tickets: CATEGORY_TYPE_TICKETS,
|
|
31
31
|
bookings: CATEGORY_TYPE_BOOKINGS,
|
|
@@ -33,7 +33,7 @@ export const CATEGORY_TYPES_NAMES = {
|
|
|
33
33
|
fixedDuration: CATEGORY_TYPE_FIXED_DURATION,
|
|
34
34
|
} as const
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
type CategoryConfig = { label: string; icon: ReactElement }
|
|
37
37
|
|
|
38
38
|
const MAIN_CATEGORIES: Partial<Record<CategoryType, CategoryConfig>> = {
|
|
39
39
|
[CATEGORY_TYPES_NAMES.tickets]: {
|
|
@@ -70,6 +70,9 @@ 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
|
|
73
76
|
append(subProductCopy)
|
|
74
77
|
}}
|
|
75
78
|
/>
|
|
@@ -46,6 +46,9 @@ 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
|
|
49
52
|
products={products}
|
|
50
53
|
pointProducts={pointProducts}
|
|
51
54
|
onPointProductsChange={onPointProductsChange}
|
|
@@ -86,7 +86,6 @@ export function ProductBookingManagementControl<T extends FormValues>(
|
|
|
86
86
|
<Form.Control
|
|
87
87
|
ref={ref}
|
|
88
88
|
type='number'
|
|
89
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
90
89
|
min={0}
|
|
91
90
|
step={1}
|
|
92
91
|
value={value as string}
|
|
@@ -130,7 +129,6 @@ export function ProductBookingManagementControl<T extends FormValues>(
|
|
|
130
129
|
<Form.Control
|
|
131
130
|
ref={ref}
|
|
132
131
|
type='number'
|
|
133
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
134
132
|
min='0'
|
|
135
133
|
step='1'
|
|
136
134
|
value={value as string}
|
|
@@ -91,7 +91,6 @@ export const ProductDurationControl = <T,>({
|
|
|
91
91
|
<Form.Control
|
|
92
92
|
type='number'
|
|
93
93
|
min={0}
|
|
94
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
95
94
|
step={1}
|
|
96
95
|
value={durationHours}
|
|
97
96
|
disabled={disabled}
|
|
@@ -128,7 +127,6 @@ export const ProductDurationControl = <T,>({
|
|
|
128
127
|
type='number'
|
|
129
128
|
min={0}
|
|
130
129
|
step={1}
|
|
131
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
132
130
|
disabled={disabled}
|
|
133
131
|
value={durationMinutes}
|
|
134
132
|
isInvalid={isInvalid}
|
|
@@ -111,7 +111,6 @@ export function ProductQuantityConstantControl<T extends FormValues>(
|
|
|
111
111
|
type='number'
|
|
112
112
|
min={0}
|
|
113
113
|
step={1}
|
|
114
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
115
114
|
value={value as string}
|
|
116
115
|
isInvalid={HookFormService.isInvalid<T>(
|
|
117
116
|
`${fieldNamePrefix}.totalQuantity` as Path<T>,
|
|
@@ -166,7 +165,6 @@ export function ProductQuantityConstantControl<T extends FormValues>(
|
|
|
166
165
|
type='number'
|
|
167
166
|
min={0}
|
|
168
167
|
step={1}
|
|
169
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
170
168
|
value={value as string}
|
|
171
169
|
onChange={onChange}
|
|
172
170
|
onFocus={onFocus}
|
|
@@ -85,7 +85,6 @@ export function ProductQuantityControl<T extends FormValues>(
|
|
|
85
85
|
type='number'
|
|
86
86
|
min={0}
|
|
87
87
|
step={1}
|
|
88
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
89
88
|
value={value as string}
|
|
90
89
|
onChange={onChange}
|
|
91
90
|
onFocus={onFocus}
|
|
@@ -144,7 +143,6 @@ export function ProductQuantityControl<T extends FormValues>(
|
|
|
144
143
|
type='number'
|
|
145
144
|
min={0}
|
|
146
145
|
step={1}
|
|
147
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
148
146
|
value={value && (value as string)}
|
|
149
147
|
onFocus={onFocus}
|
|
150
148
|
onChange={onChange}
|
|
@@ -69,7 +69,6 @@ export function ProductQuantityRechargingControl<T extends FormValues>(
|
|
|
69
69
|
type='number'
|
|
70
70
|
min={0}
|
|
71
71
|
step={1}
|
|
72
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
73
72
|
{...register(`${fieldNamePrefix}.totalQuantity` as Path<T>, {
|
|
74
73
|
validate: (value) => {
|
|
75
74
|
if (unlimited) return true
|
|
@@ -17,10 +17,6 @@ import { Switch, BooleanSwitch } from '../../static'
|
|
|
17
17
|
import { ProductSetFormValues } from '../form/ProductSetForm'
|
|
18
18
|
import { IsDeletableEvent, ProductCategory } from '../types'
|
|
19
19
|
import { ReactComponent as IncrementIcon } from '../../assets/dashboard/increment.svg'
|
|
20
|
-
import {
|
|
21
|
-
SaleDeadline,
|
|
22
|
-
SALE_DEADLINE_NAME_CATEGORY,
|
|
23
|
-
} from '../../events/edit-event-modal/component/SaleDeadline/SaleDeadline'
|
|
24
20
|
|
|
25
21
|
export interface ProductCategoryControlValues extends FormValues {
|
|
26
22
|
id: number
|
|
@@ -40,7 +36,6 @@ export interface ProductCategoryControlValues extends FormValues {
|
|
|
40
36
|
hasSubEvents?: boolean
|
|
41
37
|
weight?: number
|
|
42
38
|
isReusable?: boolean
|
|
43
|
-
saleDeadlineCategory?: number
|
|
44
39
|
termsAndConditions?: string
|
|
45
40
|
sort: number | null
|
|
46
41
|
}
|
|
@@ -221,7 +216,6 @@ export function ProductCategoryControl({
|
|
|
221
216
|
step={1}
|
|
222
217
|
value={value === null ? '' : value}
|
|
223
218
|
onChange={onChange}
|
|
224
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
225
219
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
226
220
|
`${fieldNamePrefix}.minSubItems` as const,
|
|
227
221
|
errors,
|
|
@@ -294,7 +288,6 @@ export function ProductCategoryControl({
|
|
|
294
288
|
name={name}
|
|
295
289
|
value={value === null ? '' : value}
|
|
296
290
|
onChange={onChange}
|
|
297
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
298
291
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
299
292
|
`${fieldNamePrefix}.maxSubItems` as const,
|
|
300
293
|
errors,
|
|
@@ -355,7 +348,6 @@ export function ProductCategoryControl({
|
|
|
355
348
|
min={0}
|
|
356
349
|
step={1}
|
|
357
350
|
type='number'
|
|
358
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
359
351
|
disabled={isOverride}
|
|
360
352
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
361
353
|
`${fieldNamePrefix}.overallQuantity`,
|
|
@@ -428,14 +420,6 @@ export function ProductCategoryControl({
|
|
|
428
420
|
</div>
|
|
429
421
|
</Form.Group>
|
|
430
422
|
)}
|
|
431
|
-
|
|
432
|
-
<SaleDeadline
|
|
433
|
-
disabled={false}
|
|
434
|
-
deadLineCategory={
|
|
435
|
-
`${fieldNamePrefix}.${SALE_DEADLINE_NAME_CATEGORY}` as const
|
|
436
|
-
}
|
|
437
|
-
onlyBefore
|
|
438
|
-
/>
|
|
439
423
|
{/*
|
|
440
424
|
|
|
441
425
|
|
|
@@ -546,7 +530,6 @@ export function ProductCategoryControl({
|
|
|
546
530
|
step={1}
|
|
547
531
|
value={value}
|
|
548
532
|
onChange={onChange}
|
|
549
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
550
533
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
551
534
|
`${fieldNamePrefix}.remainderExpireAfter` as const,
|
|
552
535
|
errors,
|
|
@@ -109,7 +109,6 @@ function RecurrenceEndInput({
|
|
|
109
109
|
type='number'
|
|
110
110
|
min={1}
|
|
111
111
|
max={500}
|
|
112
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
113
112
|
disabled={disabled || !count || count === 500}
|
|
114
113
|
aria-label='Occurrence count'
|
|
115
114
|
value={count ?? defaultOccurrences[frequency]}
|
|
@@ -27,7 +27,6 @@ export const CapacityControl = ({ isLoading }: CapacityControlProps) => {
|
|
|
27
27
|
required: true,
|
|
28
28
|
min: 1,
|
|
29
29
|
})}
|
|
30
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
31
30
|
placeholder={t('Design:capacity')}
|
|
32
31
|
isInvalid={Boolean(errors.capacity)}
|
|
33
32
|
disabled={isLoading}
|
|
@@ -179,7 +179,6 @@ export const CouponFormControl = ({
|
|
|
179
179
|
<Form.Label>{t('Design:discount')}</Form.Label>
|
|
180
180
|
<Form.Control
|
|
181
181
|
type='number'
|
|
182
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
183
182
|
isInvalid={errors.discount !== undefined}
|
|
184
183
|
{...register('discount', {
|
|
185
184
|
required: t('Validation:fieldRequired', {
|
|
@@ -317,7 +316,6 @@ export const CouponFormControl = ({
|
|
|
317
316
|
<Form.Control
|
|
318
317
|
{...register('totalCoupons')}
|
|
319
318
|
type='number'
|
|
320
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
321
319
|
isInvalid={errors.totalCoupons !== undefined}
|
|
322
320
|
disabled={isLoading}
|
|
323
321
|
/>
|
|
@@ -332,7 +330,6 @@ export const CouponFormControl = ({
|
|
|
332
330
|
<Form.Control
|
|
333
331
|
type='number'
|
|
334
332
|
{...register('usesPerUser')}
|
|
335
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
336
333
|
disabled={isLoading}
|
|
337
334
|
/>
|
|
338
335
|
</Form.Group>
|
|
@@ -345,7 +342,6 @@ export const CouponFormControl = ({
|
|
|
345
342
|
<Form.Control
|
|
346
343
|
type='number'
|
|
347
344
|
{...register('useAgain')}
|
|
348
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
349
345
|
disabled={isLoading}
|
|
350
346
|
/>
|
|
351
347
|
<Form.Text className='text-muted'>
|
|
@@ -359,7 +355,6 @@ export const CouponFormControl = ({
|
|
|
359
355
|
<Form.Control
|
|
360
356
|
type='number'
|
|
361
357
|
{...register('usesPerUserDay')}
|
|
362
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
363
358
|
disabled={isLoading}
|
|
364
359
|
/>
|
|
365
360
|
<Form.Text className='text-muted'>
|
|
@@ -375,7 +370,6 @@ export const CouponFormControl = ({
|
|
|
375
370
|
<Form.Control
|
|
376
371
|
type='number'
|
|
377
372
|
{...register('minAmount')}
|
|
378
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
379
373
|
disabled={isLoading}
|
|
380
374
|
/>
|
|
381
375
|
<Form.Text className='text-muted'>
|
|
@@ -389,7 +383,6 @@ export const CouponFormControl = ({
|
|
|
389
383
|
<Form.Control
|
|
390
384
|
type='number'
|
|
391
385
|
{...register('maxAmount')}
|
|
392
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
393
386
|
disabled={isLoading}
|
|
394
387
|
/>
|
|
395
388
|
<Form.Text className='text-muted'>
|
|
@@ -74,7 +74,6 @@ export function PaymentFeeForm({ isLoading = false }: PaymentFeeFormProps) {
|
|
|
74
74
|
max={100}
|
|
75
75
|
step='1'
|
|
76
76
|
placeholder='0'
|
|
77
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
78
77
|
{...register('feeInPercent', {
|
|
79
78
|
validate: {
|
|
80
79
|
moreThan: (v) => (v ? v >= 0 : true),
|
|
@@ -130,7 +129,6 @@ export function PaymentFeeForm({ isLoading = false }: PaymentFeeFormProps) {
|
|
|
130
129
|
max={999999.99}
|
|
131
130
|
step='0.01'
|
|
132
131
|
placeholder='0,00'
|
|
133
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
134
132
|
isInvalid={Boolean(errors.minFeeInPounds)}
|
|
135
133
|
disabled={isLoading}
|
|
136
134
|
/>
|
|
@@ -176,7 +174,6 @@ export function PaymentFeeForm({ isLoading = false }: PaymentFeeFormProps) {
|
|
|
176
174
|
max={999999.99}
|
|
177
175
|
step='0.01'
|
|
178
176
|
placeholder='0,00'
|
|
179
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
180
177
|
isInvalid={Boolean(errors.maxFeeInPounds)}
|
|
181
178
|
disabled={isLoading}
|
|
182
179
|
/>
|
|
@@ -234,7 +231,6 @@ export function PaymentFeeForm({ isLoading = false }: PaymentFeeFormProps) {
|
|
|
234
231
|
max={100}
|
|
235
232
|
step='1'
|
|
236
233
|
placeholder='0'
|
|
237
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
238
234
|
isInvalid={Boolean(errors.vatInPercent)}
|
|
239
235
|
disabled={isLoading}
|
|
240
236
|
/>
|
|
@@ -280,7 +276,6 @@ export function PaymentFeeForm({ isLoading = false }: PaymentFeeFormProps) {
|
|
|
280
276
|
max={999999.99}
|
|
281
277
|
step='0.01'
|
|
282
278
|
placeholder='0,00'
|
|
283
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
284
279
|
isInvalid={Boolean(errors.fixedFee)}
|
|
285
280
|
disabled={isLoading}
|
|
286
281
|
/>
|
|
@@ -309,7 +309,6 @@ export function Preview({
|
|
|
309
309
|
productCategoryId: 57,
|
|
310
310
|
productGroupId: null,
|
|
311
311
|
availableQuantity: 980,
|
|
312
|
-
zoneId: null,
|
|
313
312
|
name: 'Cofee',
|
|
314
313
|
description: '',
|
|
315
314
|
price: 15,
|
|
@@ -318,8 +317,6 @@ export function Preview({
|
|
|
318
317
|
maxQuantity: 15,
|
|
319
318
|
totalQuantity: 980,
|
|
320
319
|
type: 'sale' as const,
|
|
321
|
-
capacity: 0,
|
|
322
|
-
duration: 0,
|
|
323
320
|
weight: 0,
|
|
324
321
|
isAvailable: true,
|
|
325
322
|
isSoldOut: false,
|
|
@@ -338,7 +335,6 @@ export function Preview({
|
|
|
338
335
|
productCategoryId: 57,
|
|
339
336
|
productGroupId: null,
|
|
340
337
|
availableQuantity: 980,
|
|
341
|
-
zoneId: null,
|
|
342
338
|
name: 'Cofee 2',
|
|
343
339
|
description: '',
|
|
344
340
|
price: 15,
|
|
@@ -347,8 +343,6 @@ export function Preview({
|
|
|
347
343
|
maxQuantity: 15,
|
|
348
344
|
totalQuantity: 980,
|
|
349
345
|
type: 'sale' as const,
|
|
350
|
-
capacity: 0,
|
|
351
|
-
duration: 0,
|
|
352
346
|
weight: 0,
|
|
353
347
|
isAvailable: true,
|
|
354
348
|
isSoldOut: false,
|
|
@@ -33,7 +33,6 @@ export interface SortableTreeItemProps {
|
|
|
33
33
|
body: ReactNode
|
|
34
34
|
children?: ReactNode
|
|
35
35
|
preItem?: ReactNode
|
|
36
|
-
itemButton?: ReactNode
|
|
37
36
|
postItem?: ReactNode
|
|
38
37
|
sortableItems?: string[]
|
|
39
38
|
isExpanded?: boolean
|
|
@@ -83,7 +82,6 @@ export function SortableTreeItem({
|
|
|
83
82
|
secondaryBadge,
|
|
84
83
|
setIsExpanded,
|
|
85
84
|
isOverride,
|
|
86
|
-
itemButton,
|
|
87
85
|
}: SortableTreeItemProps) {
|
|
88
86
|
const [expanded, setExpanded] = useState(isExpanded)
|
|
89
87
|
const [isModalVisible, setIsModalVisible] = useState(isNewAdded)
|
|
@@ -289,13 +287,9 @@ export function SortableTreeItem({
|
|
|
289
287
|
className={clsx(
|
|
290
288
|
'sortable-tree-item-title',
|
|
291
289
|
modalLabel && 'sortable-tree-product-set-element-title',
|
|
292
|
-
'd-flex justify-content-between',
|
|
293
290
|
)}
|
|
294
291
|
>
|
|
295
292
|
{title}
|
|
296
|
-
<div className='sortable-tree-item-subtitle'>
|
|
297
|
-
{itemButton}
|
|
298
|
-
</div>
|
|
299
293
|
</span>
|
|
300
294
|
{!expanded && (
|
|
301
295
|
<span className='sortable-tree-item-subtitle'>
|
|
@@ -15,7 +15,7 @@ body[bkdt-scrollable='false'] .bkdt-mask {
|
|
|
15
15
|
left: 0;
|
|
16
16
|
width: 100%;
|
|
17
17
|
height: 100%;
|
|
18
|
-
z-index:
|
|
18
|
+
z-index: 1000000;
|
|
19
19
|
background-color: rgba(0, 0, 0, 0.5);
|
|
20
20
|
display: none;
|
|
21
21
|
}
|
|
@@ -24,7 +24,7 @@ body[bkdt-scrollable='false'] .bkdt-mask {
|
|
|
24
24
|
position: fixed;
|
|
25
25
|
top: 0;
|
|
26
26
|
left: 0;
|
|
27
|
-
z-index:
|
|
27
|
+
z-index: 1000001;
|
|
28
28
|
display: none;
|
|
29
29
|
width: 100%;
|
|
30
30
|
height: 100%;
|