@licklist/design 0.58.6-dev.8 → 0.58.6

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 (243) hide show
  1. package/bitbucket-pipelines.yml +8 -0
  2. package/dist/assets/iframe/calendar.svg +2 -2
  3. package/dist/assets/iframe/calendar.svg.js +1 -1
  4. package/dist/assets/iframe/ticket.svg +2 -2
  5. package/dist/assets/iframe/ticket.svg.js +1 -1
  6. package/dist/calendar/Calendar.d.ts +1 -1
  7. package/dist/calendar/Calendar.d.ts.map +1 -1
  8. package/dist/calendar/Calendar.js +1 -1
  9. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
  10. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
  11. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  12. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  13. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  14. package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
  15. package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
  16. package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
  17. package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
  18. package/dist/iframe/event/event-venue-map/IframeEventVenueMap.js +1 -1
  19. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +2 -2
  20. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  21. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  22. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +2 -4
  23. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
  24. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  25. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
  26. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
  27. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js +1 -1
  28. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +2 -4
  29. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
  30. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  31. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -4
  32. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  33. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  34. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
  35. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  36. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  37. package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
  38. package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
  39. package/dist/iframe/page/components/PageBody/constants.js +1 -1
  40. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  41. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
  42. package/dist/iframe/payment/order-items-table/OrderItemsTable.js +1 -1
  43. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
  44. package/dist/iframe/payment/payment-form/PaymentForm.js +1 -1
  45. package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
  46. package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
  47. package/dist/iframe/payment/payment-page/PaymentTimer.js +1 -1
  48. package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +1 -1
  49. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  50. package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
  51. package/dist/index.js +1 -1
  52. package/dist/product-set/card/ProductSetCard.d.ts +1 -2
  53. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  54. package/dist/product-set/card/ProductSetCard.js +1 -1
  55. package/dist/product-set/control/ProductSetControl.d.ts +1 -2
  56. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  57. package/dist/product-set/control/ProductSetControl.js +1 -1
  58. package/dist/product-set/control/TutorialGifCard.d.ts +1 -2
  59. package/dist/product-set/control/TutorialGifCard.d.ts.map +1 -1
  60. package/dist/product-set/control/TutorialGifCard.js +1 -1
  61. package/dist/product-set/form/ProductCategoriesControl.d.ts +1 -2
  62. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  63. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  64. package/dist/product-set/form/ProductSetForm.d.ts +2 -7
  65. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  66. package/dist/product-set/form/ProductSetForm.js +1 -1
  67. package/dist/product-set/form/ProductsControl.d.ts +1 -2
  68. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  69. package/dist/product-set/form/ProductsControl.js +1 -1
  70. package/dist/product-set/form/StepsControl.d.ts +1 -2
  71. package/dist/product-set/form/StepsControl.d.ts.map +1 -1
  72. package/dist/product-set/form/StepsControl.js +1 -1
  73. package/dist/product-set/form/SubProductsControl.d.ts +1 -2
  74. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  75. package/dist/product-set/form/SubProductsControl.js +1 -1
  76. package/dist/product-set/form/VenueMapsControl.js +1 -1
  77. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts +1 -2
  78. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
  79. package/dist/product-set/hooks/useSortableTreeFunctions.js +1 -1
  80. package/dist/product-set/item/CreateProductSetItem.d.ts +1 -2
  81. package/dist/product-set/item/CreateProductSetItem.d.ts.map +1 -1
  82. package/dist/product-set/item/CreateProductSetItem.js +1 -1
  83. package/dist/product-set/product/ProductControl.d.ts +1 -3
  84. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  85. package/dist/product-set/product/ProductControl.js +1 -1
  86. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts +2 -4
  87. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
  88. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.js +1 -1
  89. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts +0 -1
  90. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  91. package/dist/product-set/product/quantity/ProductQuantityControl.js +1 -1
  92. package/dist/product-set/product-category/ProductCategoryControl.d.ts +1 -2
  93. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  94. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  95. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  96. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  97. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -2
  98. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  99. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  100. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  101. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  102. package/dist/sales/notes/NotesTableRow.js +1 -1
  103. package/dist/setting/dashboard/snippets/card/SnippetCard.js +1 -1
  104. package/dist/snippet/snippet-template/control/PropertyControl.d.ts +1 -3
  105. package/dist/snippet/snippet-template/control/PropertyControl.d.ts.map +1 -1
  106. package/dist/snippet/snippet-template/control/PropertyControl.js +1 -1
  107. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  108. package/dist/sortable-list/SortableList.d.ts +1 -2
  109. package/dist/sortable-list/SortableList.d.ts.map +1 -1
  110. package/dist/sortable-list/SortableList.js +1 -1
  111. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -3
  112. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  113. package/dist/sortable-tree/SortableTreeItem.js +1 -1
  114. package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
  115. package/dist/static/manual-date-picker/constants/index.d.ts +1 -4
  116. package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
  117. package/dist/static/manual-date-picker/constants/index.js +1 -1
  118. package/dist/static/manual-date-picker/utils/index.d.ts +0 -4
  119. package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
  120. package/dist/static/manual-date-picker/utils/index.js +1 -1
  121. package/dist/striped-static-table/StripedStaticTable.js +1 -1
  122. package/dist/styles/iframe-events/Card.scss +8 -24
  123. package/dist/styles/iframe-events/PoweredBy.scss +2 -2
  124. package/dist/styles/iframe-order-process/IframeOrderProcess.scss +20 -57
  125. package/dist/styles/iframe-page/Page.scss +0 -1
  126. package/dist/styles/iframe-page/PageBody.scss +12 -34
  127. package/dist/styles/iframe-page/PageHeader.scss +39 -41
  128. package/dist/styles/product-set/EditVenueMapSetModal.scss +1 -1
  129. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  130. package/dist/styles/sales/BookingResults.scss +1 -1
  131. package/dist/venue-map-sets/form/components/VenueMapImageControl.js +1 -1
  132. package/jest.config.js +29 -0
  133. package/package.json +35 -10
  134. package/src/assets/iframe/calendar.svg +2 -2
  135. package/src/assets/iframe/ticket.svg +2 -2
  136. package/src/calendar/Calendar.stories.tsx +0 -23
  137. package/src/calendar/Calendar.tsx +5 -5
  138. package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
  139. package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
  140. package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
  141. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +0 -9
  142. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +7 -58
  143. package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +0 -8
  144. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
  145. package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +10 -63
  146. package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -4
  147. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
  148. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
  149. package/src/iframe/page/components/PageBody/constants.ts +0 -2
  150. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +0 -10
  151. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
  152. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +6 -546
  153. package/src/iframe/payment/payment-page/PaymentPage.tsx +29 -38
  154. package/src/iframe/ryft/RyftPaymentForm.tsx +5 -11
  155. package/src/product-set/card/ProductSetCard.tsx +1 -12
  156. package/src/product-set/control/ProductSetControl.tsx +24 -46
  157. package/src/product-set/control/TutorialGifCard.tsx +3 -11
  158. package/src/product-set/form/ProductCategoriesControl.tsx +1 -12
  159. package/src/product-set/form/ProductSetForm.tsx +1 -10
  160. package/src/product-set/form/ProductsControl.tsx +0 -10
  161. package/src/product-set/form/StepsControl.tsx +2 -8
  162. package/src/product-set/form/SubProductsControl.tsx +0 -3
  163. package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -6
  164. package/src/product-set/item/CreateProductSetItem.tsx +0 -3
  165. package/src/product-set/product/ProductControl.tsx +15 -48
  166. package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -8
  167. package/src/product-set/product/quantity/ProductQuantityControl.tsx +3 -4
  168. package/src/product-set/product-category/ProductCategoryControl.tsx +8 -12
  169. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
  170. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -4
  171. package/src/sales/booking/results/BookingResults.stories.tsx +2 -3
  172. package/src/sales/booking/results/components/ResultCard.tsx +5 -2
  173. package/src/snippet/snippet-template/control/PropertyControl.tsx +2 -6
  174. package/src/sortable-list/SortableList.tsx +0 -3
  175. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  176. package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
  177. package/src/static/manual-date-picker/constants/index.ts +2 -6
  178. package/src/static/manual-date-picker/utils/index.ts +0 -11
  179. package/src/static/switch/BooleanSwitch.tsx +1 -1
  180. package/src/styles/iframe-events/Card.scss +8 -24
  181. package/src/styles/iframe-events/PoweredBy.scss +2 -2
  182. package/src/styles/iframe-order-process/IframeOrderProcess.scss +20 -57
  183. package/src/styles/iframe-page/Page.scss +0 -1
  184. package/src/styles/iframe-page/PageBody.scss +12 -34
  185. package/src/styles/iframe-page/PageHeader.scss +39 -41
  186. package/src/styles/product-set/EditVenueMapSetModal.scss +1 -1
  187. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  188. package/src/styles/sales/BookingResults.scss +1 -1
  189. package/tests/Auth/Authorizer.test.tsx +194 -0
  190. package/tests/Auth/Layout/UserNavDropDown.test.tsx +43 -0
  191. package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +33 -0
  192. package/tests/Auth/Login/LoginComponent.test.tsx +246 -0
  193. package/tests/Auth/Login/LoginFormComponent.test.tsx +182 -0
  194. package/tests/Auth/Register/RegisterComponent.test.tsx +285 -0
  195. package/tests/Auth/Register/RegisterFormComponent.test.tsx +170 -0
  196. package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +130 -0
  197. package/tests/Auth/Social/SocialCallbackComponent.test.tsx +133 -0
  198. package/tests/Auth/Social/SocialFormComponent.test.tsx +118 -0
  199. package/tests/FileUpload/FileUpload.test.tsx +42 -0
  200. package/tests/Notification/EmailTemplate.test.tsx +82 -0
  201. package/tests/ProductSet/ProductSetPopover.test.tsx +40 -0
  202. package/tests/Report/Report.test.tsx +48 -0
  203. package/tests/Sales/Coupon.test.tsx +51 -0
  204. package/tests/Sales/SalesAndVIews.test.tsx +63 -0
  205. package/tests/SnippetTemplates/SnippetTemplates.test.tsx +56 -0
  206. package/tests/Table/FilterHelperComponent.test.tsx +88 -0
  207. package/tests/Table/PaginationHelperComponent.test.tsx +109 -0
  208. package/tests/Table/PerPageHelperComponent.test.tsx +34 -0
  209. package/tests/Table/TableHelperComponent.test.tsx +295 -0
  210. package/tests/TipTapEditor/TipTapEditor.test.tsx +28 -0
  211. package/tests/__mock__/hooks/useAuthApi.ts +13 -0
  212. package/tests/__mock__/hooks/useAuthMock.ts +13 -0
  213. package/tests/__mock__/hooks/useFormMock.ts +27 -0
  214. package/tests/__mock__/hooks/useNotificationMock.ts +13 -0
  215. package/tests/__mock__/hooks/useQueryMock.ts +16 -0
  216. package/tests/__mock__/hooks/useSocialApiMock.ts +20 -0
  217. package/tests/__mock__/hooks/useTranslationMock.ts +17 -0
  218. package/tests/__mock__/hooks/useUserApiMock.ts +18 -0
  219. package/tests/__mock__/hooks/useUserMock.ts +13 -0
  220. package/tests/__mock__/styleMock.js +1 -0
  221. package/tests/__mock__/windowMock.ts +5 -0
  222. package/tests/packages/react-query.tsx +28 -0
  223. package/tests/setupTests.ts +10 -0
  224. package/dist/iframe/ryft/utils/ryft-form.d.ts +0 -5
  225. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +0 -1
  226. package/dist/iframe/ryft/utils/ryft-form.js +0 -1
  227. package/dist/product-set/control/DateInput.d.ts +0 -17
  228. package/dist/product-set/control/DateInput.d.ts.map +0 -1
  229. package/dist/product-set/control/DateInput.js +0 -1
  230. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts +0 -11
  231. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts.map +0 -1
  232. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.js +0 -1
  233. package/dist/recurring-date-picker-input/DatePickerInput.d.ts +0 -19
  234. package/dist/recurring-date-picker-input/DatePickerInput.d.ts.map +0 -1
  235. package/dist/recurring-date-picker-input/DatePickerInput.js +0 -1
  236. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts +0 -15
  237. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +0 -1
  238. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.js +0 -1
  239. package/src/iframe/ryft/utils/ryft-form.ts +0 -47
  240. package/src/product-set/control/DateInput.tsx +0 -313
  241. package/src/product-set/control/ProductSetRecurrenceOverridesControl.tsx +0 -63
  242. package/src/recurring-date-picker-input/DatePickerInput.tsx +0 -93
  243. package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +0 -136
