@licklist/design 0.58.6-dev.9 → 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 -3
  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 +50 -116
  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}
@@ -26,7 +26,6 @@ export interface ProductCategoryControlValues extends FormValues {
26
26
  name: string;
27
27
  minSubItems: number | null;
28
28
  maxSubItems: number | null;
29
- overallQuantity?: number | null;
30
29
  quantityType: QuantityType;
31
30
  type: CategoryType;
32
31
  isTimeRelated: boolean;
@@ -50,7 +49,6 @@ export interface ProductCategoryControlProps extends IsDeletableEvent {
50
49
  onCategoryNameChange: (args: any) => void;
51
50
  stepIndex: number;
52
51
  productCategoryIndex: number;
53
- isOverride?: boolean;
54
52
  }
55
53
 
56
54
  const categoriesWithTickets = [
@@ -65,7 +63,6 @@ export function ProductCategoryControl({
65
63
  onCategoryNameChange,
66
64
  productCategoryIndex,
67
65
  stepIndex,
68
- isOverride = false,
69
66
  }: ProductCategoryControlProps) {
70
67
  const {
71
68
  control,
@@ -103,7 +100,6 @@ export function ProductCategoryControl({
103
100
  const collectUserInfoId = useId();
104
101
  const hasTicketId = useId();
105
102
  const zoneId = useId();
106
- const overallCapacityId = useId();
107
103
 
108
104
  const allowDepositsId = useId();
109
105
  const remainderExpireAfterId = useId();
@@ -129,7 +125,7 @@ export function ProductCategoryControl({
129
125
  // eslint-disable-next-line react-hooks/exhaustive-deps
130
126
  }, [maxSubItems, fieldNamePrefix]);
131
127
 
132
- const isZoneCategory =
128
+ const shouldShowZoneSelect =
133
129
  category.type === CATEGORY_TYPE_FIXED_DURATION ||
134
130
  category.type === CATEGORY_TYPE_GAME;
135
131
 
@@ -161,7 +157,7 @@ export function ProductCategoryControl({
161
157
  errors
162
158
  )}
163
159
  placeholder={t("name")}
164
- disabled={isLoading || isOverride}
160
+ disabled={isLoading}
165
161
  />
166
162
  <Form.Control.Feedback type="invalid">
167
163
  {HookFormService.getErrors<ProductSetFormValues>(
@@ -187,7 +183,7 @@ export function ProductCategoryControl({
187
183
  }))}
188
184
  value={field.value}
189
185
  onChange={field.onChange}
190
- disabled={isLoading || isOverride}
186
+ disabled={isLoading}
191
187
  />
192
188
  </Form.Group>
193
189
  )}
@@ -231,7 +227,7 @@ export function ProductCategoryControl({
231
227
  `${fieldNamePrefix}.minSubItems` as const,
232
228
  errors
233
229
  )}
234
- disabled={isLoading || isOverride}
230
+ disabled={isLoading}
235
231
  name={name}
236
232
  />
237
233
  )}
@@ -303,7 +299,7 @@ export function ProductCategoryControl({
303
299
  `${fieldNamePrefix}.maxSubItems` as const,
304
300
  errors
305
301
  )}
306
- disabled={isLoading || isOverride}
302
+ disabled={isLoading}
307
303
  />
308
304
  )}
309
305
  control={control}
