@licklist/design 0.71.18-dev.8 → 0.71.18

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 (322) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
  3. package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
  4. package/dist/auth/Login/LoginComponent.js +1 -2
  5. package/dist/auth/Login/LoginFormComponent.d.ts.map +1 -1
  6. package/dist/auth/Logout/Logout.js +0 -1
  7. package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
  8. package/dist/auth/Register/RegisterFormComponent.d.ts.map +1 -1
  9. package/dist/auth/ResetPassword/ResetPasswordFormComponent.d.ts.map +1 -1
  10. package/dist/auth/Router.d.ts.map +1 -1
  11. package/dist/auth/Router.js +0 -2
  12. package/dist/calendar/utils/index.d.ts +1 -1
  13. package/dist/calendar/utils/index.d.ts.map +1 -1
  14. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
  15. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -3
  16. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  17. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
  18. package/dist/events/event-card/utils.d.ts.map +1 -1
  19. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +1 -2
  20. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  21. package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
  22. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
  23. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  24. package/dist/events/event-statistic-modal/hooks/useTableData.js +1 -2
  25. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  26. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  27. package/dist/events/event-venue-map/EventVenueMap.js +0 -1
  28. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  29. package/dist/events/event-venue-map/hooks/useCanvasSize.js +4 -11
  30. package/dist/iframe/activity-card/ActivityCard.d.ts +2 -1
  31. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  32. package/dist/iframe/activity-card/ActivityCard.js +7 -1
  33. package/dist/iframe/event/ticket-description/TicketDescription.d.ts +1 -2
  34. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  35. package/dist/iframe/event/ticket-description/TicketDescription.js +3 -4
  36. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
  37. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +2 -15
  38. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.d.ts.map +1 -1
  39. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.js +3 -3
  40. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +0 -4
  41. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  42. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +2 -27
  43. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  44. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +2 -106
  45. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  46. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
  47. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -3
  48. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  49. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -95
  50. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  51. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  52. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +10 -83
  53. package/dist/iframe/payment/order-items-table/utils/index.d.ts.map +1 -1
  54. package/dist/iframe/payment/order-items-table/utils/index.js +0 -15
  55. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  56. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +2 -2
  57. package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts.map +1 -1
  58. package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +2 -2
  59. package/dist/iframe/ryft/RyftPaymentForm.js +0 -1
  60. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  61. package/dist/iframe/ryft/utils/ryft-form.js +5 -4
  62. package/dist/index.js +1 -2
  63. package/dist/layout/DropDown.d.ts +1 -2
  64. package/dist/layout/DropDown.d.ts.map +1 -1
  65. package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
  66. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  67. package/dist/notification/email-template/control/EmailTemplateControl.js +0 -3
  68. package/dist/notification/sms-template/card/SmsTemplateCard.d.ts.map +1 -1
  69. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  70. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  71. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  72. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  73. package/dist/product-set/form/ProductSetForm.d.ts +2 -7
  74. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  75. package/dist/product-set/form/ProductSetForm.js +5 -7
  76. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  77. package/dist/product-set/form/ProductZonesControl.js +2 -0
  78. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  79. package/dist/product-set/form/ProductsControl.js +5 -25
  80. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  81. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  82. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  83. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  84. package/dist/product-set/form/SubProductsControl.js +3 -0
  85. package/dist/product-set/form/VenueMapsControl.d.ts +1 -1
  86. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  87. package/dist/product-set/form/VenueMapsControl.js +3 -0
  88. package/dist/product-set/form/context.d.ts +1 -3
  89. package/dist/product-set/form/context.d.ts.map +1 -1
  90. package/dist/product-set/form/context.js +1 -2
  91. package/dist/product-set/product/ProductControl.d.ts +0 -8
  92. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  93. package/dist/product-set/product/ProductControl.js +1 -25
  94. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  95. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
  96. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  97. package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
  98. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  99. package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
  100. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  101. package/dist/product-set/product/price/ProductPriceControl.js +0 -3
  102. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  103. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
  104. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  105. package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
  106. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  107. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
  108. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  109. package/dist/product-set/product-category/ProductCategoryControl.js +0 -12
  110. package/dist/product-set/utils/index.d.ts +0 -88
  111. package/dist/product-set/utils/index.d.ts.map +1 -1
  112. package/dist/product-set/utils/index.js +1 -19
  113. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  114. package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
  115. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  116. package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts +1 -2
  117. package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts.map +1 -1
  118. package/dist/report/ReportRunnerModal/ReportRunnerModal.js +2 -4
  119. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  120. package/dist/resource/form/components/CapacityControl.js +0 -3
  121. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  122. package/dist/resource/form/components/SortControl.js +0 -3
  123. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  124. package/dist/sales/booking/results/components/ResultCard.js +2 -0
  125. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  126. package/dist/sales/coupon/control/CouponFormControl.js +0 -21
  127. package/dist/sales/coupon/utils/index.d.ts +1 -2
  128. package/dist/sales/coupon/utils/index.d.ts.map +1 -1
  129. package/dist/sales/life-time-sales/LifeTimeSalesChart.js +0 -1
  130. package/dist/sales/manual-booking/select-event/SelectEvent.js +0 -1
  131. package/dist/sales/manual-booking/select-menu/SelectMenu.js +0 -1
  132. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +0 -1
  133. package/dist/sales/modals/refund-modal/RefundModal.d.ts +2 -6
  134. package/dist/sales/modals/refund-modal/RefundModal.d.ts.map +1 -1
  135. package/dist/sales/modals/refund-modal/RefundModal.js +4 -8
  136. package/dist/sales/modals/refund-modal/index.d.ts +2 -2
  137. package/dist/sales/modals/refund-modal/index.d.ts.map +1 -1
  138. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  139. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  140. package/dist/setting/admin/PaymentFeeForm.js +1 -16
  141. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  142. package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
  143. package/dist/setting/dashboard/snippet-templates/card/SnippetTemplateCard.d.ts.map +1 -1
  144. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  145. package/dist/snippet/snippet-template/preview/Preview.js +1 -3
  146. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  147. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  148. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  149. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  150. package/dist/static/CurrencyNumberInput.js +0 -3
  151. package/dist/static/date-range-input/utils/index.d.ts +1 -1
  152. package/dist/static/date-range-input/utils/index.d.ts.map +1 -1
  153. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  154. package/dist/static/form-number-input/FormNumberInput.js +0 -3
  155. package/dist/static/loader/LoaderIndicator.d.ts +3 -2
  156. package/dist/static/loader/LoaderIndicator.d.ts.map +1 -1
  157. package/dist/static/loader/LoaderIndicator.js +2 -4
  158. package/dist/static/loader/index.d.ts +0 -1
  159. package/dist/static/loader/index.d.ts.map +1 -1
  160. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  161. package/dist/static/number-input/NumberInput.js +0 -3
  162. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +4 -1
  163. package/dist/styles/date-time-button/DateTimeButton.scss +1 -10
  164. package/dist/styles/events/EditEventModal.scss +0 -2
  165. package/dist/styles/iframe-events/Calendar.scss +1 -1
  166. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  167. package/dist/styles/iframe-page/Page.scss +0 -16
  168. package/dist/styles/iframe-page/PageBody.scss +0 -4
  169. package/dist/styles/modals/Modals.scss +0 -16
  170. package/dist/styles/product-set/EditProductSetElement.scss +0 -1
  171. package/dist/styles/product-set/ProductSetForm.scss +0 -33
  172. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +4 -2
  173. package/dist/styles/sales/BookingResults.scss +1 -1
  174. package/dist/styles/sales/ManualBooking.scss +0 -6
  175. package/dist/styles/static/Loader.scss +0 -9
  176. package/dist/styles/themes/bookedit/index.scss +0 -19
  177. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  178. package/dist/zone/form/components/GameDurationControl.js +0 -3
  179. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  180. package/dist/zone/form/components/SortControl.js +0 -3
  181. package/package.json +6 -8
  182. package/src/affiliate/form/AffiliateForm.tsx +0 -1
  183. package/src/auth/Layout/AuthNavComponent.tsx +0 -4
  184. package/src/auth/Login/LoginComponent.tsx +1 -3
  185. package/src/auth/Login/LoginFormComponent.tsx +0 -2
  186. package/src/auth/Register/RegisterComponent.tsx +0 -2
  187. package/src/auth/Register/RegisterFormComponent.tsx +0 -4
  188. package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +0 -4
  189. package/src/auth/Router.tsx +0 -2
  190. package/src/calendar/Calendar.stories.tsx +2 -2
  191. package/src/calendar/utils/index.ts +1 -1
  192. package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +7 -9
  193. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  194. package/src/events/event-card/utils.ts +9 -10
  195. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -3
  196. package/src/events/event-statistic-modal/hooks/useTableData.tsx +1 -2
  197. package/src/events/event-statistic-modal/utils/index.ts +1 -2
  198. package/src/events/event-venue-map/EventVenueMap.tsx +0 -1
  199. package/src/events/event-venue-map/hooks/useCanvasSize.ts +1 -5
  200. package/src/iframe/activity-card/ActivityCard.stories.tsx +2 -0
  201. package/src/iframe/activity-card/ActivityCard.tsx +4 -0
  202. package/src/iframe/event/ticket-description/TicketDescription.tsx +3 -5
  203. package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +1 -21
  204. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +11 -13
  205. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +4 -47
  206. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +75 -155
  207. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
  208. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -58
  209. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +2 -1
  210. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +14 -84
  211. package/src/iframe/payment/order-items-table/utils/index.ts +0 -23
  212. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +2 -3
  213. package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +20 -19
  214. package/src/iframe/ryft/utils/ryft-form.ts +5 -6
  215. package/src/layout/DropDown.tsx +1 -1
  216. package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
  217. package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
  218. package/src/notification/sms-template/card/SmsTemplateCard.tsx +0 -2
  219. package/src/product-set/control/DateAndRecurrenceInput.tsx +4 -3
  220. package/src/product-set/control/DateInput.tsx +4 -3
  221. package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
  222. package/src/product-set/form/ProductSetForm.tsx +5 -17
  223. package/src/product-set/form/ProductZonesControl.tsx +4 -1
  224. package/src/product-set/form/ProductsControl.tsx +15 -33
  225. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  226. package/src/product-set/form/SubProductsControl.tsx +3 -0
  227. package/src/product-set/form/VenueMapsControl.tsx +4 -1
  228. package/src/product-set/form/context.tsx +0 -5
  229. package/src/product-set/product/ProductControl.tsx +2 -37
  230. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  231. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
  232. package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
  233. package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
  234. package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
  235. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
  236. package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
  237. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
  238. package/src/product-set/product-category/ProductCategoryControl.tsx +0 -4
  239. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  240. package/src/product-set/utils/index.ts +0 -19
  241. package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
  242. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
  243. package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +0 -3
  244. package/src/resource/form/components/CapacityControl.tsx +0 -1
  245. package/src/resource/form/components/SortControl.tsx +0 -1
  246. package/src/sales/booking/results/components/ResultCard.tsx +2 -0
  247. package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
  248. package/src/sales/coupon/utils/index.ts +3 -5
  249. package/src/sales/modals/refund-modal/RefundModal.tsx +6 -15
  250. package/src/sales/modals/refund-modal/index.ts +2 -7
  251. package/src/setting/admin/AdminSettingForm.tsx +0 -4
  252. package/src/setting/admin/PaymentFeeForm.tsx +0 -5
  253. package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
  254. package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +0 -2
  255. package/src/snippet/snippet-template/preview/Preview.tsx +2 -1
  256. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  257. package/src/static/CurrencyNumberInput.tsx +0 -1
  258. package/src/static/date-range-input/utils/index.ts +1 -1
  259. package/src/static/form-number-input/FormNumberInput.tsx +0 -1
  260. package/src/static/loader/LoaderIndicator.tsx +3 -6
  261. package/src/static/loader/index.ts +0 -1
  262. package/src/static/number-input/NumberInput.tsx +0 -1
  263. package/src/styles/availability-indicator/AvailabilityIndicator.scss +4 -1
  264. package/src/styles/date-time-button/DateTimeButton.scss +1 -10
  265. package/src/styles/events/EditEventModal.scss +0 -2
  266. package/src/styles/iframe-events/Calendar.scss +1 -1
  267. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  268. package/src/styles/iframe-page/Page.scss +0 -16
  269. package/src/styles/iframe-page/PageBody.scss +0 -4
  270. package/src/styles/modals/Modals.scss +0 -16
  271. package/src/styles/product-set/EditProductSetElement.scss +0 -1
  272. package/src/styles/product-set/ProductSetForm.scss +0 -33
  273. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +4 -2
  274. package/src/styles/sales/BookingResults.scss +1 -1
  275. package/src/styles/sales/ManualBooking.scss +0 -6
  276. package/src/styles/static/Loader.scss +0 -9
  277. package/src/styles/themes/bookedit/index.scss +0 -19
  278. package/src/zone/form/components/GameDurationControl.tsx +0 -1
  279. package/src/zone/form/components/SortControl.tsx +0 -1
  280. package/yarn.lock +269 -277
  281. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +0 -18
  282. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +0 -1
  283. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +0 -289
  284. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts +0 -15
  285. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +0 -1
  286. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +0 -89
  287. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts +0 -14
  288. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +0 -1
  289. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +0 -404
  290. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts +0 -10
  291. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +0 -1
  292. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +0 -87
  293. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts +0 -2
  294. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts.map +0 -1
  295. package/dist/iframe/ProductWithModifierModal/index.d.ts +0 -2
  296. package/dist/iframe/ProductWithModifierModal/index.d.ts.map +0 -1
  297. package/dist/iframe/ProductWithModifierModal/utils.d.ts +0 -5
  298. package/dist/iframe/ProductWithModifierModal/utils.d.ts.map +0 -1
  299. package/dist/iframe/ProductWithModifierModal/utils.js +0 -21
  300. package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts +0 -23
  301. package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts.map +0 -1
  302. package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.js +0 -62
  303. package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts +0 -2
  304. package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts.map +0 -1
  305. package/dist/iframe/order-process/components/CategoryProduct/constants.js +0 -4
  306. package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts +0 -6
  307. package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts.map +0 -1
  308. package/dist/iframe/order-process/components/utils/useOnWindowUnmount.js +0 -18
  309. package/dist/static/loader/FullScreenLoader.d.ts +0 -8
  310. package/dist/static/loader/FullScreenLoader.d.ts.map +0 -1
  311. package/dist/static/loader/FullScreenLoader.js +0 -41
  312. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +0 -212
  313. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +0 -75
  314. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +0 -393
  315. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +0 -98
  316. package/src/iframe/ProductWithModifierModal/ModifierSetModal/index.ts +0 -1
  317. package/src/iframe/ProductWithModifierModal/index.ts +0 -1
  318. package/src/iframe/ProductWithModifierModal/utils.ts +0 -29
  319. package/src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx +0 -86
  320. package/src/iframe/order-process/components/CategoryProduct/constants.ts +0 -1
  321. package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +0 -25
  322. package/src/static/loader/FullScreenLoader.tsx +0 -16