@@ -7,12 +7,8 @@ import {
7
7
  QUANTITY_TYPE_LIST_DTO,
8
8
  QUANTITY_TYPE_RECHARGING,
9
9
  } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
10
- import {
11
- ProductType,
12
- PRODUCT_DEfAULT_COLORS,
13
- } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
10
+ import { ProductType } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
14
11
  import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
15
- import clsx from "clsx";
16
12
  import {
17
13
  FieldNamePrefixPath,
18
14
  FormValues,
@@ -39,7 +35,6 @@ import {
39
35
  } from "react-hook-form";
40
36
  import { useTranslation } from "react-i18next";
41
37
  import { useImages } from "@licklist/plugins/dist/hooks/Media/useImages";
42
-
43
38
  import {
44
39
  Image,
45
40
  IMAGE_TYPE_IMAGE,
@@ -64,7 +59,6 @@ import {
64
59
  ProductQuantityControl,
65
60
  ProductQuantityRechargingControl,
66
61
  } from "./quantity";
67
- import { PropertyControl } from "../../snippet";
68
62
  import { TipTapEditor } from "../../tiptap-editor";
69
63
  import { IsDeletableEvent } from "../types";
70
64
  import { FixedDurationOptions } from "./fixed-duration-fields";
@@ -104,7 +98,6 @@ export interface ProductControlValues
104
98
  offset: number;
105
99
  serviceTime: number;
106
100
  sort: number | null;
107
- color?: string;
108
101
  }
109
102
 
110
103
  export interface ProductControlProps<T>
@@ -120,7 +113,6 @@ export interface ProductControlProps<T>
120
113
  productName: string;
121
114
  hasTicket?: boolean;
122
115
  categoryType?: CategoryType;
123
- isOverrides?: boolean;
124
116
  zoneDuration?: number;
125
117
  }
