@licklist/design 0.78.5-dev.19 → 0.78.5-dev.2

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 (155) hide show
  1. package/dist/auth/Layout/UserNavDropDownToggle.js +0 -3
  2. package/dist/auth/Login/LoginComponent.js +2 -1
  3. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  4. package/dist/events/edit-event-modal/IntervalInput.js +5 -1
  5. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts +2 -1
  6. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
  7. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +3 -2
  8. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -1
  9. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  10. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
  11. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
  12. package/dist/events/event-card/EventCard.d.ts +1 -1
  13. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  14. package/dist/events/event-card/EventCard.js +1 -1
  15. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +2 -1
  16. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  17. package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
  18. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
  19. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  20. package/dist/events/event-statistic-modal/hooks/useTableData.js +2 -1
  21. package/dist/events/event-statistic-modal/utils/index.js +3 -3
  22. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  23. package/dist/events/event-venue-map/EventVenueMap.js +1 -0
  24. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  25. package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
  26. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -1
  27. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +4 -11
  28. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  29. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  30. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +13 -0
  31. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  32. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +80 -81
  33. package/dist/iframe/payment/payment-page/PaymentPage.js +8 -4
  34. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  35. package/dist/iframe/ryft/RyftPaymentForm.js +19 -45
  36. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  37. package/dist/iframe/ryft/utils/ryft-form.js +4 -5
  38. package/dist/modals/dialog/Dialog.d.ts.map +1 -1
  39. package/dist/modals/dialog/Dialog.js +41 -39
  40. package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
  41. package/dist/notification/email-template/control/EmailTemplateControl.d.ts +0 -1
  42. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  43. package/dist/notification/email-template/control/EmailTemplateControl.js +8 -5
  44. package/dist/notification/email-template/form/EmailTemplateForm.d.ts +1 -2
  45. package/dist/notification/email-template/form/EmailTemplateForm.d.ts.map +1 -1
  46. package/dist/notification/email-template/form/EmailTemplateForm.js +1 -2
  47. package/dist/product-set/control/ProductSetControl.js +2 -1
  48. package/dist/product-set/form/ProductSetForm.d.ts +4 -1
  49. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  50. package/dist/product-set/form/ProductSetForm.js +1 -1
  51. package/dist/product-set/form/ProductsControl.js +1 -0
  52. package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -1
  53. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  54. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
  55. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  56. package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
  57. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  58. package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
  59. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  60. package/dist/product-set/product/price/ProductPriceControl.js +3 -0
  61. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  62. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
  63. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  64. package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
  65. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  66. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
  67. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  68. package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
  69. package/dist/product-set/utils/index.d.ts +1 -1
  70. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  71. package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
  72. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  73. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  74. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  75. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  76. package/dist/resource/form/components/CapacityControl.js +3 -0
  77. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  78. package/dist/resource/form/components/SortControl.js +3 -0
  79. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  80. package/dist/sales/coupon/control/CouponFormControl.js +21 -0
  81. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  82. package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
  83. package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.d.ts.map +1 -1
  84. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  85. package/dist/snippet/snippet-template/preview/Preview.js +20 -14
  86. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  87. package/dist/static/CurrencyNumberInput.js +3 -0
  88. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  89. package/dist/static/form-number-input/FormNumberInput.js +3 -0
  90. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  91. package/dist/static/number-input/NumberInput.js +3 -0
  92. package/dist/styles/iframe-events/Calendar.scss +1 -1
  93. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  94. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  95. package/dist/styles/sales/BookingResults.scss +1 -1
  96. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  97. package/dist/zone/form/components/GameDurationControl.js +3 -0
  98. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  99. package/dist/zone/form/components/SortControl.js +3 -0
  100. package/package.json +8 -8
  101. package/src/auth/Layout/UserNavDropDownToggle.tsx +1 -1
  102. package/src/auth/Login/LoginComponent.tsx +1 -1
  103. package/src/events/edit-event-modal/IntervalInput.tsx +4 -0
  104. package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +12 -4
  105. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
  106. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +0 -1
  107. package/src/events/event-card/EventCard.tsx +10 -8
  108. package/src/events/event-statistic-modal/EventStatisticModal.tsx +3 -2
  109. package/src/events/event-statistic-modal/hooks/useTableData.tsx +2 -1
  110. package/src/events/event-statistic-modal/utils/index.ts +4 -4
  111. package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
  112. package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
  113. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +1 -5
  114. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -2
  115. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
  116. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +109 -103
  117. package/src/iframe/payment/payment-page/PaymentPage.tsx +6 -6
  118. package/src/iframe/ryft/RyftPaymentForm.tsx +25 -58
  119. package/src/iframe/ryft/utils/ryft-form.ts +6 -5
  120. package/src/modals/dialog/Dialog.tsx +36 -35
  121. package/src/notification/email-template/card/EmailTemplateCard.tsx +2 -0
  122. package/src/notification/email-template/control/EmailTemplateControl.tsx +9 -10
  123. package/src/notification/email-template/form/EmailTemplateForm.tsx +0 -3
  124. package/src/product-set/control/ProductSetControl.tsx +1 -1
  125. package/src/product-set/form/ProductSetForm.tsx +6 -2
  126. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
  127. package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
  128. package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
  129. package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
  130. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
  131. package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
  132. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
  133. package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
  134. package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
  135. package/src/recurrence-input/RecurrenceInput.tsx +3 -4
  136. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
  137. package/src/resource/form/components/CapacityControl.tsx +1 -0
  138. package/src/resource/form/components/SortControl.tsx +1 -0
  139. package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
  140. package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
  141. package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +0 -1
  142. package/src/snippet/snippet-template/preview/Preview.tsx +9 -6
  143. package/src/static/CurrencyNumberInput.tsx +1 -0
  144. package/src/static/form-number-input/FormNumberInput.tsx +1 -0
  145. package/src/static/number-input/NumberInput.tsx +1 -0
  146. package/src/styles/iframe-events/Calendar.scss +1 -1
  147. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  148. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  149. package/src/styles/sales/BookingResults.scss +1 -1
  150. package/src/zone/form/components/GameDurationControl.tsx +1 -0
  151. package/src/zone/form/components/SortControl.tsx +1 -0
  152. package/yarn.lock +575 -528
  153. package/dist/CustomDatePicker/CustomDatePicker.d.ts +0 -10
  154. package/dist/CustomDatePicker/CustomDatePicker.d.ts.map +0 -1
  155. package/src/CustomDatePicker/CustomDatePicker.tsx +0 -252