@@ -1,7 +1,3 @@
1
- import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper'
2
- import {
3
- OrderModifierByProduct
4
- } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
5
1
  import { QuantityCheckProductInfo } from '@licklist/plugins/dist/types/Api/verifyStock'
6
2
  import { OrderItem } from '@licklist/plugins/dist/types/context/Iframe/orderItems'
7
3
 
@@ -9,64 +5,25 @@ export const cartSumByOrderProducts = ({
9
5
  orderProducts,
10
6
  isTotalSum,
11
7
  }: {
12
- orderProducts?: OrderItem[]
13
- isTotalSum?: boolean
8
+ orderProducts?: OrderItem[];
9
+ isTotalSum?: boolean;
14
10
  }) => {
15
11
  if (!orderProducts || !orderProducts.length) {
16
12
  return 0
17
13
  }
18
14
  return orderProducts.reduce((prevSumValue: number, product) => {
19
15
  if (!product) return 0
20
- const modifiersPrice = calculateTotalModifiersPrice(
21
- product?.orderModifiersSets,
22
- )
23
-
16
+
24
17
  const price = isTotalSum
25
18
  ? product?.price
26
19
  : product.hasDeposit
27
20
  ? product?.deposit
28
21
  : product?.price
29
22
 
30
- return prevSumValue + price * product.quantity + modifiersPrice
23
+ return prevSumValue + price * product.quantity
31
24
  }, 0)
32
25
  }