126
118
 
@@ -136,7 +128,6 @@ export function ProductControl<T extends FormValues>({
136
128
  hasTicket,
137
129
  categoryType,
138
130
  zoneDuration,
139
- isOverrides = false,
140
131
  }: ProductControlProps<T>) {
141
132
  const {
142
133
  register,
@@ -150,7 +141,7 @@ export function ProductControl<T extends FormValues>({
150
141
  } = useFormContext<T>();
151
142
 
152
143
  const { setLoading } = useContext(ProductSetLoadingContext);
153
- const { t } = useTranslation(["Design", "Validation", "ProductSet"]);
144
+ const { t } = useTranslation(["Design", "Validation"]);
154
145
  const [expanded, setExpanded] = useState(false);
155
146
  const [initialImages, setInitialImages] = useState<Image[] | null>(null);
156
147
  // @TODO: After checking "isUnlimited" checkbox need to reset field totalQuantity
@@ -269,7 +260,7 @@ export function ProductControl<T extends FormValues>({
269
260
  `${fieldNamePrefix}.name` as Path<T>,
270
261
  errors
271
262
  )}
272
- disabled={isLoading || isOverrides}
263
+ disabled={isLoading}
273
264
  placeholder={t("name")}
274
265
  />
275
266
  <Form.Control.Feedback type="invalid">
@@ -289,7 +280,7 @@ export function ProductControl<T extends FormValues>({
289
280
  viewMode={false}
290
281
  onUpdate={onChange}
291
282
  content={value as string}
292
- disabled={isLoading || isOverrides}
283
+ disabled={isLoading}
293
284
  />
294
285
  )}
295
286
  rules={{
@@ -335,7 +326,6 @@ export function ProductControl<T extends FormValues>({
335
326
  <ProductQuantityControl<T>
336
327
  isLoading={isLoading}
337
328
  fieldNamePrefix={fieldNamePrefix}
338
- isOverrides={isOverrides}
339
329
  onFocus={onFocus}
340
330
  />
341
331
 
@@ -380,7 +370,7 @@ export function ProductControl<T extends FormValues>({
380
370
  `${fieldNamePrefix}.quantitySelector` as Path<T>,
381
371
  errors
382
372
  )}
383
- disabled={isLoading || hasTicket || isOverrides}
373
+ disabled={isLoading || hasTicket}
384
374
  >
385
375
  {quantitySelectorList.map((selector) => (
386
376
  <option value={selector.id} key={selector.id}>
@@ -395,14 +385,6 @@ export function ProductControl<T extends FormValues>({
395
385
  )}
396
386
  </Form.Control.Feedback>
397
387
  </Form.Group>
398
-
399
- <PropertyControl<T>
400
- item={`${fieldNamePrefix}.color` as Path<T>}
401
- label={t("ProductSet:selectColor")}
402
- isDisabled={isOverrides}
403
- isRequired={false}
404
- defaultColors={PRODUCT_DEfAULT_COLORS}
405
- />
406
388
  </Col>
407
389
  </Row>
408
390
 
@@ -410,14 +392,13 @@ export function ProductControl<T extends FormValues>({
410
392
  <Row className="align-items-start duration-capacity-container">
411
393
  <ProductDurationControl
412
394
  fieldNamePrefix={fieldNamePrefix}
413
- disabled={disabledDuration || isOverrides}
395
+ disabled={disabledDuration}
414
396
  />
415
397
 
416
398
  <Col lg={4} md={4}>
417
399
  <FormNumberInput
418
400
  fieldName={`${fieldNamePrefix}.capacity`}
419
401
  label={t("capacity")}
420
- disabled={isOverrides}
421
402
  rules={{
422
403
  min: {
423
404
  value: 0,
@@ -445,7 +426,6 @@ export function ProductControl<T extends FormValues>({
445
426
  fieldName={`${fieldNamePrefix}.capacity`}
446
427
  label={t("capacity")}
447
428
  onChange={onChangeGameCapacity}
448
- disabled={isOverrides}
449
429
  rules={{
450
430
  min: {
451
431
  value: 0,
@@ -461,7 +441,7 @@ export function ProductControl<T extends FormValues>({
461
441
  <FormNumberInput
462
442
  fieldName={`${fieldNamePrefix}.duration`}
463
443
  label={t("durationMinutes")}
464
- disabled={disabledDuration || isOverrides}
444
+ disabled={disabledDuration}
465
445
  rules={{
466
446
  min: {
467
447
  value: 0,
@@ -507,7 +487,7 @@ export function ProductControl<T extends FormValues>({
507
487
  `${fieldNamePrefix}.termsAndConditions` as Path<T>,
508
488
  errors
509
489
  )}
510
- disabled={isLoading || isOverrides}
490
+ disabled={isLoading}
511
491
  name={name}
512
492
  />
513
493
  )}
@@ -524,14 +504,7 @@ export function ProductControl<T extends FormValues>({
524
504
  </Form.Group>
525
505
  </Col>
526
506
 
527
- <Col
528
- lg={4}
529
- md={4}
530
- className={clsx(
531
- "licklist-file-upload-wrapper",
532
- isOverrides && "opacity-50"
533
- )}
534
- >
507
+ <Col lg={4} md={4} className="licklist-file-upload-wrapper">
535
508
  <FileUpload
536
509
  onFilesChange={onFilesChange}
537
510
  allowedExtensions={["jpeg", "jpg", "png"]}
@@ -540,7 +513,6 @@ export function ProductControl<T extends FormValues>({
540
513
  onFileRemove={onImageRemove}
541
514
  defaultFiles={images}
542
515
  isLoading={isImageUploading}
543
- disabled={isOverrides}
544
516
  withIcon
545
517
  title={t("addImage")}
546
518
  />
@@ -561,7 +533,7 @@ export function ProductControl<T extends FormValues>({
561
533
  name={name}
562
534
  value={Boolean(value)}
563
535
  onChange={onChange}
564
- disabled={isLoading || isOverrides}
536
+ disabled={isLoading}
565
537
  />
566
538
  );
567
539
  }}
@@ -596,7 +568,7 @@ export function ProductControl<T extends FormValues>({
596
568
  custom
597
569
  type="checkbox"
598
570
  name={advancedId}
599
- disabled={isLoading || isOverrides}
571
+ disabled={isLoading}
600
572
  >
601
573
  <Form.Check.Input
602
574
  checked={expanded}
@@ -623,7 +595,7 @@ export function ProductControl<T extends FormValues>({
623
595
  name={name}
624
596
  value={Boolean(value)}
625
597
  onChange={onChange}
626
- disabled={isLoading || isOverrides}
598
+ disabled={isLoading}
627
599
  />
628
600
  )}
629
601
  control={control}
@@ -643,7 +615,7 @@ export function ProductControl<T extends FormValues>({
643
615
  name={name}
644
616
  value={Boolean(value)}
645
617
  onChange={onChange}
646
- disabled={isLoading || isOverrides}
618
+ disabled={isLoading}
647
619
  />
648
620
  )}
649
621
  control={control}
@@ -652,12 +624,7 @@ export function ProductControl<T extends FormValues>({
652
624
  </Form.Group>
653
625
  {[CATEGORY_TYPE_GAME, CATEGORY_TYPE_FIXED_DURATION].includes(
654
626
  categoryType
655
- ) && (
656
- <FixedDurationOptions
657
- fieldNamePrefix={fieldNamePrefix}
658
- isOverrides={isOverrides}
659
- />
660
- )}
627
+ ) && <FixedDurationOptions fieldNamePrefix={fieldNamePrefix} />}
661
628
  <Form.Group
662
629
  controlId={minSpendId}
663
630
  className="advanced-switch-container"
@@ -667,7 +634,7 @@ export function ProductControl<T extends FormValues>({
667
634
  isRequired={false}
668
635
  isMoreThanZero
669
636
  allowDeposits={false}
670
- isLoading={isLoading || isOverrides}
637
+ isLoading={isLoading}
671
638
  fieldNamePrefix={`${fieldNamePrefix}.minSpend` as Path<T>}
672
639
  />
673
640
  </Form.Group>
@@ -5,13 +5,10 @@ import { FieldNamePrefixPath } from "@licklist/plugins/dist/types/services/Form/
5
5
  import { useWatch } from "react-hook-form";
6
6
  import { FormNumberInput } from "../../../static";
7
7
 
8
- interface FixedDurationOptionsProps<T> extends FieldNamePrefixPath<T> {
9
- isOverrides?: boolean;
10
- }
8
+ type FixedDurationOptionsProps<T> = FieldNamePrefixPath<T>;
11
9
 
12
10
  export const FixedDurationOptions = <T,>({
13
11
  fieldNamePrefix,
14
- isOverrides,
15
12
  }: FixedDurationOptionsProps<T>) => {
16
13
  const { t } = useTranslation("Design");
17
14
 
@@ -24,7 +21,6 @@ export const FixedDurationOptions = <T,>({
24
21
  <FormNumberInput
25
22
  fieldName={`${fieldNamePrefix}.subSlots`}
26
23
  label={t("subSlotsInMin")}
27
- disabled={isOverrides}
28
24
  />
29
25
  </Col>
30
26
 
@@ -32,7 +28,7 @@ export const FixedDurationOptions = <T,>({
32
28
  <FormNumberInput
33
29
  fieldName={`${fieldNamePrefix}.pause`}
34
30
  label={t("pauseInMin")}
35
- disabled={!subSlotsFieldValue || isOverrides}
31
+ disabled={!subSlotsFieldValue}
36
32
  />
37
33
  </Col>
38
34
  </Row>
@@ -42,7 +38,6 @@ export const FixedDurationOptions = <T,>({
42
38
  <FormNumberInput
43
39
  fieldName={`${fieldNamePrefix}.offset`}
44
40
  label={t("offsetInMin")}
45
- disabled={isOverrides}
46
41
  />
47
42
  </Col>
48
43
 
@@ -50,7 +45,6 @@ export const FixedDurationOptions = <T,>({
50
45
  <FormNumberInput
51
46
  fieldName={`${fieldNamePrefix}.serviceTime`}
52
47
  label={t("serviceTimeInMin")}
53
- disabled={isOverrides}
54
48
  />
55
49
  </Col>
56
50
  </Row>
@@ -22,13 +22,12 @@ export interface ProductQuantityControlValues extends FormValues {
22
22
  export interface ProductQuantityControlProps<T> extends FieldNamePrefixPath<T> {
23
23
  isLoading: boolean;
24
24
  onFocus?: (e: React.SyntheticEvent) => void;
25
- isOverrides?: boolean;
26
25
  }
27
26
 
28
27
  export function ProductQuantityControl<T extends FormValues>(
29
28
  props: ProductQuantityControlProps<T>
30
29
  ) {
31
- const { isLoading = false, fieldNamePrefix, onFocus, isOverrides } = props;
30
+ const { isLoading = false, fieldNamePrefix, onFocus } = props;
32
31
  const {
33
32
  control,
34
33
  formState: { errors },
@@ -91,7 +90,7 @@ export function ProductQuantityControl<T extends FormValues>(
91
90
  isInvalid={
92
91
  Number(minQuantityValue) > Number(maxQuantityValue)
93
92
  }
94
- disabled={isLoading || isOverrides}
93
+ disabled={isLoading}
95
94
  />
96
95
  )}
97
96
  control={control}
@@ -149,7 +148,7 @@ export function ProductQuantityControl<T extends FormValues>(
149
148
  isInvalid={
150
149
  Number(minQuantityValue) > Number(maxQuantityValue)
151
150
  }
152
- disabled={isLoading || isOverrides}
151
+ disabled={isLoading}
153
152
  />
154
153
  )}
155
154
  control={control}
@@ -49,7 +49,6 @@ export interface ProductCategoryControlProps extends IsDeletableEvent {
49
49
  onCategoryNameChange: (args: any) => void;
50
50
  stepIndex: number;
51
51
  productCategoryIndex: number;
52
- isOverride?: boolean;
53
52
  }
54
53
 
55
54
  const categoriesWithTickets = [
@@ -64,7 +63,6 @@ export function ProductCategoryControl({
64
63
  onCategoryNameChange,
65
64
  productCategoryIndex,
66
65
  stepIndex,
67
- isOverride = false,
68
66
  }: ProductCategoryControlProps) {
69
67
  const {
70
68
  control,
@@ -159,7 +157,7 @@ export function ProductCategoryControl({
159
157
  errors
160
158
  )}
161
159
  placeholder={t("name")}
162
- disabled={isLoading || isOverride}
160
+ disabled={isLoading}
163
161
  />
164
162
  <Form.Control.Feedback type="invalid">
165
163
  {HookFormService.getErrors<ProductSetFormValues>(
@@ -185,7 +183,7 @@ export function ProductCategoryControl({
185
183
  }))}
186
184
  value={field.value}
187
185
  onChange={field.onChange}
188
- disabled={isLoading || isOverride}
186
+ disabled={isLoading}
189
187
  />
190
188
  </Form.Group>
191
189
  )}
@@ -229,7 +227,7 @@ export function ProductCategoryControl({
229
227
  `${fieldNamePrefix}.minSubItems` as const,
230
228
  errors
231
229
  )}
232
- disabled={isLoading || isOverride}
230
+ disabled={isLoading}
233
231
  name={name}
234
232
  />
235
233
  )}
@@ -301,7 +299,7 @@ export function ProductCategoryControl({
301
299
  `${fieldNamePrefix}.maxSubItems` as const,
302
300
  errors
303
301
  )}
304
- disabled={isLoading || isOverride}
302
+ disabled={isLoading}
305
303
  />
306
304
  )}
307
305
  control={control}
@@ -339,7 +337,6 @@ export function ProductCategoryControl({
339
337
  render={({ field }) => (
340
338
  <Form.Control
341
339
  as="select"
342
- disabled={isOverride}
343
340
  isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
344
341
  `${fieldNamePrefix}.zoneId`,
345
342
  errors
@@ -387,7 +384,6 @@ export function ProductCategoryControl({
387
384
  <Form.Check.Input
388
385
  checked={expanded}
389
386
  onChange={handleExpand}
390
- disabled={isOverride}
391
387
  type="checkbox"
392
388
  />
393
389
  <Form.Check.Label>{t("showAdvancedOptions")}</Form.Check.Label>
@@ -456,7 +452,7 @@ export function ProductCategoryControl({
456
452
  name={name}
457
453
  value={Boolean(value)}
458
454
  onChange={onChange}
459
- disabled={isLoading || isOverride}
455
+ disabled={isLoading}
460
456
  />
461
457
  )}
462
458
  control={control}
@@ -480,7 +476,7 @@ export function ProductCategoryControl({
480
476
  name={name}
481
477
  value={Boolean(value)}
482
478
  onChange={onChange}
483
- disabled={isLoading || isOverride}
479
+ disabled={isLoading}
484
480
  />
485
481
  )}
486
482
  control={control}
@@ -503,7 +499,7 @@ export function ProductCategoryControl({
503
499
  name={name}
504
500
  value={Boolean(value)}
505
501
  onChange={onChange}
506
- disabled={isLoading || isOverride}
502
+ disabled={isLoading}
507
503
  />
508
504
  )}
509
505
  control={control}
@@ -531,7 +527,7 @@ export function ProductCategoryControl({
531
527
  `${fieldNamePrefix}.remainderExpireAfter` as const,
532
528
  errors
533
529
  )}
534
- disabled={isLoading || isOverride}
530
+ disabled={isLoading}
535
531
  name={name}
536
532
  />
537
533
  )}
@@ -1,7 +1,9 @@
1
+ import { DateTime } from "luxon";
1
2
  import React from "react";
2
3
  import { Col, Row } from "react-bootstrap";
3
4
  import { useFormContext } from "react-hook-form";
4
5
  import { useTranslation } from "react-i18next";
6
+ import { TIME_FORMAT } from "@licklist/core/dist/Config";
5
7
  import { WorkingHoursInputValues } from ".";
6
8
  import { useWeekdays } from "./utils";
7
9
 
@@ -23,10 +25,22 @@ export function WorkingHoursInputDescription() {
23
25
  <Row key={i}>
24
26
  <Col xs="auto">{weekdays[i]}:</Col>
25
27
  <Col>
26
- {t("timeInterval", {
27
- start: weekday.start,
28
- end: weekday.end,
29
- })}
28
+ {weekday?.end
29
+ ? weekday.start
30
+ ? t("timeInterval", {
31
+ start: DateTime.fromISO(weekday.start).toFormat(
32
+ TIME_FORMAT
33
+ ),
34
+ end: DateTime.fromISO(weekday.start).toFormat(
35
+ TIME_FORMAT
36
+ ),
37
+ })
38
+ : t("timeFrom", {
39
+ start: DateTime.fromISO(weekday.start).toFormat(
40
+ TIME_FORMAT
41
+ ),
42
+ })
43
+ : null}
30
44
  </Col>
31
45
  </Row>
32
46
  );
@@ -336,10 +336,7 @@ const useFormattedDuration = ({
336
336
  }, [start, end, byWeekDay, formatList, formatNumber]);
337
337
  };
338
338
 
339
- export const getDateTimeObject = (
340
- date: string,
341
- time: string
342
- ): DateTime | string => {
339
+ const getDateTimeObject = (date: string, time: string): DateTime | string => {
343
340
  const dateTime = DateTime.fromFormat(`${date} ${time}`, DATE_TIME_FORMAT);
344
341
 
345
342
  if (dateTime.isValid) {
@@ -3,12 +3,11 @@ import { Meta } from "@storybook/react";
3
3
  import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
4
4
  import { User } from "@licklist/core/dist/DataMapper/User/UserDataMapper";
5
5
  import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
6
+ import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
6
7
  import {
7
- Order,
8
8
  ORDER_SOURCE_IFRAME,
9
9
  ORDER_SOURCE_MANUAL,
10
- } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
11
-
10
+ } from "@licklist/core/src/DataMapper/Order/OrderDataMapper";
12
11
  import { BookingResults } from "./BookingResults";
13
12
 
14
13
  export default {
@@ -12,6 +12,7 @@ import { TIME_FORMAT } from "@licklist/core/dist/Config";
12
12
  import * as Config from "@licklist/core/dist/Config";
13
13
  import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
14
14
  import { getOrderSourceTitle } from "@licklist/plugins/dist/utils/sourceTitle";
15
+
15
16
  import Icon from "../../../../static/Icon";
16
17
 
17
18
  export type ResultCardProps = {
@@ -21,6 +22,8 @@ export type ResultCardProps = {
21
22
  onCardClick?: (id: number) => void;
22
23
  };
23
24
 
25
+ // @TODO integrate when API will be available
26
+ // activity and staff keys
24
27
  export const ResultCard = ({
25
28
  order,
26
29
  className,
@@ -38,10 +41,10 @@ export const ResultCard = ({
38
41
  startDate,
39
42
  products,
40
43
  source,
44
+ totalAmount,
41
45
  event,
42
46
  menu,
43
47
  remainingToPay,
44
- paidAmount,
45
48
  } = order;
46
49
 
47
50
  const productList = products.map((product) => product.name)?.join(", ") || "";
@@ -105,7 +108,7 @@ export const ResultCard = ({
105
108
  )}
106
109
  <p>
107
110
  {t("paidAmount")}:{" "}
108
- {formatNumber(paidAmount, {
111
+ {formatNumber(totalAmount, {
109
112
  style: "currency",
110
113
  currency: Config.Currency.GBP,
111
114
  })}
@@ -24,16 +24,12 @@ export interface PropertyControlProps<T> {
24
24
  item: Path<T>;
25
25
  label: string;
26
26
  isDisabled?: boolean;
27
- defaultColors?: Array<string>;
28
- isRequired?: boolean;
29
27
  }
30
28
 
31
29
  export function PropertyControl<T>({
32
30
  item,
33
31
  label,
34
32
  isDisabled = false,
35
- defaultColors,
36
- isRequired = true,
37
33
  }: PropertyControlProps<T>) {
38
34
  const { t } = useTranslation(["Validation"]);
39
35
 
@@ -66,7 +62,7 @@ export function PropertyControl<T>({
66
62
  <Form.Control
67
63
  {...register(item, {
68
64
  required: {
69
- value: isRequired,
65
+ value: true,
70
66
  message: t("Validation:fieldRequired", {
71
67
  attribute: label,
72
68
  }),
@@ -99,7 +95,7 @@ export function PropertyControl<T>({
99
95
  setValue(item, color.hex);
100
96
  toggleIsActive();
101
97
  }}
102
- colors={defaultColors || DEFAULT_COLORS}
98
+ colors={DEFAULT_COLORS}
103
99
  />
104
100
  </div>
105
101
  )}
@@ -33,7 +33,6 @@ type SortableListProps<T> = {
33
33
  renderItemContent: (args: RenderItemContentArgs<T>) => ReactNode;
34
34
  setItems?: Dispatch<SetStateAction<SortableItem<T>[]>>;
35
35
  isExpandNewItem?: boolean;
36
- isOverrides?: boolean;
37
36
  };
38
37
 
39
38
  export const SORTABLE_ID_KEY = "_sortableId";
@@ -45,7 +44,6 @@ export function SortableList<T>({
45
44
  renderItemContent,
46
45
  setItems,
47
46
  isExpandNewItem = false,
48
- isOverrides = false,
49
47
  }: SortableListProps<T>) {
50
48
  const [sortedItems, setSortedItems] = useState(items);
51
49
 
@@ -99,7 +97,6 @@ export function SortableList<T>({
99
97
  );
100
98
 
101
99
  function handleDragEnd(event) {
102
- if (isOverrides) return;
103
100
  const { active, over } = event;
104
101
 
105
102
  if (active.id !== over.id) {
@@ -52,8 +52,6 @@ export interface SortableTreeItemProps {
52
52
  className: string;
53
53
  };
54
54
  setIsExpanded?: () => void;
55
- isOverride?: boolean;
56
- isProduct?: boolean;
57
55
  }
58
56
 
59
57
  export function SortableTreeItem({
@@ -80,8 +78,6 @@ export function SortableTreeItem({
80
78
  edit,
81
79
  secondaryBadge,
82
80
  setIsExpanded,
83
- isOverride,
84
- isProduct = false,
85
81
  }: SortableTreeItemProps) {
86
82
  const [expanded, setExpanded] = useState(isExpanded);
87
83
  const [isModalVisible, setIsModalVisible] = useState(isNewAdded);
@@ -102,7 +98,6 @@ export function SortableTreeItem({
102
98
  transform: dragTransform,
103
99
  } = useDraggable({
104
100
  id,
105
- disabled: isOverride,
106
101
  });
107
102
 
108
103
  const onHandleExpand = useCallback(
@@ -150,7 +145,6 @@ export function SortableTreeItem({
150
145
  };
151
146
 
152
147
  const onEdit = (e) => {
153
- if (isOverride && !isProduct) return;
154
148
  e.stopPropagation();
155
149
  if (edit && !isModalVisible) edit();
156
150
  setIsModalVisible(true);
@@ -61,9 +61,9 @@ export const ManualDatePicker = ({
61
61
  disabled={isDisabled}
62
62
  >
63
63
  <option value="">{t("Design:monthShort")}</option>
64
- {MONTHS_ARRAY.map((object) => (
65
- <option key={object.key} value={object.value}>
66
- {object.key}
64
+ {MONTHS_ARRAY.map((key) => (
65
+ <option key={key} value={key}>
66
+ {key}
67
67
  </option>
68
68
  ))}
69
69
  </Form.Control>
@@ -1,9 +1,5 @@
1
- import {
2
- generateDatesArray,
3
- generateMonthsOptionsArray,
4
- generateYearsArray,
5
- } from "../utils";
1
+ import { generateDatesArray, generateYearsArray } from "../utils";
6
2
 
7
3
  export const DAYS_ARRAY = generateDatesArray(1, 31, 1);
8
- export const MONTHS_ARRAY = generateMonthsOptionsArray();
4
+ export const MONTHS_ARRAY = generateDatesArray(1, 12, 1);
9
5
  export const YEARS_ARRAY = generateYearsArray();
@@ -4,17 +4,6 @@ export const generateDatesArray = (start: number, end: number, step: number) =>
4
4
  (_, index) => 1 + index * step
5
5
  );
6
6
 
7
- export const generateMonthsOptionsArray = () =>
8
- Array.from({ length: 12 }, (_, index) => {
9
- const value = index + 1;
10
- let key = String(value);
11
- if (value < 10) {
12
- key = `0${key}`;
13
- }
14
-
15
- return { key, value };
16
- });
17
-
18
7
  export const generateYearsArray = () => {
19
8
  const currentYear = new Date().getFullYear();
20
9
  const ageBackYear = currentYear - 100;
@@ -23,7 +23,7 @@ export function BooleanSwitch({
23
23
  const { t } = useTranslation("Design");
24
24
 
25
25
  const options: SelectItem[] = [
26
- { id: 1, value: firstValueTitle ?? t("yes") },
26
+ { id: 1, value: firstValueTitle ?? t("yes") },
27
27
  { id: 0, value: secondValueTitle ?? t("no") },
28
28
  ];
29
29