@licklist/design 0.68.2-dev.3 → 0.68.4

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.
Files changed (107) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/assets/iframe/selectArrow.svg.js +17 -0
  3. package/dist/auth/Login/LoginComponent.js +1 -2
  4. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
  5. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +40 -35
  6. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  7. package/dist/events/edit-event-modal/IntervalInput.js +1 -7
  8. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  9. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -0
  10. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
  11. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +23 -24
  12. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  13. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
  14. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  15. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +0 -2
  16. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  17. package/dist/index.js +0 -1
  18. package/dist/layout/DropDown.d.ts +1 -2
  19. package/dist/layout/DropDown.d.ts.map +1 -1
  20. package/dist/modals/confirmation/ConfirmModal.d.ts +1 -3
  21. package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
  22. package/dist/modals/confirmation/ConfirmModal.js +8 -172
  23. package/dist/product-set/card/ProductSetCard.d.ts +2 -6
  24. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  25. package/dist/product-set/card/ProductSetCard.js +11 -30
  26. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  27. package/dist/product-set/control/DateInput.js +2 -2
  28. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  29. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  30. package/dist/product-set/form/ProductSetForm.d.ts +1 -4
  31. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  32. package/dist/product-set/form/ProductSetForm.js +1 -59
  33. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  34. package/dist/product-set/form/ProductZonesControl.js +2 -0
  35. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  36. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  37. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  38. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  39. package/dist/product-set/form/SubProductsControl.js +3 -0
  40. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  41. package/dist/product-set/form/VenueMapsControl.js +3 -0
  42. package/dist/product-set/form/index.d.ts +0 -1
  43. package/dist/product-set/form/index.d.ts.map +1 -1
  44. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  45. package/dist/product-set/utils/index.d.ts +0 -7
  46. package/dist/product-set/utils/index.d.ts.map +1 -1
  47. package/dist/product-set/utils/index.js +1 -10
  48. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  49. package/dist/sales/booking/results/components/ResultCard.js +2 -0
  50. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  51. package/dist/snippet/snippet-template/preview/Preview.js +0 -6
  52. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  53. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  54. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  55. package/dist/styles/iframe-events/Calendar.scss +1 -0
  56. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  57. package/dist/styles/product-set/ProductSetForm.scss +0 -22
  58. package/dist/styles/sales/BookingResults.scss +1 -1
  59. package/dist/tiptap-editor/TipTapMenu/extensions/utils.d.ts +1 -1
  60. package/dist/tiptap-editor/TipTapMenu/extensions/utils.d.ts.map +1 -1
  61. package/dist/tiptap-editor/TipTapMenu/extensions/utils.js +1 -3
  62. package/dist/typeahead/Typeahead.d.ts +1 -5
  63. package/dist/typeahead/Typeahead.d.ts.map +1 -1
  64. package/dist/typeahead/Typeahead.js +2 -9
  65. package/package.json +7 -9
  66. package/src/affiliate/form/AffiliateForm.tsx +0 -1
  67. package/src/auth/Login/LoginComponent.tsx +1 -1
  68. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +28 -29
  69. package/src/events/edit-event-modal/IntervalInput.tsx +1 -8
  70. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -0
  71. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +85 -82
  72. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  73. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -1
  74. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  75. package/src/layout/DropDown.tsx +1 -2
  76. package/src/modals/confirmation/ConfirmModal.tsx +3 -19
  77. package/src/product-set/card/ProductSetCard.tsx +8 -47
  78. package/src/product-set/control/DateInput.tsx +1 -2
  79. package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
  80. package/src/product-set/form/ProductSetForm.tsx +2 -17
  81. package/src/product-set/form/ProductZonesControl.tsx +4 -1
  82. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  83. package/src/product-set/form/SubProductsControl.tsx +3 -0
  84. package/src/product-set/form/VenueMapsControl.tsx +3 -0
  85. package/src/product-set/form/index.ts +0 -1
  86. package/src/product-set/product/ProductControl.tsx +1 -0
  87. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  88. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  89. package/src/product-set/utils/index.ts +0 -11
  90. package/src/sales/booking/results/components/ResultCard.tsx +2 -0
  91. package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
  92. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  93. package/src/styles/iframe-events/Calendar.scss +1 -0
  94. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  95. package/src/styles/product-set/ProductSetForm.scss +0 -22
  96. package/src/styles/sales/BookingResults.scss +1 -1
  97. package/src/tiptap-editor/TipTapMenu/extensions/utils.ts +1 -4
  98. package/src/typeahead/Typeahead.tsx +1 -15
  99. package/yarn.lock +14 -40
  100. package/dist/product-set/form/ProductSetNameControl.d.ts +0 -6
  101. package/dist/product-set/form/ProductSetNameControl.d.ts.map +0 -1
  102. package/dist/product-set/form/ProductSetNameControl.js +0 -35
  103. package/dist/tiptap-editor/TipTapMenu/extensions/constants.d.ts +0 -2
  104. package/dist/tiptap-editor/TipTapMenu/extensions/constants.d.ts.map +0 -1
  105. package/dist/tiptap-editor/TipTapMenu/extensions/constants.js +0 -3
  106. package/src/product-set/form/ProductSetNameControl.tsx +0 -27
  107. package/src/tiptap-editor/TipTapMenu/extensions/constants.ts +0 -1