@@ -330,110 +326,49 @@ export function ProductCategoryControl({
330
326
  </Col>
331
327
  </Row>
332
328
 
333
- {isZoneCategory && (
334
- <>
335
- <Row>
336
- <Col md={6} sm={6} xs={6}>
337
- <Form.Group controlId={overallCapacityId}>
338
- <Form.Label>{t("Design:overallQuantity")}</Form.Label>
339
- <InputGroup hasValidation>
340
- <InputGroup.Prepend
341
- className="arrow-up-btn"
342
- onClick={() => {
343
- const currentOverallCapacity = Number(
344
- getValues(`${fieldNamePrefix}.overallQuantity`) || 0
345
- );
346
- setValue(
347
- `${fieldNamePrefix}.overallQuantity`,
348
- currentOverallCapacity + 1,
349
- { shouldValidate: true }
350
- );
351
- }}
352
- >
353
- <InputGroup.Text className="py-0 px-3">
354
- <IncrementIcon />
355
- </InputGroup.Text>
356
- </InputGroup.Prepend>
357
- <Controller
358
- control={control}
359
- name={`${fieldNamePrefix}.overallQuantity`}
360
- render={({ field }) => (
361
- <Form.Control
362
- min={0}
363
- step={1}
364
- type="number"
365
- disabled={isOverride}
366
- isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
367
- `${fieldNamePrefix}.overallQuantity`,
368
- errors
369
- )}
370
- {...field}
371
- />
372
- )}
373
- rules={{
374
- min: {
375
- value: 0,
376
- message: t("Validation:fieldMinNumber", {
377
- attribute: t("overallQuantity"),
378
- min: 0,
379
- }) as string,
380
- },
381
- }}
382
- />
383
- <Form.Control.Feedback type="invalid">
384
- {HookFormService.getErrors<ProductSetFormValues>(
385
- `${fieldNamePrefix}.overallQuantity`,
329
+ {shouldShowZoneSelect && (
330
+ <Row>
331
+ <Col>
332
+ <Form.Group controlId={zoneId}>
333
+ <Form.Label>{t("Design:zone")}</Form.Label>
334
+ <Controller
335
+ control={control}
336
+ name={`${fieldNamePrefix}.zoneId`}
337
+ render={({ field }) => (
338
+ <Form.Control
339
+ as="select"
340
+ isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
341
+ `${fieldNamePrefix}.zoneId`,
386
342
  errors
387
343
  )}
388
- </Form.Control.Feedback>
389
- </InputGroup>
390
- </Form.Group>
391
- </Col>
392
- </Row>
393
- <Row>
394
- <Col>
395
- <Form.Group controlId={zoneId}>
396
- <Form.Label>{t("Design:zone")}</Form.Label>
397
- <Controller
398
- control={control}
399
- name={`${fieldNamePrefix}.zoneId`}
400
- render={({ field }) => (
401
- <Form.Control
402
- as="select"
403
- disabled={isOverride}
404
- isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
405
- `${fieldNamePrefix}.zoneId`,
406
- errors
407
- )}
408
- {...field}
409
- >
410
- <option value={null}>{t("Design:choose")}</option>
411
- {zones.map((zone) => (
412
- <option key={zone.id} value={zone.id}>
413
- {zone.name}
414
- </option>
415
- ))}
416
- </Form.Control>
417
- )}
418
- rules={{
419
- required: {
420
- value: providerHasBookingManagement,
421
- message: t("Validation:fieldRequired", {
422
- attribute: t("zone"),
423
- }),
424
- },
425
- }}
426
- />
427
- <Form.Control.Feedback type="invalid">
428
- {HookFormService.getErrors<ProductSetFormValues>(
429
- `${fieldNamePrefix}.zoneId`,
430
- errors
431
- )}
432
- </Form.Control.Feedback>
433
- </Form.Group>
434
- </Col>
435
- </Row>
436
- </>
344
+ {...field}
345
+ >
346
+ <option value={null}>{t("Design:choose")}</option>
347
+ {zones.map((zone) => (
348
+ <option key={zone.id} value={zone.id}>
349
+ {zone.name}
350
+ </option>
351
+ ))}
352
+ </Form.Control>
353
+ )}
354
+ rules={{
355
+ required: {
356
+ value: providerHasBookingManagement,
357
+ message: t("Validation:fieldRequired", {
358
+ attribute: t("zone"),
359
+ }),
360
+ },
361
+ }}
362
+ />
363
+ <Form.Control.Feedback type="invalid">
364
+ {HookFormService.getErrors<ProductSetFormValues>(
365
+ `${fieldNamePrefix}.zoneId`,
366
+ errors
367
+ )}
368
+ </Form.Control.Feedback>
369
+ </Form.Group>
370
+ </Col>
371
+ </Row>
437
372
  )}
438
373
  </Col>
439
374
 
@@ -449,7 +384,6 @@ export function ProductCategoryControl({
449
384
  <Form.Check.Input
450
385
  checked={expanded}
451
386
  onChange={handleExpand}
452
- disabled={isOverride}
453
387
  type="checkbox"
454
388
  />
455
389
  <Form.Check.Label>{t("showAdvancedOptions")}</Form.Check.Label>
@@ -518,7 +452,7 @@ export function ProductCategoryControl({
518
452
  name={name}
519
453
  value={Boolean(value)}
520
454
  onChange={onChange}
521
- disabled={isLoading || isOverride}
455
+ disabled={isLoading}
522
456
  />
523
457
  )}
524
458
  control={control}
@@ -542,7 +476,7 @@ export function ProductCategoryControl({
542
476
  name={name}
543
477
  value={Boolean(value)}
544
478
  onChange={onChange}
545
- disabled={isLoading || isOverride}
479
+ disabled={isLoading}
546
480
  />
547
481
  )}
548
482
  control={control}
@@ -565,7 +499,7 @@ export function ProductCategoryControl({
565
499
  name={name}
566
500
  value={Boolean(value)}
567
501
  onChange={onChange}
568
- disabled={isLoading || isOverride}
502
+ disabled={isLoading}
569
503
  />
570
504
  )}
571
505
  control={control}
@@ -593,7 +527,7 @@ export function ProductCategoryControl({
593
527
  `${fieldNamePrefix}.remainderExpireAfter` as const,
594
528
  errors
595
529
  )}
596
- disabled={isLoading || isOverride}
530
+ disabled={isLoading}
597
531
  name={name}
598
532
  />
599
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 {