@@ -74,7 +74,7 @@
74
74
  .calendar-dates-wrapper {
75
75
  .calendar-dates {
76
76
  display: grid;
77
- grid-template-columns: repeat(7, 1fr);
77
+ grid-template-columns: repeat(7, auto);
78
78
  grid-gap: 0.5rem 1rem;
79
79
  overflow-x: auto;
80
80
  }
@@ -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: 1000000;
18
+ z-index: 2147483646;
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: 1000001;
27
+ z-index: 2147483647;
28
28
  display: none;
29
29
  width: 100%;
30
30
  height: 100%;
@@ -102,7 +102,6 @@
102
102
  }
103
103
 
104
104
  .ryft-payment-form {
105
-
106
105
  .form-disable-box {
107
106
  display: none;
108
107
  position: absolute;
@@ -184,7 +183,6 @@
184
183
  }
185
184
 
186
185
  @include media-breakpoint-up(md) {
187
-
188
186
  .ryft-payment-form,
189
187
  .form-disable-box {
190
188
  height: 50%;
@@ -213,4 +211,4 @@
213
211
  .divider {
214
212
  display: none !important;
215
213
  }
216
- }
214
+ }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14.25rem;
8
+ height: 14rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -1 +1 @@
1
- {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CA+B1B,CAAA"}
1
+ {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CAgC1B,CAAA"}
@@ -77,6 +77,9 @@ var GameDurationControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
+ onWheel: function(event) {
81
+ return event.currentTarget.blur();
82
+ },
80
83
  placeholder: t('Design:duration'),
81
84
  isInvalid: Boolean(errors.defaultDuration),
82
85
  disabled: isLoading
@@ -1 +1 @@
1
- {"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAmC1D,CAAA"}
1
+ {"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAoC1D,CAAA"}
@@ -77,6 +77,9 @@ var SortControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
+ onWheel: function(event) {
81
+ return event.currentTarget.blur();
82
+ },
80
83
  placeholder: t('Design:ordering'),
81
84
  isInvalid: Boolean(errors.sort),
82
85
  disabled: isLoading
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.78.5-dev.19",
3
+ "version": "0.78.5-dev.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -42,9 +42,9 @@
42
42
  ]
43
43
  },
44
44
  "peerDependencies": {
45
- "@licklist/core": "0.36.3-stage.0",
45
+ "@licklist/core": "0.36.1-dev.1",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.36.4-stage.4",
47
+ "@licklist/plugins": "0.36.4-dev.1",
48
48
  "clsx": "2.1.1",
49
49
  "i18next": "25.3.2",
50
50
  "lodash": "4.17.21",
@@ -64,9 +64,9 @@
64
64
  "@dnd-kit/utilities": "2.0.0",
65
65
  "@fortawesome/fontawesome-svg-core": "1.2.34",
66
66
  "@fortawesome/free-solid-svg-icons": "5.15.2",
67
- "@licklist/core": "0.36.3-stage.0",
67
+ "@licklist/core": "0.36.1-dev.1",
68
68
  "@licklist/eslint-config": "0.5.6",
69
- "@licklist/plugins": "0.36.4-stage.5",
69
+ "@licklist/plugins": "0.36.4-dev.1",
70
70
  "@mantine/core": "6.0.22",
71
71
  "@mantine/hooks": "6.0.22",
72
72
  "@mdx-js/react": "1.6.22",
@@ -97,7 +97,6 @@
97
97
  "@wojtekmaj/react-daterange-picker": "4.1.0",
98
98
  "bootstrap": "4.6.0",
99
99
  "bootstrap-social": "5.1.1",
100
- "clsx": "2.1.1",
101
100
  "date-fns": "2.29.3",
102
101
  "emojibase": "6.1.0",
103
102
  "emojibase-data": "7.0.1",
@@ -200,7 +199,7 @@
200
199
  },
201
200
  "resolutions": {
202
201
  "@types/react": "18.3.12",
203
- "@types/react-dom": "18.3.1"
202
+ "@types/react-dom": "17.0.25"
204
203
  },
205
204
  "lint-staged": {
206
205
  "*.{ts,tsx}": [
@@ -209,9 +208,10 @@
209
208
  "yarn tsc"
210
209
  ]
211
210
  },
211
+ "packageManager": "yarn@4.4.0",
212
212
  "volta": {
213
213
  "node": "20.9.0",
214
214
  "yarn": "4.4.0"
215
215
  },
216
- "stableVersion": "0.71.19-stage.1"
216
+ "stableVersion": "0.71.4-dev.1"
217
217
  }