@@ -51,7 +51,6 @@ export const ProductQuantityInput = ({
51
51
  hasDeposit: category.allowDeposits && product?.deposit < product.price,
52
52
  price: product.price,
53
53
  productCategoryId: category.id,
54
- zoneId: category.zone?.id,
55
54
  quantity,
56
55
  capacity: product?.capacity,
57
56
  })
@@ -61,7 +61,6 @@ const processedPaymentSummary = ({
61
61
  const total = calculateTotalPrice(order, externalPaymentDetail)
62
62
 
63
63
  const totalDiscount = calculateTotalDiscount(order.payments)
64
-
65
64
  let summaryItems: SummaryItem[] = [
66
65
  {
67
66
  translateKey: AMOUNT_TOTAL,
@@ -1,4 +1,4 @@
1
- import React, { forwardRef } from 'react'
1
+ import { forwardRef } from 'react'
2
2
 
3
3
  interface Props {
4
4
  children?: React.ReactNode | React.ReactNode[]
@@ -24,5 +24,4 @@ const DropDown = forwardRef((props: Props, ref: any) => {
24
24
  })
25
25
 
26
26
  DropDown.displayName = 'DropDown'
27
-
28
27
  export default DropDown
@@ -20,9 +20,6 @@ export type ConfirmModalTypes =
20
20
  export interface ConfirmModalProps {
21
21
  type?: ConfirmModalTypes
22
22
  children?: (confirm: (action: ConfirmAction) => void) => ReactNode
23
- // confirm function memoize the callback function. It's an alternative function
24
- confirmationHandler?: () => Promise<boolean | undefined>
25
- disabledButtons?: boolean
26
23
  title?: string
27
24
  content?: string | ReactNode
28
25
  onClose?: () => void
@@ -40,9 +37,7 @@ export function ConfirmModal({
40
37
  type = 'default',
41
38
  children,
42
39
  onClose,
43
- confirmationHandler,
44
40
  title,
45
- disabledButtons,
46
41
  content,
47
42
  hideButtons = false,
48
43
  }: ConfirmModalProps) {
@@ -57,16 +52,10 @@ export function ConfirmModal({
57
52
  setIsOpen(() => true)
58
53
  }
59
54
 
60
- const handleConfirmation = async (e) => {
55
+ const handleConfirmation = (e) => {
61
56
  e.stopPropagation()
62
- if (!actionRef.current && !confirmationHandler) return
63
- if (confirmationHandler) {
64
- const res = await confirmationHandler()
65
- if (res) {
66
- setIsOpen(() => false)
67
- }
68
- return
69
- }
57
+ if (!actionRef.current) return
58
+
70
59
  actionRef.current()
71
60
  setIsOpen(() => false)
72
61
  }
@@ -99,7 +88,6 @@ export function ConfirmModal({
99
88
  <Button
100
89
  variant="danger"
101
90
  className="btn-sm rounded"
102
- disabled={disabledButtons}
103
91
  onClick={handleClose}
104
92
  data-id={CONFIRM_MODAL_ACTION_DECLINE}
105
93
  >
@@ -117,14 +105,12 @@ export function ConfirmModal({
117
105
  variant="outline"
118
106
  className="cancel-button"
119
107
  onClick={handleClose}
120
- disabled={disabledButtons}
121
108
  data-id={CONFIRM_MODAL_ACTION_DECLINE}
122
109
  >
123
110
  {t('cancel')}
124
111
  </Button>
125
112
  <Button
126
113
  variant="danger"
127
- disabled={disabledButtons}
128
114
  onClick={handleConfirmation}
129
115
  data-id={CONFIRM_MODAL_ACTION_CONFIRM}
130
116
  >
@@ -135,7 +121,6 @@ export function ConfirmModal({
135
121
  <>
136
122
  <Button
137
123
  variant="danger"
138
- disabled={disabledButtons}
139
124
  onClick={handleClose}
140
125
  data-id={CONFIRM_MODAL_ACTION_DECLINE}
141
126
  >
@@ -143,7 +128,6 @@ export function ConfirmModal({
143
128
  </Button>
144
129
  <Button
145
130
  variant="success"
146
- disabled={disabledButtons}
147
131
  onClick={handleConfirmation}
148
132
  data-id={CONFIRM_MODAL_ACTION_CONFIRM}
149
133
  >
@@ -9,20 +9,15 @@ import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
9
9
  import { FaEllipsisH, FaEye, FaTrashAlt } from 'react-icons/fa'
10
10
  import { ConfirmModal } from '../../modals'
11
11
  import { MenuButton } from '../../table/MenuButton'
12
- import { ProductSetNameControl } from '../form/ProductSetNameControl'
13
12
 
14
13
  export interface ProductSetCardProps extends HasPermissionProp {
15
14
  name: string
16
15
  rrule?: string
17
16
  href: string
18
- duplicateProductSetName: string
19
- onChangeDuplicateProductSetName: (value: string) => void
20
- onCopy: () => Promise<boolean | undefined>
17
+ onCopy: () => void
21
18
  onRemove: () => void
22
- isLoading?: boolean
23
19
  className?: string
24
20
  override?: number
25
- duplicateProductSetError?: string
26
21
  }
27
22
 
28
23
  export function ProductSetCard({
@@ -31,10 +26,6 @@ export function ProductSetCard({
31
26
  href,
32
27
  onCopy,
33
28
  onRemove,
34
- onChangeDuplicateProductSetName,
35
- duplicateProductSetName,
36
- duplicateProductSetError,
37
- isLoading,
38
29
  className = '',
39
30
  hasPermission = true,
40
31
  override = 0,
@@ -44,23 +35,19 @@ export function ProductSetCard({
44
35
  const productSetCardClasses = `product-set-card ${className}`
45
36
  const [isOverlayVisibile, setIsOverlayVisible] = useState(false)
46
37
 
47
- const onCardClick = () => {
48
- RouteService.redirectTo(href)
49
- }
50
38
  return (
51
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events
52
39
  <div
53
40
  role="button"
54
41
  tabIndex={0}
55
42
  className="border-0 product-set-card-wrapper w-100 pb-0"
56
- onClick={onCardClick}
43
+ onClick={() => RouteService.redirectTo(href)}
44
+ onKeyUp={() => RouteService.redirectTo(href)}
57
45
  >
58
46
  <div className={productSetCardClasses}>
59
47
  <div className="product-set-card-link">
60
48
  <div className="d-flex flex-column">
61
49
  <div>
62
- {name}
63
- {rrule && `(${RRule.fromString(rrule).toText()})`}
50
+ {name} {rrule && `(${RRule.fromString(rrule).toText()})`}
64
51
  </div>
65
52
  {!!override && (
66
53
  <div className="h6 bold ml-1">
@@ -92,33 +79,14 @@ export function ProductSetCard({
92
79
  >
93
80
  {hasPermission && (
94
81
  <>
95
- <ListGroup.Item
96
- action
97
- as="div"
98
- role="button"
99
- tabIndex={0}
100
- onClick={(e) => e.stopPropagation()}
101
- >
82
+ <ListGroup.Item action as="div">
102
83
  {Boolean(onCopy) && (
103
- <ConfirmModal
104
- // confirm function memoize the callback function and it leads to bugs
105
- confirmationHandler={onCopy}
106
- disabledButtons={isLoading}
107
- content={
108
- <ProductSetNameControl
109
- value={duplicateProductSetName}
110
- onChange={onChangeDuplicateProductSetName}
111
- error={duplicateProductSetError}
112
- />
113
- }
114
- >
84
+ <ConfirmModal>
115
85
  {(confirm) => (
116
86
  <MenuButton
117
87
  onClick={() => {
118
88
  setIsOverlayVisible(false)
119
- onChangeDuplicateProductSetName(name)
120
- // confirm function memoize the callback function and it leads to bugs
121
- confirm(() => {})
89
+ confirm(onCopy)
122
90
  }}
123
91
  name={t('duplicate')}
124
92
  className="product-set-card-menu-item-text"
@@ -127,14 +95,7 @@ export function ProductSetCard({
127
95
  </ConfirmModal>
128
96
  )}
129
97
  </ListGroup.Item>
130
- <ListGroup.Item
131
- action
132
- className="text-danger"
133
- as="div"
134
- role="button"
135
- tabIndex={0}
136
- onClick={(e) => e.stopPropagation()}
137
- >
98
+ <ListGroup.Item action className="text-danger" as="div">
138
99
  {Boolean(onRemove) && (
139
100
  <ConfirmModal>
140
101
  {(confirm) => (
@@ -247,8 +247,7 @@ export const DateInput = ({
247
247
  menuRecurrence={menuRecurrence}
248
248
  onEdit={() => handleOnEdit(menuRecurrence, index)}
249
249
  errorMessage={
250
- errors?.menuRecurrences?.[`${index}`]?.availableTimes
251
- ?.message || errors?.menuRecurrences?.[`${index}`]?.message
250
+ errors?.menuRecurrences?.[`${index}`]?.availableTimes?.message
252
251
  }
253
252
  />
254
253
  ))}
@@ -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
@@ -256,8 +228,6 @@ export function ProductCategoriesControl({
256
228
  setIsExpanded(productCategoryId)
257
229
  }
258
230
 
259
- const categoryType = CATEGORIES_TYPE[productCategory.type]
260
-
261
231
  return (
262
232
  <Controller
263
233
  key={`product-category-${productCategory._id}`}
@@ -302,12 +272,6 @@ export function ProductCategoriesControl({
302
272
  )}
303
273
  modalClass={ProductSetModalClasses.category}
304
274
  isNewAdded={showCategoryModal}
305
- itemButton={
306
- <div className="btn-outline-primary item-icon sm border border-primary rounded-sm">
307
- {categoryType.icon}
308
- <span className="ml-2">{t(categoryType.label)}</span>
309
- </div>
310
- }
311
275
  body={
312
276
  <ProductCategoryControl
313
277
  isLoading={isLoading}
@@ -1,4 +1,4 @@
1
- import { useEffect, useState } from 'react'
1
+ import { useEffect } from 'react'
2
2
  import { FormValues } from '@licklist/plugins/dist/types/services/Form/hook-form-service'
3
3
  import { Button, Form, Col, Row } from 'react-bootstrap'
4
4
  import { FormProvider, useForm } from 'react-hook-form'
@@ -22,21 +22,16 @@ import { Step } from '../types'
22
22
  import { ProductSetContextProvider, ProductSetLoadingContext } from './context'
23
23
  import { SelectItem } from '../../types/generic/SelectItem'
24
24
  import { checkAvailableTimesErrors, getFilteredTemplates } from '../utils'
25
- import { ErrorModal } from '../../iframe/order-process/components/ErrorModal'
26
25
 
27
26
  export interface WithIsLoading {
28
27
  isLoading: boolean
29
28
  }
30
- export interface WithIdOptional {
31
- id?: number
32
- }
33
-
34
29
  export interface WithId {
35
30
  id: number
36
31
  }
37
32
  export interface ProductSetFormValues
38
33
  extends FormValues,
39
- WithIdOptional,
34
+ WithId,
40
35
  ProductSetControlValues {
41
36
  steps: Step[]
42
37
  isOverrides?: boolean
@@ -89,7 +84,6 @@ export function ProductSetForm({
89
84
  onApproveDialog,
90
85
  onDeclineDialog,
91
86
  } = useDialogContext()
92
- const [errorMessage, setErrorMessage] = useState('')
93
87
 
94
88
  const form = useForm<ProductSetFormValues>({
95
89
  defaultValues,
@@ -127,9 +121,6 @@ export function ProductSetForm({
127
121
  if (!serverErrors) {
128
122
  return
129
123
  }
130
- if (Array.isArray(serverErrors) && serverErrors[0]) {
131
- setErrorMessage(serverErrors[0])
132
- }
133
124
  FormErrorService.handleServerErrors(serverErrors, setError)
134
125
  }, [serverErrors, setError])
135
126
 
@@ -165,12 +156,6 @@ export function ProductSetForm({
165
156
  onDecline={onDeclineDialog}
166
157
  />
167
158
 
168
- <ErrorModal
169
- message={errorMessage}
170
- isOpen={!!errorMessage}
171
- onClose={() => setErrorMessage('')}
172
- />
173
-
174
159
  <FormProvider {...form}>
175
160
  <Form onSubmit={form.handleSubmit(submitHandler(onSubmitAndRedirect))}>
176
161
  <ProductSetLoadingContext.Consumer>
@@ -1,4 +1,7 @@
1
- import { useContext, useState } from 'react'
1
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
+ // @ts-nocheck
3
+ import React, { useContext, useState } from 'react'
4
+
2
5
  import {
3
6
  ArrayPath,
4
7
  Controller,
@@ -25,7 +25,7 @@ import {
25
25
  } from 'react-icons/fa'
26
26
  import { ProductSetLoadingContext } from './context'
27
27
 
28
- export const CATEGORY_TYPES_NAMES = {
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
- export type CategoryConfig = { label: string; icon: ReactElement }
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}
@@ -1,2 +1 @@
1
1
  export * from './ProductSetForm'
2
- export * from './ProductSetNameControl'
@@ -34,6 +34,7 @@ import {
34
34
  } from 'react-hook-form'
35
35
  import { useTranslation } from 'react-i18next'
36
36
  import { useImages } from '@licklist/plugins/dist/hooks/Media/useImages'
37
+
37
38
  import {
38
39
  Image,
39
40
  IMAGE_TYPE_IMAGE,
@@ -1,4 +1,4 @@
1
- import { useContext } from 'react'
1
+ import React, { useContext } from 'react'
2
2
  import { Col, Form } from 'react-bootstrap'
3
3
  import { Controller, Path, useFormContext } from 'react-hook-form'
4
4
  import { HookFormService } from '@licklist/plugins'
@@ -1,4 +1,4 @@
1
- import { useContext, useEffect, useMemo } from 'react'
1
+ import React, { useContext, useEffect, useMemo } from 'react'
2
2
  import { Col, Form, Row } from 'react-bootstrap'
3
3
  import {
4
4
  ArrayPath,
@@ -3,7 +3,6 @@ import { SmsTemplate } from '@licklist/core/dist/DataMapper/Notification/SmsTemp
3
3
  import { TFunction } from 'react-i18next'
4
4
  import { UseFormSetError } from 'react-hook-form'
5
5
  import { checkIfZoneCategory } from '@licklist/plugins'
6
- import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper'
7
6
  import { TemplateItem } from '../control/ProductSetControl'
8
7
  import { ProductSetFormValues } from '../form/ProductSetForm'
9
8
 
@@ -13,11 +12,6 @@ interface CheckAvailableTimesErrors {
13
12
  t: TFunction
14
13
  }
15
14
 
16
- export interface MenuTypeheadItem {
17
- id: number
18
- label: string
19
- value: number
20
- }
21
15
  export const moveArrayElements = <T>(
22
16
  array: T[],
23
17
  prevIndex: number,
@@ -89,8 +83,3 @@ export const checkAvailableTimesErrors = ({
89
83
  })
90
84
  return hasError
91
85
  }
92
-
93
- export const getTypeHeadItemsFromMenus = (
94
- menus?: (ProductSet | ProductSetFormValues)[],
95
- ): MenuTypeheadItem[] =>
96
- menus?.map((menu) => ({ id: menu.id, value: menu.id, label: menu.name }))
@@ -20,6 +20,8 @@ export type ResultCardProps = {
20
20
  onCardClick?: (id: number) => void
21
21
  }
22
22
 
23
+ // @TODO integrate when API will be available
24
+ // activity and staff keys
23
25
  export const ResultCard = ({
24
26
  order,
25
27
  className,
@@ -307,7 +307,6 @@ export function Preview({
307
307
  productCategoryId: 57,
308
308
  productGroupId: null,
309
309
  availableQuantity: 980,
310
- zoneId: null,
311
310
  name: 'Cofee',
312
311
  description: '',
313
312
  price: 15,
@@ -316,8 +315,6 @@ export function Preview({
316
315
  maxQuantity: 15,
317
316
  totalQuantity: 980,
318
317
  type: 'sale' as const,
319
- capacity: 0,
320
- duration: 0,
321
318
  weight: 0,
322
319
  isAvailable: true,
323
320
  isSoldOut: false,
@@ -336,7 +333,6 @@ export function Preview({
336
333
  productCategoryId: 57,
337
334
  productGroupId: null,
338
335
  availableQuantity: 980,
339
- zoneId: null,
340
336
  name: 'Cofee 2',
341
337
  description: '',
342
338
  price: 15,
@@ -345,8 +341,6 @@ export function Preview({
345
341
  maxQuantity: 15,
346
342
  totalQuantity: 980,
347
343
  type: 'sale' as const,
348
- capacity: 0,
349
- duration: 0,
350
344
  weight: 0,
351
345
  isAvailable: true,
352
346
  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">
@@ -48,6 +48,7 @@
48
48
  height: 2.25rem;
49
49
  width: 14.125rem;
50
50
  justify-content: space-between;
51
+ border: 1px solid $snippet-dropdown-border-color;
51
52
  border-radius: $iframe-border-radius;
52
53
  transition: $color-transition;
53
54
 
@@ -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: 2147483646;
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: 2147483647;
27
+ z-index: 1000001;
28
28
  display: none;
29
29
  width: 100%;
30
30
  height: 100%;
@@ -15,12 +15,10 @@
15
15
  height: 2.5rem;
16
16
  border-width: 2px;
17
17
  padding: 2px;
18
-
19
18
  label,
20
19
  .btn-switch-indicator {
21
20
  border-radius: 0.375rem !important;
22
21
  }
23
-
24
22
  label {
25
23
  height: 2rem;
26
24
  }
@@ -36,7 +34,6 @@
36
34
  margin-top: 1.5rem;
37
35
  margin-bottom: 1.5rem;
38
36
  }
39
-
40
37
  @include media-breakpoint-down(sm) {
41
38
  padding: 1.5rem 1rem;
42
39
  margin-top: 0.5rem;
@@ -62,21 +59,10 @@
62
59
  background-color: #ffdbdb;
63
60
  color: #d52902;
64
61
  }
65
-
66
62
  .category-badge {
67
63
  background-color: #e8f4f6;
68
64
  color: #1a93aa;
69
65
  }
70
-
71
- .item-icon {
72
- display: flex;
73
- justify-items: center;
74
- align-items: center;
75
- font-size: 0.65rem;
76
- padding: 0.2rem;
77
- margin-right: 1rem;
78
- }
79
-
80
66
  .product-badge {
81
67
  background-color: #e9f5ea;
82
68
  color: #269b36;
@@ -89,12 +75,10 @@
89
75
 
90
76
  .product-set-mobile-modal {
91
77
  margin: 0;
92
-
93
78
  .modal-content {
94
79
  border-radius: 1rem 1rem 0 0;
95
80
  border-width: 0;
96
81
  margin: 0;
97
-
98
82
  .modal-body {
99
83
  padding: 1rem 0;
100
84
  }
@@ -116,22 +100,18 @@
116
100
  font-weight: 600;
117
101
  font-size: 0.625rem;
118
102
  }
119
-
120
103
  .product-set-subtitle-dot {
121
104
  margin-right: 0.375rem;
122
105
  width: 0.375rem;
123
106
  height: 0.375rem;
124
107
  border-radius: 3px;
125
108
  }
126
-
127
109
  .product-set-subtitle-category-dot {
128
110
  background-color: #269b36;
129
111
  }
130
-
131
112
  .product-set-subtitle-step-dot {
132
113
  background-color: #1a93aa;
133
114
  }
134
-
135
115
  .product-set-subtitle-product-dot {
136
116
  background-color: #269b36;
137
117
  }
@@ -176,7 +156,6 @@
176
156
  justify-self: flex-end;
177
157
  align-items: flex-end;
178
158
  }
179
-
180
159
  .small-badge {
181
160
  font-size: 0.5rem;
182
161
  height: 1rem;
@@ -184,7 +163,6 @@
184
163
  padding: 0 0.2rem;
185
164
  margin-bottom: 0.2rem;
186
165
  }
187
-
188
166
  .product-set-save-btn-wrapper {
189
167
  padding-left: 0 !important;
190
168
  display: flex;
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14rem;
8
+ height: 14.25rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);