33
26
 
34
- export const getModifierName = (
35
- modifier: OrderModifierByProduct,
36
- isManualBooking: boolean,
37
- ) => {
38
- const modifierName = (orderModifier: OrderModifier) =>
39
- isManualBooking ? orderModifier.modifier.name : orderModifier?.name
40
- return `${modifier.modifiers.map((item) => (
41
- item?.quantity > 1 ? `${item?.quantity}x - ${modifierName(item)}` : modifierName(item))).join(', ')}`
42
- }
43
-
44
- export const calculateTotalModifiersPrice = (
45
- orderModifiersSets: OrderModifierByProduct[],
46
- ) =>
47
- orderModifiersSets
48
- ?.map((set) =>
49
- set.modifiers.reduce(
50
- (sum, modifier) =>
51
- sum + modifier.price * modifier.quantity * set.productQuantity,
52
- 0,
53
- ),
54
- )
55
- .reduce((total, setTotal) => total + setTotal, 0)
56
-
57
- export const getOrderProductModifiersPrice = (
58
- modifierFromProduct: OrderModifierByProduct,
59
- ) => {
60
- const { modifiers, productQuantity } = modifierFromProduct
61
- const modifiersPrices = modifiers.reduce(
62
- (prevSumModifier: number, modifier: OrderModifier) =>
63
- prevSumModifier + modifier.price * modifier.quantity,
64
- 0,
65
- )
66
-
67
- return modifiersPrices * productQuantity
68
- }
69
-
70
27
  export const getProductError = (
71
28
  productsWithErrors: QuantityCheckProductInfo[],
72
29
  productId: OrderItem['id'],
@@ -1,4 +1,4 @@
1
- import { useEffect, useMemo, useState } from 'react'
1
+ import { useEffect, useMemo } from 'react'
2
2
  import { useFormContext, Controller } from 'react-hook-form'
3
3
  import clsx from 'clsx'
4
4
  import { useTranslation } from 'react-i18next'
@@ -10,14 +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
- import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
17
13
  import { TicketDescription } from '../../../event/ticket-description'
18
14
  import { ProductQuantityInput } from './components/ProductQuantityInput'
19
- import { FormOrderItem } from './components/ProductQuantityInput/ProductQuantityInput'
20
- import { ProductWithModifier } from './components/ProductWithModifier/ProductWithModifier'
21
15
 
22
16
  interface CategoryProductProps {
23
17
  product: Product
@@ -37,9 +31,7 @@ export const CategoryProduct = ({
37
31
  const { formatNumber } = useIntl()
38
32
  const { t } = useTranslation(['Design', 'Validation'])
39
33
  const { control, clearErrors, setError } = useFormContext()
40
- const [editOrderModifierIndex, setEditOrderModifierIndex] =
41
- useState<OrderModifierByProduct>(undefined)
42
- const [modifierIndex, setModifierIndex] = useState<number>(undefined)
34
+
43
35
  const hasDeposits = category.allowDeposits && product?.deposit < product.price
44
36
 
45
37
  const productQuantityError = useMemo(() => {
@@ -126,155 +118,83 @@ export const CategoryProduct = ({
126
118
  render={({
127
119
  field: { onChange, value: productInfo = {}, ref },
128
120
  fieldState: { invalid, error },
129
- }) => {
130
- const deleteOrderModifier = (orderModifierIndex: number) => {
131
- const removedOrderModifierIndex = (
132
- productInfo as FormOrderItem
133
- ).orderModifiersSets?.filter(
134
- (_, index) => index !== orderModifierIndex,
135
- )
136
- const productInfoWithRemove = {
137
- ...productInfo,
138
- orderModifiersSets: removedOrderModifierIndex,
139
- quantity: removedOrderModifierIndex.reduce(
140
- (acc, product) => product.productQuantity + acc,
141
- 0,
142
- ),
143
- }
144
- onChange(productInfoWithRemove)
145
- }
146
-
147
- const editOrderModifierSet = (orderModifierIndex: number) => {
148
- const editOrderModifierIndex = (
149
- productInfo as FormOrderItem
150
- ).orderModifiersSets.find((_, index) => {
151
- setModifierIndex(index)
152
- return index === orderModifierIndex
153
- })
154
- setEditOrderModifierIndex(editOrderModifierIndex)
155
- }
156
-
157
- const onChangeWithModifierSets = (value: FormOrderItem) => {
158
- const editedOrderModifiersSets = (
159
- productInfo as FormOrderItem
160
- ).orderModifiersSets
161
- ?.filter((_, index) => index !== modifierIndex)
162
- .concat(value.orderModifiersSets)
163
-
164
- onChange({
165
- ...value,
166
- orderModifiersSets: editedOrderModifiersSets,
167
- quantity: editedOrderModifiersSets.reduce(
168
- (acc, product) => product.productQuantity + acc,
169
- 0,
170
- ),
171
- })
172
- setEditOrderModifierIndex(undefined)
173
- }
174
-
175
- return (
176
- <div
177
- id={String(product.id)}
178
- className='iframe-event__category-product'
179
- >
180
- <div className={clsx('iframe-event__product', invalid && 'error')}>
181
- <TicketDescription
182
- title={product.name}
183
- description={product.description}
184
- className={clsx('iframe-event__product-description')}
185
- images={product.images}
186
- isRequired={product.isRequired}
187
- canExpand={canExpandDescription}
188
- />
121
+ }) => (
122
+ <div id={String(product.id)} className='iframe-event__category-product'>
123
+ <div className={clsx('iframe-event__product', invalid && 'error')}>
124
+ <TicketDescription
125
+ title={product.name}
126
+ description={product.description}
127
+ className={clsx('iframe-event__product-description')}
128
+ images={product.images}
129
+ isRequired={product.isRequired}
130
+ canExpand={canExpandDescription}
131
+ />
132
+ </div>
133
+ <div className='iframe-event__product-price-wrapper'>
134
+ <span className='product-price'>
135
+ {formatNumber(product.price, {
136
+ style: 'currency',
137
+ currency: Config.Currency.GBP,
138
+ })}
139
+ </span>
140
+ <ProductQuantityInput
141
+ onChange={onChange}
142
+ productInfo={productInfo}
143
+ refCallback={ref}
144
+ clearErrors={clearErrors}
145
+ product={{
146
+ ...product,
147
+ isSoldOut: product?.isSoldOut || checkIfSoldOutProduct(),
148
+ }}
149
+ category={category}
150
+ invalid={invalid}
151
+ />
152
+ </div>
153
+ {hasDeposits && !category?.remainderExpireAfter && (
154
+ <div className='mt-4'>
155
+ {t('Design:payNowAndUponArrival', {
156
+ deposit: formatNumber(product?.deposit, {
157
+ style: 'currency',
158
+ currency: Config.Currency.GBP,
159
+ }),
160
+ remainder: formatNumber(product.price - product?.deposit, {
161
+ style: 'currency',
162
+ currency: Config.Currency.GBP,
163
+ }),
164
+ })}
189
165
  </div>
190
- <div className='iframe-event__product-price-wrapper'>
191
- <span className='product-price'>
192
- {formatNumber(product.price, {
166
+ )}
167
+
168
+ {hasDeposits && category?.remainderExpireAfter > 0 && (
169
+ <div className='mt-4'>
170
+ {t('Design:payNowAndReminderDays', {
171
+ deposit: formatNumber(product?.deposit, {
172
+ style: 'currency',
173
+ currency: Config.Currency.GBP,
174
+ }),
175
+ remainder: formatNumber(product.price - product?.deposit, {
193
176
  style: 'currency',
194
177
  currency: Config.Currency.GBP,
195
- })}
196
- </span>
197
- <ProductQuantityInput
198
- onChange={onChange}
199
- productInfo={productInfo}
200
- refCallback={ref}
201
- clearErrors={clearErrors}
202
- product={{
203
- ...product,
204
- isSoldOut: product?.isSoldOut || checkIfSoldOutProduct(),
205
- }}
206
- category={category}
207
- invalid={invalid}
208
- />
178
+ }),
179
+ days: category?.remainderExpireAfter,
180
+ })}
209
181
  </div>
210
- {hasDeposits && !category?.remainderExpireAfter && (
211
- <div className='mt-4'>
212
- {t('Design:payNowAndUponArrival', {
213
- deposit: formatNumber(product?.deposit, {
214
- style: 'currency',
215
- currency: Config.Currency.GBP,
216
- }),
217
- remainder: formatNumber(product.price - product?.deposit, {
218
- style: 'currency',
219
- currency: Config.Currency.GBP,
220
- }),
221
- })}
222
- </div>
223
- )}
224
- {(productInfo as FormOrderItem).orderModifiersSets?.length > 0 && (
225
- <>
226
- {(productInfo as FormOrderItem).orderModifiersSets.map(
227
- (modifier, index) => (
228
- <ProductWithModifier
229
- key={modifier.productQuantity.toString()}
230
- modifier={modifier}
231
- modifierKey={index}
232
- editOrderModifierSet={editOrderModifierSet}
233
- deleteOrderModifier={deleteOrderModifier}
234
- />
235
- ),
236
- )}
237
- </>
238
- )}
239
- {hasDeposits && category?.remainderExpireAfter > 0 && (
240
- <div className='mt-4'>
241
- {t('Design:payNowAndReminderDays', {
242
- deposit: formatNumber(product?.deposit, {
243
- style: 'currency',
244
- currency: Config.Currency.GBP,
245
- }),
246
- remainder: formatNumber(product.price - product?.deposit, {
247
- style: 'currency',
248
- currency: Config.Currency.GBP,
249
- }),
250
- days: category?.remainderExpireAfter,
251
- })}
252
- </div>
253
- )}
254
- {invalid && (
255
- <div className='d-flex mt-3 w-100'>
256
- <p className='iframe-event__message-error'>
257
- {HookFormService.hasError(error, 'required') &&
258
- t('Design:pleaseSelectAtLeastFrom', {
259
- min: 1,
260
- type: 'item',
261
- from: 'this category',
262
- })}
263
- {HookFormService.hasError(error, 'validate') && error.message}
264
- </p>
265
- </div>
266
- )}
267
- <ProductWithModifierSetModal
268
- show={!!editOrderModifierIndex}
269
- onHide={() => setEditOrderModifierIndex(undefined)}
270
- editOrderModifier={editOrderModifierIndex}
271
- onChange={onChangeWithModifierSets}
272
- product={product}
273
- category={category}
274
- />
275
- </div>
276
- )
277
- }}
182
+ )}
183
+ {invalid && (
184
+ <div className='d-flex mt-3 w-100'>
185
+ <p className='iframe-event__message-error'>
186
+ {HookFormService.hasError(error, 'required') &&
187
+ t('Design:pleaseSelectAtLeastFrom', {
188
+ min: 1,
189
+ type: 'item',
190
+ from: 'this category',
191
+ })}
192
+ {HookFormService.hasError(error, 'validate') && error.message}
193
+ </p>
194
+ </div>
195
+ )}
196
+ </div>
197
+ )}
278
198
  />
279
199
  )
280
200
  }
@@ -89,7 +89,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
89
89
  <FormControl
90
90
  type='number'
91
91
  onChange={(e) => handleChangeValue(Number(e.target.value))}
92
- onWheel={(event) => event.currentTarget.blur()}
93
92
  value={value}
94
93
  min={0}
95
94
  max={max}
@@ -102,14 +101,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
102
101
  <button
103
102
  type='button'
104
103
  onClick={handleArrowUpClick}
105
- onWheel={(event) => event.currentTarget.blur()}
106
- onFocus={(event) =>
107
- event.target.addEventListener(
108
- 'wheel',
109
- (event) => event.preventDefault(),
110
- { passive: false },
111
- )
112
- }
113
104
  className={`payment-number-input__btn-up ${
114
105
  plusButtonGreyedOut && 'disabled-number-input-button'
115
106
  }`}
@@ -1,19 +1,14 @@
1
- import { useState } from 'react'
2
1
  import clsx from 'clsx'
3
2
  import { Button } from 'react-bootstrap'
4
- import { isEmpty } from 'lodash'
5
3
  import { useTranslation } from 'react-i18next'
6
4
  import { FieldValues, RefCallBack, UseFormClearErrors } from 'react-hook-form'
7
5
  import {
8
6
  Product,
9
7
  ProductCategory,
10
8
  } from '@licklist/plugins/dist/types/context/sale/menuSteps'
11
- import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
12
9
  import { NumberInput } from '../NumberInput'
13
- // eslint-disable-next-line
14
- import { ProductWithModifierSetModal } from '../../../../../ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal'
15
10
 
16
- export interface FormOrderItem {
11
+ interface FormOrderItem {
17
12
  id: number
18
13
  name: string
19
14
  price: number
@@ -22,7 +17,6 @@ export interface FormOrderItem {
22
17
  deposit?: number | null
23
18
  quantity: number
24
19
  capacity?: number | null
25
- orderModifiersSets?: OrderModifierByProduct[] | null
26
20
  }
27
21
 
28
22
  interface ProductQuantityInputProps {
@@ -46,7 +40,6 @@ export const ProductQuantityInput = ({
46
40
  invalid,
47
41
  }: ProductQuantityInputProps) => {
48
42
  const { t } = useTranslation('Design')
49
- const [open, handleOpenModal] = useState(false)
50
43
 
51
44
  const onChange = (quantity: number | null) => {
52
45
  _onChange({
@@ -55,35 +48,12 @@ export const ProductQuantityInput = ({
55
48
  deposit: product?.deposit,
56
49
  hasDeposit: category.allowDeposits && product?.deposit < product.price,
57
50
  price: product.price,
58
- orderModifiersSets: [],
59
51
  productCategoryId: category.id,
60
52
  quantity,
61
53
  capacity: product?.capacity,
62
54
  })
63
55
  }
64
56
 
65
- const onChangeWithModifierSets = (productOrder: FormOrderItem) => {
66
- if (isEmpty(productInfo)) {
67
- _onChange(productOrder)
68
- return handleOpenModal(false)
69
- }
70
-
71
- _onChange({
72
- id: productInfo.id,
73
- name: productInfo.name,
74
- deposit: productInfo?.deposit,
75
- hasDeposit: productInfo.hasDeposit,
76
- price: productInfo.price,
77
- orderModifiersSets: productInfo.orderModifiersSets?.concat(
78
- productOrder.orderModifiersSets,
79
- ),
80
- productCategoryId: category.id,
81
- quantity: productInfo.quantity + productOrder.quantity,
82
- capacity: productInfo?.capacity,
83
- })
84
- return handleOpenModal(false)
85
- }
86
-
87
57
  if (product.isSoldOut) {
88
58
  return (
89
59
  <div className='iframe-event__sold-out-wrapper'>
@@ -92,33 +62,6 @@ export const ProductQuantityInput = ({
92
62
  )
93
63
  }
94
64
 
95
- if ((product as Product).modifiersSet.length) {
96
- return (
97
- <>
98
- <Button
99
- ref={refCallback}
100
- disabled={product.isSoldOut}
101
- className={clsx(
102
- `iframe-event__${
103
- productInfo?.quantity ? 'unselect-product' : 'select-product'
104
- }`,
105
- invalid && 'error',
106
- )}
107
- onClick={() => handleOpenModal(true)}
108
- >
109
- +
110
- </Button>
111
- <ProductWithModifierSetModal
112
- show={open}
113
- onHide={() => handleOpenModal(false)}
114
- onChange={onChangeWithModifierSets}
115
- product={product}
116
- category={category}
117
- />
118
- </>
119
- )
120
- }
121
-
122
65
  if (product?.maxAmount === 1) {
123
66
  return (
124
67
  <Button
@@ -69,7 +69,8 @@ export const useResizePageBody = () => {
69
69
  rightBlockHeight -
70
70
  CALENDAR_WRAPPER_HEIGHT,
71
71
  }
72
- }
72
+
73
+ }
73
74
  return {
74
75
  maxHeight:
75
76
  height -
@@ -1,9 +1,8 @@
1
1
  import { useMemo } from 'react'
2
- import { uniqueId, flatMap, flatten, map } from 'lodash'
2
+ import { uniqueId } from 'lodash'
3
3
  import { useIntl } from 'react-intl'
4
4
  import { useTranslation } from 'react-i18next'
5
5
  import { Product } from '@licklist/core/dist/DataMapper/Product/ProductDataMapper'
6
- import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper'
7
6
  import {
8
7
  PAYMENT_TYPE_VAT,
9
8
  PAYMENT_TYPE_FEE,
@@ -13,10 +12,6 @@ import { StaticTableData } from '../../../../table'
13
12
  import { getProductQuantityAndPrice, getTotalSumByCategory } from '../utils'
14
13
  import { OrderItemsTableProps, SummaryItem } from '../types'
15
14
  import { getOrderSummaryItems } from '../utils/paymentSummary'
16
- import { Order } from '@licklist/core/dist/DataMapper'
17
- import { OrderPayment } from '@licklist/core/dist/DataMapper/Order/OrderPaymentDataMapper'
18
- import { OrderProduct } from '@licklist/core/dist/DataMapper/Order/OrderProductDataMapper'
19
- import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
20
15
 
21
16
  const CURRENCY_DEFAULT = 'GBP'
22
17
  export const PAYMENT_TYPE_TRANSLATE_KEYS = {
@@ -55,67 +50,19 @@ export const useTableData = ({
55
50
  ),
56
51
  })
57
52
 
58
- const reworkProductStructure = (order: OrderProduct) =>
59
- order
60
- ? flatMap(order, (item) => {
61
- if (!item || !Array.isArray(item)) return []
62
- return item.map((modGroup, idx) => ({
63
- deletedAt: order.deletedAt ?? null,
64
- id: `${order.id}-${idx + 1}`, // Ensuring uniqueness with string concatenation
65
- orderId: order.orderId ?? null,
66
- price: order.price ?? 0,
67
- productId: order.productId ?? '',
68
- quantity: modGroup.productQuantity ?? 1,
69
- deposit: order.deposit ?? 0,
70
- orderProductModifiers: modGroup.modifiers.map((mod) => ({
71
- modifierId: mod.modifierId ?? '',
72
- price: mod.price ?? 0,
73
- productId: mod.productId ?? '',
74
- quantity: mod.quantity ?? 1,
75
- modifierSetId: mod.modifierSetId ?? '',
76
- modifier: mod.modifier ?? null,
77
- })),
78
- }))
79
- })
80
- : []
81
-
82
- const renderProductItem = ({
83
- product,
84
- productsForCategory,
85
- }: {
86
- product: OrderProduct
87
- productsForCategory: Product[]
88
- }) => {
89
- if (product.quantity === 0) {
90
- return null
91
- }
92
-
93
- const name =
94
- productsForCategory.find((item) => item.id === product.productId)?.name || ''
95
-
96
- return {
97
- key: product.id,
98
- name,
99
- quantity: (
100
- <div className='quantity'>
101
- <div className='multiplier'>x</div>
102
- {product.quantity}
103
- </div>
104
- ),
105
- price: formatPrice(product.price),
106
- modifier: product?.orderProductModifiers?.map(renderModifierItem) || [],
107
- }
108
- }
53
+ const renderProductItem = (product: Product) => {
54
+ const { quantity, price } = getProductQuantityAndPrice(
55
+ order.orderProducts,
56
+ product,
57
+ )
109
58
 
110
- const renderModifierItem = (orderModifier: OrderModifier) => {
111
- const { quantity, modifier, modifierId, price } = orderModifier
112
59
  if (quantity === 0) {
113
60
  return null
114
61
  }
115
62
 
116
63
  return {
117
- key: modifierId,
118
- name: ` - ${modifier?.name || ''}`,
64
+ key: product.id,
65
+ name: product.name,
119
66
  quantity: (
120
67
  <div className='quantity'>
121
68
  <div className='multiplier'>x</div>
@@ -133,33 +80,15 @@ export const useTableData = ({
133
80
 
134
81
  return productCategories.reduce(
135
82
  (previousValues: StaticTableData[], categoryId) => {
136
- const productsForCategory = order?.products.filter(
83
+ const products = order.products.filter(
137
84
  (product) => product.productCategoryId === categoryId,
138
85
  )
139
86
 
140
- const products = order.orderProducts.filter((el) =>
141
- productsForCategory
142
- .map((product) => product.id)
143
- .includes(el.productId),
144
- )
145
-
146
87
  if (!products.length) {
147
88
  return previousValues
148
89
  }
149
- const productsWithReworkedModifier = products.map((product) => {
150
- if (!product.orderProductModifiers.length) return product
151
- return reworkProductStructure(product)
152
- })
153
-
154
- const filteredProducts = flatten(productsWithReworkedModifier).map(
155
- (product) =>
156
- renderProductItem({ product , productsForCategory }),
157
- )
158
-
159
- const productWithModifier = flatMap(filteredProducts, (item) => [
160
- item,
161
- ...item.modifier,
162
- ])
90
+
91
+ const filteredProducts = products.map(renderProductItem).filter(Boolean)
163
92
 
164
93
  if (!filteredProducts.length) {
165
94
  return previousValues
@@ -167,8 +96,8 @@ export const useTableData = ({
167
96
 
168
97
  return [
169
98
  ...previousValues,
170
- renderCategoryItem(productsForCategory),
171
- ...productWithModifier,
99
+ renderCategoryItem(products),
100
+ ...filteredProducts,
172
101
  ]
173
102
  },
174
103
  [],
@@ -204,5 +133,6 @@ export const useTableData = ({
204
133
  // eslint-disable-next-line react-hooks/exhaustive-deps
205
134
  [order, externalDiscount, isPaymentProcessed],
206
135
  )
136
+
207
137
  return data
208
138
  }
@@ -6,7 +6,6 @@ import { Product } from '@licklist/core/dist/DataMapper/Product/ProductDataMappe
6
6
  import { PAYMENT_TYPE_DISCOUNT } from '@licklist/core/dist/DataMapper/Order/PaymentDataMapper'
7
7
  import { PaymentDetail } from '@licklist/core/dist/DataMapper/Order/PaymentDetailDataMapper'
8
8
  import { PAYMENT_TYPE_TRANSLATE_KEYS } from '../hooks/useTableData'
9
- import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper'
10
9
 
11
10
  const TRANSLATE_KEYS = {
12
11
  totalAmount: 'totalPaid',
@@ -29,7 +28,6 @@ export const calculateTotalPrice = (
29
28
  order: Order,
30
29
  externalPaymentDetails?: ExternalPaymnetDetail[],
31
30
  ) => {
32
-
33
31
  const totalPrice =
34
32
  order?.orderProducts?.reduce(
35
33
  (total: number, product) =>
@@ -127,26 +125,5 @@ export const getTotalSumByCategory = (
127
125
  product,
128
126
  )
129
127
 
130
- const modifierFromProduct = orderProducts.find(
131
- (orderProduct) => orderProduct.productId === product.id,
132
- )?.orderProductModifiers
133
- if (modifierFromProduct) {
134
- const modifierPrice = modifierFromProduct.reduce(
135
- (prevSum: number, { modifiers }) => {
136
- const modifiersPrices = modifiers.reduce(
137
- (prevSumModifier: number, modifier: OrderModifier) =>
138
- prevSumModifier + modifier.price * modifier.quantity,
139
- 0,
140
- )
141
-
142
- return prevSum + modifiersPrices
143
- },
144
- 0,
145
- )
146
- const priceWithModifier = price + modifierPrice
147
-
148
- return prevSum + priceWithModifier * quantity
149
- }
150
-
151
128
  return prevSum + price * quantity
152
129
  }, 0)