@@ -13,7 +13,7 @@ function UserNavDropDownToggle(props: UserNavDropDownToggleProps) {
13
13
  return (
14
14
  <>
15
15
  <span className='header-user-name mr-2 d-none d-lg-inline text-gray-600 small'>
16
- <Trans t={t} i18nKey='userPromo' values={{ name: user?.first_name }}>
16
+ <Trans t={t} i18nKey='userPromo'>
17
17
  Hi, {{ name: user?.first_name }}
18
18
  </Trans>
19
19
  </span>
@@ -44,7 +44,7 @@ const LoginComponent = ({
44
44
  const handleError = (error: any) => {
45
45
  notification.danger({
46
46
  title: 'Error',
47
- message: error.message,
47
+ message: error?.response?.data?.message || error.message,
48
48
  })
49
49
  }
50
50
 
@@ -159,6 +159,10 @@ export function IntervalInput({
159
159
  {formattedDuration && `lasts ${formattedDuration}`}
160
160
  </Form.Text>
161
161
  </Form.Group>
162
+
163
+ <Form.Control.Feedback type='invalid'>
164
+ {errors.end?.message}
165
+ </Form.Control.Feedback>
162
166
  </Form.Row>
163
167
  {start && (
164
168
  <Form.Group controlId={recurrentId}>
@@ -39,10 +39,12 @@ type SaleDeadlineType =
39
39
  export const SaleDeadline = ({
40
40
  disabled = false,
41
41
  onlyBefore = false,
42
+ isProductSet = false,
42
43
  deadLineCategory,
43
44
  }: {
44
45
  disabled?: boolean
45
46
  onlyBefore?: boolean
47
+ isProductSet?: boolean
46
48
  deadLineCategory?: string
47
49
  }) => {
48
50
  const { t } = useTranslation(['Design'])
@@ -140,10 +142,16 @@ export const SaleDeadline = ({
140
142
  <Switch
141
143
  name='sale-deadline'
142
144
  options={SALE_DEADLINES_EVENT_START_TYPES.map(
143
- ({ type }) => ({
144
- id: type,
145
- value: t(`Design:${type}`),
146
- }),
145
+ ({ type }) => {
146
+ const salesDeadlineTitle =
147
+ type === SALE_DEADLINE_BEFORE_TYPE && isProductSet
148
+ ? 'beforeProductSet'
149
+ : type
150
+ return {
151
+ id: type,
152
+ value: t(`Design:${salesDeadlineTitle}`),
153
+ }
154
+ },
147
155
  )}
148
156
  value={deadlineType}
149
157
  onChange={changeValueByType}
@@ -41,7 +41,6 @@ export const getDefaultValues = (
41
41
  ...product,
42
42
  subProducts: subProducts?.map(({ ...subProducts }) => ({
43
43
  ...subProducts,
44
- originalProductId: null,
45
44
  productCategoryId: undefined,
46
45
  })),
47
46
  productCategoryId: undefined,
@@ -86,7 +86,6 @@ export const EditRecurrentEventModal = ({
86
86
  contentClassName='rounded'
87
87
  >
88
88
  <Form onSubmit={handleSubmit(onSubmit)} noValidate>
89
- {/* @ts-ignore */}
90
89
  <Modal.Header className='border-0'>
91
90
  <Modal.Title as='h6'>{title}</Modal.Title>
92
91
  <Button
@@ -33,7 +33,7 @@ export interface EventCardProps extends HasPermissionProp {
33
33
  onPreview: () => void
34
34
  onEdit: () => void
35
35
  onCopy: () => void
36
- onRemove: () => void
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
- <button
216
- type='button'
217
- className='event-card-link-button'
218
- onClick={onRemove}
219
- >
220
- <FaTrashAlt />
221
- </button>
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>
@@ -12,6 +12,7 @@ export type EventStatisticModalProps = {
12
12
  date?: Event['startAt'] | null
13
13
  eventStatistic?: EventStatistic | null
14
14
  title?: string
15
+ eventId?: string
15
16
  }
16
17
 
17
18
  export const EventStatisticModal = ({
@@ -20,10 +21,11 @@ export const EventStatisticModal = ({
20
21
  date,
21
22
  eventStatistic,
22
23
  title,
24
+ eventId,
23
25
  }: EventStatisticModalProps) => {
24
26
  const { t } = useTranslation('Design')
25
27
 
26
- const data = useTableData(date, eventStatistic)
28
+ const data = useTableData(date, eventStatistic, eventId)
27
29
  const handleClose = () => {
28
30
  setIsOpen(false)
29
31
  }
@@ -37,7 +39,6 @@ export const EventStatisticModal = ({
37
39
  contentClassName='rounded'
38
40
  className='event-statistic-modal'
39
41
  >
40
- {/* @ts-ignore */}
41
42
  <Modal.Header>
42
43
  <Modal.Title as='h6'>{title ?? t('eventStatistic')}</Modal.Title>
43
44
  <Button
@@ -11,6 +11,7 @@ import { StaticTableData } from '../../../table'
11
11
  export const useTableData = (
12
12
  date: Event['startAt'] | null,
13
13
  eventStatistic: EventStatistic | null,
14
+ eventId: string,
14
15
  ) => {
15
16
  const { t } = useTranslation('Design')
16
17
  const { formatNumber } = useIntl()
@@ -84,7 +85,7 @@ export const useTableData = (
84
85
  useEffect(() => {
85
86
  setTableRows(transformStatisticToTableRows(date, eventStatistic))
86
87
  // eslint-disable-next-line react-hooks/exhaustive-deps
87
- }, [date, eventStatistic])
88
+ }, [date, eventId, eventStatistic])
88
89
 
89
90
  return tableRows
90
91
  }
@@ -33,15 +33,15 @@ export const convertEventStatisticToTableData = (
33
33
  return []
34
34
  }
35
35
 
36
- const summaryFormattedDate = DateTime.fromISO(date)
37
- .toUTC()
38
- .toFormat(DATE_FORMAT)
36
+ const summaryFormattedDate = DateTime.fromISO(date).toFormat(
37
+ DATE_TIME_FULL_FORMAT,
38
+ )
39
39
 
40
40
  const summaryDays =
41
41
  Object.keys(eventStatistic?.productCategorySummary)?.filter(
42
42
  (date) =>
43
43
  DateTime.fromFormat(date, DATE_TIME_FULL_FORMAT).toFormat(
44
- DATE_FORMAT,
44
+ DATE_TIME_FULL_FORMAT,
45
45
  ) === summaryFormattedDate,
46
46
  ) ?? []
47
47
 
@@ -49,6 +49,7 @@ export const EventVenueMap = forwardRef<VenueMapRef, EventVenueMapProps>(
49
49
  },
50
50
  ref,
51
51
  ) => {
52
+ // TODO fix often updating of canvasSizes, which leads to flashing poingts
52
53
  const canvasSizes = useCanvasSize({ width, height })
53
54
 
54
55
  return (
@@ -10,13 +10,17 @@ export const useCanvasSize = ({
10
10
  width: componentWidth,
11
11
  height: componentHeight,
12
12
  }: CanvasSizeProps) => {
13
+ // TODO Fix often updating of width and height
13
14
  const { width, height } = useWindowDimensions()
14
15
 
16
+ // eslint-disable-next-line react-hooks/exhaustive-deps
17
+ const memoizedDimensions = useMemo(() => ({ width, height }), [width])
18
+
15
19
  const memoedComponentParameters = useMemo(() => {
16
20
  if (!componentWidth && !componentHeight) return null
17
21
 
18
22
  return { width: componentWidth, height: componentHeight }
19
23
  }, [componentWidth, componentHeight])
20
24
 
21
- return memoedComponentParameters || { width, height }
25
+ return memoedComponentParameters || memoizedDimensions
22
26
  }
@@ -35,9 +35,6 @@ export const ModifiersSetControl = ({
35
35
  const { t } = useTranslation('App')
36
36
 
37
37
  const orderModifiersSets = watch(`${productId}.orderProductModifiers`)
38
- const filteredOrderModifiersSets = orderModifiersSets
39
- ?.flat(Infinity)
40
- ?.filter((item) => item && typeof item === 'object')
41
38
 
42
39
  const { formatNumber } = useIntl()
43
40
  const formatToCurrency = (value: number) =>
@@ -61,9 +58,8 @@ export const ModifiersSetControl = ({
61
58
  const selectedModifier = modifiers?.find(
62
59
  (item) => item.id === Number(e.target.defaultValue || e.target.id),
63
60
  )
64
-
65
61
  const checkSelectedModifier =
66
- filteredOrderModifiersSets?.find(
62
+ orderModifiersSets?.find(
67
63
  (modifier) => modifier?.modifierId === selectedModifier?.id,
68
64
  )?.quantity === 1
69
65
 
@@ -19,8 +19,8 @@ export const cartSumByOrderProducts = ({
19
19
  if (!product) return 0
20
20
  const modifiersPrice = calculateTotalModifiersPrice(
21
21
  product?.orderModifiersSets,
22
- ) || 0
23
-
22
+ )
23
+
24
24
  const price = isTotalSum
25
25
  ? product?.price
26
26
  : product.hasDeposit
@@ -89,6 +89,7 @@ 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()}
92
93
  value={value}
93
94
  min={0}
94
95
  max={max}
@@ -101,6 +102,14 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
101
102
  <button
102
103
  type='button'
103
104
  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
+ }
104
113
  className={`payment-number-input__btn-up ${
105
114
  plusButtonGreyedOut && 'disabled-number-input-button'
106
115
  }`}