@licklist/design 0.58.9 → 0.58.11-dev.0

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 (259) hide show
  1. package/bitbucket-pipelines.yml +0 -8
  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 +2 -1
  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 +4 -2
  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 +4 -2
  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 +4 -0
  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 +1 -0
  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/iframe/ryft/utils/ryft-form.d.ts +5 -0
  52. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -0
  53. package/dist/iframe/ryft/utils/ryft-form.js +1 -0
  54. package/dist/index.js +1 -1
  55. package/dist/product-set/card/ProductSetCard.d.ts +2 -1
  56. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  57. package/dist/product-set/card/ProductSetCard.js +1 -1
  58. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  59. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  60. package/dist/product-set/control/DateInput.d.ts +17 -0
  61. package/dist/product-set/control/DateInput.d.ts.map +1 -0
  62. package/dist/product-set/control/DateInput.js +1 -0
  63. package/dist/product-set/control/ProductSetControl.d.ts +2 -1
  64. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  65. package/dist/product-set/control/ProductSetControl.js +1 -1
  66. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts +11 -0
  67. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts.map +1 -0
  68. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.js +1 -0
  69. package/dist/product-set/control/TutorialGifCard.d.ts +2 -1
  70. package/dist/product-set/control/TutorialGifCard.d.ts.map +1 -1
  71. package/dist/product-set/control/TutorialGifCard.js +1 -1
  72. package/dist/product-set/form/ProductCategoriesControl.d.ts +2 -1
  73. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  74. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  75. package/dist/product-set/form/ProductSetForm.d.ts +7 -2
  76. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  77. package/dist/product-set/form/ProductSetForm.js +1 -1
  78. package/dist/product-set/form/ProductsControl.d.ts +2 -1
  79. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  80. package/dist/product-set/form/ProductsControl.js +1 -1
  81. package/dist/product-set/form/StepsControl.d.ts +2 -1
  82. package/dist/product-set/form/StepsControl.d.ts.map +1 -1
  83. package/dist/product-set/form/StepsControl.js +1 -1
  84. package/dist/product-set/form/SubProductsControl.d.ts +2 -1
  85. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  86. package/dist/product-set/form/SubProductsControl.js +1 -1
  87. package/dist/product-set/form/VenueMapsControl.js +1 -1
  88. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts +2 -1
  89. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
  90. package/dist/product-set/hooks/useSortableTreeFunctions.js +1 -1
  91. package/dist/product-set/item/CreateProductSetItem.d.ts +2 -1
  92. package/dist/product-set/item/CreateProductSetItem.d.ts.map +1 -1
  93. package/dist/product-set/item/CreateProductSetItem.js +1 -1
  94. package/dist/product-set/product/ProductControl.d.ts +3 -1
  95. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  96. package/dist/product-set/product/ProductControl.js +1 -1
  97. package/dist/product-set/product/constants.d.ts +1 -0
  98. package/dist/product-set/product/constants.d.ts.map +1 -1
  99. package/dist/product-set/product/constants.js +1 -1
  100. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts +4 -2
  101. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
  102. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.js +1 -1
  103. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts +1 -0
  104. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  105. package/dist/product-set/product/quantity/ProductQuantityControl.js +1 -1
  106. package/dist/product-set/product-category/ProductCategoryControl.d.ts +3 -1
  107. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  108. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  109. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  110. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  111. package/dist/recurring-date-picker-input/DatePickerInput.d.ts +19 -0
  112. package/dist/recurring-date-picker-input/DatePickerInput.d.ts.map +1 -0
  113. package/dist/recurring-date-picker-input/DatePickerInput.js +1 -0
  114. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts +15 -0
  115. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -0
  116. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.js +1 -0
  117. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +5 -1
  118. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  119. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  120. package/dist/recurring-date-picker-input/utils.d.ts +9 -0
  121. package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
  122. package/dist/recurring-date-picker-input/utils.js +1 -1
  123. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  124. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  125. package/dist/sales/notes/NotesTableRow.js +1 -1
  126. package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
  127. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  128. package/dist/setting/dashboard/snippets/card/SnippetCard.js +1 -1
  129. package/dist/snippet/snippet-template/control/PropertyControl.d.ts +3 -1
  130. package/dist/snippet/snippet-template/control/PropertyControl.d.ts.map +1 -1
  131. package/dist/snippet/snippet-template/control/PropertyControl.js +1 -1
  132. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  133. package/dist/sortable-list/SortableList.d.ts +2 -1
  134. package/dist/sortable-list/SortableList.d.ts.map +1 -1
  135. package/dist/sortable-list/SortableList.js +1 -1
  136. package/dist/sortable-tree/SortableTreeItem.d.ts +3 -1
  137. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  138. package/dist/sortable-tree/SortableTreeItem.js +1 -1
  139. package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
  140. package/dist/static/manual-date-picker/constants/index.d.ts +4 -1
  141. package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
  142. package/dist/static/manual-date-picker/constants/index.js +1 -1
  143. package/dist/static/manual-date-picker/utils/index.d.ts +4 -0
  144. package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
  145. package/dist/static/manual-date-picker/utils/index.js +1 -1
  146. package/dist/striped-static-table/StripedStaticTable.js +1 -1
  147. package/dist/styles/iframe-events/Card.scss +24 -8
  148. package/dist/styles/iframe-events/PoweredBy.scss +2 -2
  149. package/dist/styles/iframe-order-process/IframeOrderProcess.scss +57 -20
  150. package/dist/styles/iframe-page/Page.scss +1 -0
  151. package/dist/styles/iframe-page/PageBody.scss +34 -12
  152. package/dist/styles/iframe-page/PageHeader.scss +41 -39
  153. package/dist/styles/product-set/EditVenueMapSetModal.scss +1 -1
  154. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +125 -2
  155. package/dist/styles/sales/BookingResults.scss +1 -1
  156. package/dist/venue-map-sets/form/components/VenueMapImageControl.js +1 -1
  157. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  158. package/package.json +10 -35
  159. package/src/assets/iframe/calendar.svg +2 -2
  160. package/src/assets/iframe/ticket.svg +2 -2
  161. package/src/calendar/Calendar.stories.tsx +23 -0
  162. package/src/calendar/Calendar.tsx +5 -5
  163. package/src/calendar/components/CalendarDates/CalendarDates.tsx +0 -5
  164. package/src/iframe/event/event-card/IframeEventCard.stories.tsx +1 -0
  165. package/src/iframe/event/event-card/IframeEventCard.tsx +7 -8
  166. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +9 -0
  167. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +58 -7
  168. package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +8 -0
  169. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
  170. package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +63 -10
  171. package/src/iframe/order-process/components/BookingSummary/types/index.ts +4 -0
  172. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
  173. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +3 -1
  174. package/src/iframe/page/components/PageBody/constants.ts +2 -0
  175. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +10 -0
  176. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
  177. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +546 -6
  178. package/src/iframe/payment/payment-page/PaymentPage.tsx +38 -29
  179. package/src/iframe/ryft/RyftPaymentForm.tsx +11 -5
  180. package/src/iframe/ryft/utils/ryft-form.ts +47 -0
  181. package/src/product-set/card/ProductSetCard.tsx +12 -1
  182. package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -1
  183. package/src/product-set/control/DateInput.tsx +316 -0
  184. package/src/product-set/control/ProductSetControl.tsx +46 -24
  185. package/src/product-set/control/ProductSetRecurrenceOverridesControl.tsx +63 -0
  186. package/src/product-set/control/TutorialGifCard.tsx +11 -3
  187. package/src/product-set/form/ProductCategoriesControl.tsx +12 -1
  188. package/src/product-set/form/ProductSetForm.tsx +10 -1
  189. package/src/product-set/form/ProductsControl.tsx +10 -0
  190. package/src/product-set/form/StepsControl.tsx +8 -2
  191. package/src/product-set/form/SubProductsControl.tsx +3 -0
  192. package/src/product-set/hooks/useSortableTreeFunctions.ts +6 -0
  193. package/src/product-set/item/CreateProductSetItem.tsx +3 -0
  194. package/src/product-set/product/ProductControl.tsx +48 -15
  195. package/src/product-set/product/constants.ts +1 -0
  196. package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +8 -2
  197. package/src/product-set/product/quantity/ProductQuantityControl.tsx +4 -3
  198. package/src/product-set/product-category/ProductCategoryControl.tsx +116 -50
  199. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
  200. package/src/recurring-date-picker-input/DatePickerInput.tsx +93 -0
  201. package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +136 -0
  202. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +15 -2
  203. package/src/recurring-date-picker-input/utils.ts +75 -0
  204. package/src/sales/booking/results/BookingResults.stories.tsx +3 -2
  205. package/src/sales/booking/results/components/ResultCard.tsx +2 -5
  206. package/src/setting/admin/AdminSettingForm.tsx +2 -2
  207. package/src/snippet/snippet-template/control/PropertyControl.tsx +6 -2
  208. package/src/sortable-list/SortableList.tsx +3 -0
  209. package/src/sortable-tree/SortableTreeItem.tsx +12 -4
  210. package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
  211. package/src/static/manual-date-picker/constants/index.ts +6 -2
  212. package/src/static/manual-date-picker/utils/index.ts +11 -0
  213. package/src/static/switch/BooleanSwitch.tsx +1 -1
  214. package/src/styles/iframe-events/Card.scss +24 -8
  215. package/src/styles/iframe-events/PoweredBy.scss +2 -2
  216. package/src/styles/iframe-order-process/IframeOrderProcess.scss +57 -20
  217. package/src/styles/iframe-page/Page.scss +1 -0
  218. package/src/styles/iframe-page/PageBody.scss +34 -12
  219. package/src/styles/iframe-page/PageHeader.scss +41 -39
  220. package/src/styles/product-set/EditVenueMapSetModal.scss +1 -1
  221. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +125 -2
  222. package/src/styles/sales/BookingResults.scss +1 -1
  223. package/src/zone/form/utils/dates.ts +9 -10
  224. package/jest.config.js +0 -29
  225. package/tests/Auth/Authorizer.test.tsx +0 -194
  226. package/tests/Auth/Layout/UserNavDropDown.test.tsx +0 -43
  227. package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +0 -33
  228. package/tests/Auth/Login/LoginComponent.test.tsx +0 -246
  229. package/tests/Auth/Login/LoginFormComponent.test.tsx +0 -182
  230. package/tests/Auth/Register/RegisterComponent.test.tsx +0 -285
  231. package/tests/Auth/Register/RegisterFormComponent.test.tsx +0 -170
  232. package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +0 -130
  233. package/tests/Auth/Social/SocialCallbackComponent.test.tsx +0 -133
  234. package/tests/Auth/Social/SocialFormComponent.test.tsx +0 -118
  235. package/tests/FileUpload/FileUpload.test.tsx +0 -42
  236. package/tests/Notification/EmailTemplate.test.tsx +0 -82
  237. package/tests/ProductSet/ProductSetPopover.test.tsx +0 -40
  238. package/tests/Report/Report.test.tsx +0 -48
  239. package/tests/Sales/Coupon.test.tsx +0 -51
  240. package/tests/Sales/SalesAndVIews.test.tsx +0 -63
  241. package/tests/SnippetTemplates/SnippetTemplates.test.tsx +0 -56
  242. package/tests/Table/FilterHelperComponent.test.tsx +0 -88
  243. package/tests/Table/PaginationHelperComponent.test.tsx +0 -109
  244. package/tests/Table/PerPageHelperComponent.test.tsx +0 -34
  245. package/tests/Table/TableHelperComponent.test.tsx +0 -295
  246. package/tests/TipTapEditor/TipTapEditor.test.tsx +0 -28
  247. package/tests/__mock__/hooks/useAuthApi.ts +0 -13
  248. package/tests/__mock__/hooks/useAuthMock.ts +0 -13
  249. package/tests/__mock__/hooks/useFormMock.ts +0 -27
  250. package/tests/__mock__/hooks/useNotificationMock.ts +0 -13
  251. package/tests/__mock__/hooks/useQueryMock.ts +0 -16
  252. package/tests/__mock__/hooks/useSocialApiMock.ts +0 -20
  253. package/tests/__mock__/hooks/useTranslationMock.ts +0 -17
  254. package/tests/__mock__/hooks/useUserApiMock.ts +0 -18
  255. package/tests/__mock__/hooks/useUserMock.ts +0 -13
  256. package/tests/__mock__/styleMock.js +0 -1
  257. package/tests/__mock__/windowMock.ts +0 -5
  258. package/tests/packages/react-query.tsx +0 -28
  259. package/tests/setupTests.ts +0 -10
@@ -9,10 +9,14 @@ import { Icon, Image } from "../../static";
9
9
 
10
10
  export interface TutorialGifCardProps {
11
11
  tutorialAsset?: string;
12
+ isOverrides?: boolean;
12
13
  }
13
14
 
14
15
  // @TODO: Tutorial GIF asset should be passed as context, which is better
15
- const TutorialGifCard = ({ tutorialAsset }: TutorialGifCardProps) => {
16
+ const TutorialGifCard = ({
17
+ tutorialAsset,
18
+ isOverrides,
19
+ }: TutorialGifCardProps) => {
16
20
  const { pathname } = useLocation();
17
21
  const [isVisible, setIsVisible] = useState(pathname?.includes("/create"));
18
22
  const { t } = useTranslation(["Design"]);
@@ -46,8 +50,12 @@ const TutorialGifCard = ({ tutorialAsset }: TutorialGifCardProps) => {
46
50
  </button>
47
51
  </Card.Header>
48
52
  <Card.Body className="tutorial-card-body">
49
- <p>{t("buildProductSet")}</p>
50
- <span>{t("buildProductSetDesc")}</span>
53
+ <p>
54
+ {t(isOverrides ? "buildOverrideProductSet" : "buildProductSet")}
55
+ </p>
56
+ <span>
57
+ {t(isOverrides ? "buildOverrideRules" : "buildProductSetDesc")}
58
+ </span>
51
59
  {tutorialAsset && <Image src={tutorialAsset} alt="Tutorial Gif" />}
52
60
  </Card.Body>
53
61
  </Card>
@@ -35,6 +35,7 @@ import { useSortableTreeFunctions } from "../hooks/useSortableTreeFunctions";
35
35
 
36
36
  interface ProductCategoriesControlProps extends WithIsLoading {
37
37
  stepIndex: number;
38
+ isOverrides?: boolean;
38
39
  }
39
40
 
40
41
  const getCategoryDefaultValue = (
@@ -65,6 +66,7 @@ const getCategoryDefaultValue = (
65
66
  export function ProductCategoriesControl({
66
67
  isLoading,
67
68
  stepIndex,
69
+ isOverrides,
68
70
  }: ProductCategoriesControlProps) {
69
71
  const { t } = useTranslation("Design");
70
72
  const {
@@ -105,6 +107,7 @@ export function ProductCategoriesControl({
105
107
  const { edit, saveValidField, cancelChanges } = useSortableTreeFunctions({
106
108
  fieldName: productCategoriesFieldName,
107
109
  remove,
110
+ isOverrides,
108
111
  });
109
112
 
110
113
  const productCategories: ProductCategory[] = useWatch({
@@ -129,7 +132,7 @@ export function ProductCategoriesControl({
129
132
  });
130
133
 
131
134
  const handleDragEnd = (event) => {
132
- // @TODO uncomment when will be fix for change sort index
135
+ if (isOverrides) return;
133
136
  const { active, over } = event;
134
137
 
135
138
  if (!active || !over || !active?.id || !over?.id) return;
@@ -266,8 +269,10 @@ export function ProductCategoriesControl({
266
269
  categoryName={value}
267
270
  stepIndex={stepIndex}
268
271
  productCategoryIndex={index}
272
+ isOverride={isOverrides}
269
273
  />
270
274
  }
275
+ isOverride={isOverrides}
271
276
  onDelete={() => remove(index)}
272
277
  validate={() =>
273
278
  trigger(`steps.${stepIndex}.productCategories.${index}`)
@@ -290,6 +295,7 @@ export function ProductCategoriesControl({
290
295
  zones={zones}
291
296
  productCategoryIndex={index}
292
297
  categoryType={productCategory.type}
298
+ isOverrides={isOverrides}
293
299
  />
294
300
  </SortableTree.Item>
295
301
  )}
@@ -299,7 +305,9 @@ export function ProductCategoriesControl({
299
305
  </SortableTree>
300
306
  <CreateProductSetItem
301
307
  title={t("addCategory")}
308
+ isOverride={isOverrides}
302
309
  onClick={() => {
310
+ if (isOverrides) return;
303
311
  setIsSelectCategoryVisible(true);
304
312
  }}
305
313
  />
@@ -308,6 +316,7 @@ export function ProductCategoriesControl({
308
316
  isVisible={isSelectCategoryVisible}
309
317
  onHide={() => setIsSelectCategoryVisible(false)}
310
318
  onCategorySelect={(categoryType) => {
319
+ if (isOverrides) return;
311
320
  append(getCategoryDefaultValue(categoryType, fields.length));
312
321
  setShowCategoryModal(true);
313
322
  if (
@@ -321,7 +330,9 @@ export function ProductCategoriesControl({
321
330
  <>
322
331
  <CreateProductSetItem
323
332
  title={t("editMap")}
333
+ isOverride={isOverrides}
324
334
  onClick={() => {
335
+ if (isOverrides) return;
325
336
  setIsVenueMapSetModalVisible(true);
326
337
  }}
327
338
  className={clsx(
@@ -26,14 +26,19 @@ import { checkAvailableTimesErrors, getFilteredTemplates } from "../utils";
26
26
  export interface WithIsLoading {
27
27
  isLoading: boolean;
28
28
  }
29
+ export interface WithIdOptional {
30
+ id?: number;
31
+ }
32
+
29
33
  export interface WithId {
30
34
  id: number;
31
35
  }
32
36
  export interface ProductSetFormValues
33
37
  extends FormValues,
34
- WithId,
38
+ WithIdOptional,
35
39
  ProductSetControlValues {
36
40
  steps: Step[];
41
+ isOverrides?: boolean;
37
42
  }
38
43
 
39
44
  export interface ProductSetFormProps
@@ -50,6 +55,7 @@ export interface ProductSetFormProps
50
55
  providerHasBookingManagement?: ProviderBookingManagementSetting["hasBookingManagement"];
51
56
  zones?: Zone[] | null;
52
57
  isCreateAction?: boolean;
58
+ isOverrides?: boolean;
53
59
  workHours?: WorkHour[];
54
60
  }
55
61
 
@@ -67,6 +73,7 @@ export function ProductSetForm({
67
73
  zones,
68
74
  isCreateAction,
69
75
  workHours,
76
+ isOverrides,
70
77
  ...shared
71
78
  }: ProductSetFormProps) {
72
79
  const { t } = useTranslation("Design");
@@ -84,6 +91,7 @@ export function ProductSetForm({
84
91
  });
85
92
 
86
93
  const { setError, reset } = form;
94
+
87
95
  const formValues = form.watch();
88
96
 
89
97
  const submitHandler = (onSubmit: (values: ProductSetFormValues) => void) => {
@@ -161,6 +169,7 @@ export function ProductSetForm({
161
169
  companyName={companyName}
162
170
  workHours={workHours}
163
171
  providerHasBookingManagement={providerHasBookingManagement}
172
+ isOverrides={isOverrides}
164
173
  />
165
174
  <Row>
166
175
  <Col md={6} sm={12} />
@@ -34,6 +34,7 @@ interface ProductsControlProps extends WithIsLoading {
34
34
  hasTicket?: boolean;
35
35
  categoryType: CategoryType;
36
36
  zones?: Zone[];
37
+ isOverrides?: boolean;
37
38
  }
38
39
 
39
40
  const getDefaultProductValue = (sort: number): Product => ({
@@ -77,6 +78,7 @@ export function ProductsControl({
77
78
  hasTicket,
78
79
  categoryType,
79
80
  zones,
81
+ isOverrides,
80
82
  }: ProductsControlProps) {
81
83
  const { t } = useTranslation("Design");
82
84
  const form = useFormContext<ProductSetFormValues>();
@@ -112,6 +114,7 @@ export function ProductsControl({
112
114
  const { edit, saveValidField, cancelChanges } = useSortableTreeFunctions({
113
115
  fieldName: productControlFieldName,
114
116
  remove,
117
+ isOverrides,
115
118
  });
116
119
 
117
120
  const allowDeposits = watch(
@@ -159,6 +162,7 @@ export function ProductsControl({
159
162
  });
160
163
 
161
164
  const handleDragEnd = (_event) => {
165
+ if (isOverrides) return;
162
166
  const { active, over } = _event;
163
167
 
164
168
  if (!active || !over || !active?.id || !over?.id) return;
@@ -176,6 +180,7 @@ export function ProductsControl({
176
180
  };
177
181
 
178
182
  const onProductRemove = (index: number) => {
183
+ if (isOverrides) return;
179
184
  const currentProduct = getValues(
180
185
  `${productControlFieldName}.${index}` as const
181
186
  );
@@ -215,10 +220,12 @@ export function ProductsControl({
215
220
  isExpanded={isFirstProductAdded}
216
221
  isInvalid={!!categoryProductErrors}
217
222
  title={value}
223
+ isOverride={isOverrides}
218
224
  badge={<Badge className="product-badge">{t("product")}</Badge>}
219
225
  isIconInHeader={false}
220
226
  cancelChanges={() => cancelChanges(index)}
221
227
  edit={() => edit(index)}
228
+ isProduct
222
229
  secondaryBadge={getBadgeConfig(categoryType, t(categoryType))}
223
230
  subTitle={
224
231
  <div className="product-set-badges-container">
@@ -255,6 +262,7 @@ export function ProductsControl({
255
262
  hasTicket={hasTicket}
256
263
  categoryType={categoryType}
257
264
  zoneDuration={catergoryZone?.defaultDuration}
265
+ isOverrides={isOverrides}
258
266
  />
259
267
  }
260
268
  onDelete={() => onProductRemove(index)}
@@ -276,7 +284,9 @@ export function ProductsControl({
276
284
  </SortableTree>
277
285
  <CreateProductSetItem
278
286
  title={t("addProduct")}
287
+ isOverride={isOverrides}
279
288
  onClick={() => {
289
+ if (isOverrides) return;
280
290
  append(getDefaultProductValue(fields.length));
281
291
  setShowProductModal(true);
282
292
 
@@ -18,9 +18,10 @@ import { ProductSetFormValues } from "./ProductSetForm";
18
18
 
19
19
  interface StepsControlProps {
20
20
  isLoading: boolean;
21
+ isOverrides?: boolean;
21
22
  }
22
23
 
23
- export function StepsControl({ isLoading }: StepsControlProps) {
24
+ export function StepsControl({ isLoading, isOverrides }: StepsControlProps) {
24
25
  const form = useFormContext<ProductSetFormValues>();
25
26
  const { t } = useTranslation("Design");
26
27
  const [showStepModal, setShowStepModal] = useState(false);
@@ -42,6 +43,7 @@ export function StepsControl({ isLoading }: StepsControlProps) {
42
43
  const { edit, saveValidField, cancelChanges } = useSortableTreeFunctions({
43
44
  fieldName: "steps",
44
45
  remove,
46
+ isOverrides,
45
47
  });
46
48
 
47
49
  useEffect(() => {
@@ -90,8 +92,9 @@ export function StepsControl({ isLoading }: StepsControlProps) {
90
92
  modalLabel={t("addNewStep")}
91
93
  modalClass={ProductSetModalClasses.step}
92
94
  isNewAdded={showStepModal}
93
- edit={() => edit(index)}
95
+ edit={() => !isOverrides && edit(index)}
94
96
  cancelChanges={() => cancelChanges(index)}
97
+ isOverride={isOverrides}
95
98
  subTitle={
96
99
  <div className="product-set-badges-container">
97
100
  <div className="product-set-subtitle-dot product-set-subtitle-step-dot" />
@@ -136,6 +139,7 @@ export function StepsControl({ isLoading }: StepsControlProps) {
136
139
  <ProductCategoriesControl
137
140
  isLoading={isLoading}
138
141
  stepIndex={index}
142
+ isOverrides={isOverrides}
139
143
  />
140
144
  </SortableTree.Item>
141
145
  )}
@@ -145,7 +149,9 @@ export function StepsControl({ isLoading }: StepsControlProps) {
145
149
 
146
150
  <CreateProductSetItem
147
151
  title={t("addStep")}
152
+ isOverride={isOverrides}
148
153
  onClick={() => {
154
+ if (isOverrides) return;
149
155
  append(getDefaultStepsValues());
150
156
  setShowStepModal(true);
151
157
  if (errors.steps?.type === HookFormService.manualErrorType) {
@@ -15,6 +15,7 @@ interface SubProductsControlProps {
15
15
  productCategoryIndex: number;
16
16
  productIndex: number;
17
17
  isLoading: boolean;
18
+ isOverrides?: boolean;
18
19
  }
19
20
 
20
21
  export function SubProductsControl({
@@ -23,6 +24,7 @@ export function SubProductsControl({
23
24
  stepIndex,
24
25
  productCategoryIndex,
25
26
  productIndex,
27
+ isOverrides,
26
28
  }: SubProductsControlProps) {
27
29
  const form = useFormContext<ProductSetFormValues>();
28
30
  const { fields, append } = useFieldArray({
@@ -49,6 +51,7 @@ export function SubProductsControl({
49
51
  key={`sub-product-${subProduct.id}-${index}`}
50
52
  id={subProduct.id}
51
53
  title={subProduct.name}
54
+ isOverride={isOverrides}
52
55
  body={
53
56
  <ProductControl<ProductSetFormValues>
54
57
  isLoading={isLoading}
@@ -4,24 +4,30 @@ import { useFormContext } from "react-hook-form";
4
4
  interface useSortableTreeFunctionsProps {
5
5
  fieldName: string;
6
6
  remove: (index?: number | number[]) => void;
7
+ isOverrides?: boolean;
7
8
  }
8
9
  export const useSortableTreeFunctions = ({
9
10
  fieldName,
10
11
  remove,
12
+ isOverrides,
11
13
  }: useSortableTreeFunctionsProps) => {
12
14
  const { getValues, setValue } = useFormContext();
13
15
  const [previousValue, setEditValue] = useState(null);
14
16
 
15
17
  const edit = (index: number) => {
18
+ if (isOverrides) return;
16
19
  const currentCategoryProduct = getValues(`${fieldName}.${index}` as const);
17
20
  const cloneCategoryProduct = structuredClone(currentCategoryProduct);
18
21
  setEditValue(cloneCategoryProduct);
19
22
  };
20
23
 
21
24
  const cancelChanges = (index: number) => {
25
+ if (isOverrides) return;
22
26
  if (!previousValue) {
27
+ // eslint-disable-next-line consistent-return
23
28
  return remove(index);
24
29
  }
30
+ // eslint-disable-next-line consistent-return
25
31
  return setValue(`${fieldName}.${index}` as const, previousValue);
26
32
  };
27
33
 
@@ -6,18 +6,21 @@ interface CreateProductSetItemProps {
6
6
  onClick: () => void;
7
7
  title: string;
8
8
  className?: string;
9
+ isOverride?: boolean;
9
10
  }
10
11
 
11
12
  export function CreateProductSetItem({
12
13
  onClick,
13
14
  title,
14
15
  className,
16
+ isOverride,
15
17
  }: CreateProductSetItemProps) {
16
18
  return (
17
19
  <button
18
20
  className={clsx(
19
21
  "product-set-item-wrapper w-100",
20
22
  `product-set-item-wrapper-${title.toLowerCase().split(" ")[1]}`,
23
+ isOverride && "bg-light",
21
24
  className
22
25
  )}
23
26
  onClick={onClick}
@@ -7,8 +7,12 @@ import {
7
7
  QUANTITY_TYPE_LIST_DTO,
8
8
  QUANTITY_TYPE_RECHARGING,
9
9
  } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
10
- import { ProductType } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
10
+ import {
11
+ ProductType,
12
+ PRODUCT_DEfAULT_COLORS,
13
+ } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
11
14
  import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
15
+ import clsx from "clsx";
12
16
  import {
13
17
  FieldNamePrefixPath,
14
18
  FormValues,
@@ -35,6 +39,7 @@ import {
35
39
  } from "react-hook-form";
36
40
  import { useTranslation } from "react-i18next";
37
41
  import { useImages } from "@licklist/plugins/dist/hooks/Media/useImages";
42
+
38
43
  import {
39
44
  Image,
40
45
  IMAGE_TYPE_IMAGE,
@@ -59,6 +64,7 @@ import {
59
64
  ProductQuantityControl,
60
65
  ProductQuantityRechargingControl,
61
66
  } from "./quantity";
67
+ import { PropertyControl } from "../../snippet";
62
68
  import { TipTapEditor } from "../../tiptap-editor";
63
69
  import { IsDeletableEvent } from "../types";
64
70
  import { FixedDurationOptions } from "./fixed-duration-fields";
@@ -98,6 +104,7 @@ export interface ProductControlValues
98
104
  offset: number;
99
105
  serviceTime: number;
100
106
  sort: number | null;
107
+ color?: string;
101
108
  }
102
109
 
103
110
  export interface ProductControlProps<T>
@@ -113,6 +120,7 @@ export interface ProductControlProps<T>
113
120
  productName: string;
114
121
  hasTicket?: boolean;
115
122
  categoryType?: CategoryType;
123
+ isOverrides?: boolean;
116
124
  zoneDuration?: number;
117
125
  }
118
126
 
@@ -128,6 +136,7 @@ export function ProductControl<T extends FormValues>({
128
136
  hasTicket,
129
137
  categoryType,
130
138
  zoneDuration,
139
+ isOverrides = false,
131
140
  }: ProductControlProps<T>) {
132
141
  const {
133
142
  register,
@@ -141,7 +150,7 @@ export function ProductControl<T extends FormValues>({
141
150
  } = useFormContext<T>();
142
151
 
143
152
  const { setLoading } = useContext(ProductSetLoadingContext);
144
- const { t } = useTranslation(["Design", "Validation"]);
153
+ const { t } = useTranslation(["Design", "Validation", "ProductSet"]);
145
154
  const [expanded, setExpanded] = useState(false);
146
155
  const [initialImages, setInitialImages] = useState<Image[] | null>(null);
147
156
  // @TODO: After checking "isUnlimited" checkbox need to reset field totalQuantity
@@ -260,7 +269,7 @@ export function ProductControl<T extends FormValues>({
260
269
  `${fieldNamePrefix}.name` as Path<T>,
261
270
  errors
262
271
  )}
263
- disabled={isLoading}
272
+ disabled={isLoading || isOverrides}
264
273
  placeholder={t("name")}
265
274
  />
266
275
  <Form.Control.Feedback type="invalid">
@@ -280,7 +289,7 @@ export function ProductControl<T extends FormValues>({
280
289
  viewMode={false}
281
290
  onUpdate={onChange}
282
291
  content={value as string}
283
- disabled={isLoading}
292
+ disabled={isLoading || isOverrides}
284
293
  />
285
294
  )}
286
295
  rules={{
@@ -326,6 +335,7 @@ export function ProductControl<T extends FormValues>({
326
335
  <ProductQuantityControl<T>
327
336
  isLoading={isLoading}
328
337
  fieldNamePrefix={fieldNamePrefix}
338
+ isOverrides={isOverrides}
329
339
  onFocus={onFocus}
330
340
  />
331
341
 
@@ -370,7 +380,7 @@ export function ProductControl<T extends FormValues>({
370
380
  `${fieldNamePrefix}.quantitySelector` as Path<T>,
371
381
  errors
372
382
  )}
373
- disabled={isLoading || hasTicket}
383
+ disabled={isLoading || hasTicket || isOverrides}
374
384
  >
375
385
  {quantitySelectorList.map((selector) => (
376
386
  <option value={selector.id} key={selector.id}>
@@ -385,6 +395,14 @@ export function ProductControl<T extends FormValues>({
385
395
  )}
386
396
  </Form.Control.Feedback>
387
397
  </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
+ />
388
406
  </Col>
389
407
  </Row>
390
408
 
@@ -392,13 +410,14 @@ export function ProductControl<T extends FormValues>({
392
410
  <Row className="align-items-start duration-capacity-container">
393
411
  <ProductDurationControl
394
412
  fieldNamePrefix={fieldNamePrefix}
395
- disabled={disabledDuration}
413
+ disabled={disabledDuration || isOverrides}
396
414
  />
397
415
 
398
416
  <Col lg={4} md={4}>
399
417
  <FormNumberInput
400
418
  fieldName={`${fieldNamePrefix}.capacity`}
401
419
  label={t("capacity")}
420
+ disabled={isOverrides}
402
421
  rules={{
403
422
  min: {
404
423
  value: 0,
@@ -426,6 +445,7 @@ export function ProductControl<T extends FormValues>({
426
445
  fieldName={`${fieldNamePrefix}.capacity`}
427
446
  label={t("capacity")}
428
447
  onChange={onChangeGameCapacity}
448
+ disabled={isOverrides}
429
449
  rules={{
430
450
  min: {
431
451
  value: 0,
@@ -441,7 +461,7 @@ export function ProductControl<T extends FormValues>({
441
461
  <FormNumberInput
442
462
  fieldName={`${fieldNamePrefix}.duration`}
443
463
  label={t("durationMinutes")}
444
- disabled={disabledDuration}
464
+ disabled={disabledDuration || isOverrides}
445
465
  rules={{
446
466
  min: {
447
467
  value: 0,
@@ -487,7 +507,7 @@ export function ProductControl<T extends FormValues>({
487
507
  `${fieldNamePrefix}.termsAndConditions` as Path<T>,
488
508
  errors
489
509
  )}
490
- disabled={isLoading}
510
+ disabled={isLoading || isOverrides}
491
511
  name={name}
492
512
  />
493
513
  )}
@@ -504,7 +524,14 @@ export function ProductControl<T extends FormValues>({
504
524
  </Form.Group>
505
525
  </Col>
506
526
 
507
- <Col lg={4} md={4} className="licklist-file-upload-wrapper">
527
+ <Col
528
+ lg={4}
529
+ md={4}
530
+ className={clsx(
531
+ "licklist-file-upload-wrapper",
532
+ isOverrides && "opacity-50"
533
+ )}
534
+ >
508
535
  <FileUpload
509
536
  onFilesChange={onFilesChange}
510
537
  allowedExtensions={["jpeg", "jpg", "png"]}
@@ -513,6 +540,7 @@ export function ProductControl<T extends FormValues>({
513
540
  onFileRemove={onImageRemove}
514
541
  defaultFiles={images}
515
542
  isLoading={isImageUploading}
543
+ disabled={isOverrides}
516
544
  withIcon
517
545
  title={t("addImage")}
518
546
  />
@@ -533,7 +561,7 @@ export function ProductControl<T extends FormValues>({
533
561
  name={name}
534
562
  value={Boolean(value)}
535
563
  onChange={onChange}
536
- disabled={isLoading}
564
+ disabled={isLoading || isOverrides}
537
565
  />
538
566
  );
539
567
  }}
@@ -568,7 +596,7 @@ export function ProductControl<T extends FormValues>({
568
596
  custom
569
597
  type="checkbox"
570
598
  name={advancedId}
571
- disabled={isLoading}
599
+ disabled={isLoading || isOverrides}
572
600
  >
573
601
  <Form.Check.Input
574
602
  checked={expanded}
@@ -595,7 +623,7 @@ export function ProductControl<T extends FormValues>({
595
623
  name={name}
596
624
  value={Boolean(value)}
597
625
  onChange={onChange}
598
- disabled={isLoading}
626
+ disabled={isLoading || isOverrides}
599
627
  />
600
628
  )}
601
629
  control={control}
@@ -615,7 +643,7 @@ export function ProductControl<T extends FormValues>({
615
643
  name={name}
616
644
  value={Boolean(value)}
617
645
  onChange={onChange}
618
- disabled={isLoading}
646
+ disabled={isLoading || isOverrides}
619
647
  />
620
648
  )}
621
649
  control={control}
@@ -624,7 +652,12 @@ export function ProductControl<T extends FormValues>({
624
652
  </Form.Group>
625
653
  {[CATEGORY_TYPE_GAME, CATEGORY_TYPE_FIXED_DURATION].includes(
626
654
  categoryType
627
- ) && <FixedDurationOptions fieldNamePrefix={fieldNamePrefix} />}
655
+ ) && (
656
+ <FixedDurationOptions
657
+ fieldNamePrefix={fieldNamePrefix}
658
+ isOverrides={isOverrides}
659
+ />
660
+ )}
628
661
  <Form.Group
629
662
  controlId={minSpendId}
630
663
  className="advanced-switch-container"
@@ -634,7 +667,7 @@ export function ProductControl<T extends FormValues>({
634
667
  isRequired={false}
635
668
  isMoreThanZero
636
669
  allowDeposits={false}
637
- isLoading={isLoading}
670
+ isLoading={isLoading || isOverrides}
638
671
  fieldNamePrefix={`${fieldNamePrefix}.minSpend` as Path<T>}
639
672
  />
640
673
  </Form.Group>
@@ -1 +1,2 @@
1
1
  export const MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH = 1000;
2
+ export const MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE = 1;
@@ -5,10 +5,13 @@ 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
- type FixedDurationOptionsProps<T> = FieldNamePrefixPath<T>;
8
+ interface FixedDurationOptionsProps<T> extends FieldNamePrefixPath<T> {
9
+ isOverrides?: boolean;
10
+ }
9
11
 
10
12
  export const FixedDurationOptions = <T,>({
11
13
  fieldNamePrefix,
14
+ isOverrides,
12
15
  }: FixedDurationOptionsProps<T>) => {
13
16
  const { t } = useTranslation("Design");
14
17
 
@@ -21,6 +24,7 @@ export const FixedDurationOptions = <T,>({
21
24
  <FormNumberInput
22
25
  fieldName={`${fieldNamePrefix}.subSlots`}
23
26
  label={t("subSlotsInMin")}
27
+ disabled={isOverrides}
24
28
  />
25
29
  </Col>
26
30
 
@@ -28,7 +32,7 @@ export const FixedDurationOptions = <T,>({
28
32
  <FormNumberInput
29
33
  fieldName={`${fieldNamePrefix}.pause`}
30
34
  label={t("pauseInMin")}
31
- disabled={!subSlotsFieldValue}
35
+ disabled={!subSlotsFieldValue || isOverrides}
32
36
  />
33
37
  </Col>
34
38
  </Row>
@@ -38,6 +42,7 @@ export const FixedDurationOptions = <T,>({
38
42
  <FormNumberInput
39
43
  fieldName={`${fieldNamePrefix}.offset`}
40
44
  label={t("offsetInMin")}
45
+ disabled={isOverrides}
41
46
  />
42
47
  </Col>
43
48
 
@@ -45,6 +50,7 @@ export const FixedDurationOptions = <T,>({
45
50
  <FormNumberInput
46
51
  fieldName={`${fieldNamePrefix}.serviceTime`}
47
52
  label={t("serviceTimeInMin")}
53
+ disabled={isOverrides}
48
54
  />
49
55
  </Col>
50
56
  </Row>
@@ -22,12 +22,13 @@ 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;
25
26
  }
26
27
 
27
28
  export function ProductQuantityControl<T extends FormValues>(
28
29
  props: ProductQuantityControlProps<T>
29
30
  ) {
30
- const { isLoading = false, fieldNamePrefix, onFocus } = props;
31
+ const { isLoading = false, fieldNamePrefix, onFocus, isOverrides } = props;
31
32
  const {
32
33
  control,
33
34
  formState: { errors },
@@ -90,7 +91,7 @@ export function ProductQuantityControl<T extends FormValues>(
90
91
  isInvalid={
91
92
  Number(minQuantityValue) > Number(maxQuantityValue)
92
93
  }
93
- disabled={isLoading}
94
+ disabled={isLoading || isOverrides}
94
95
  />
95
96
  )}
96
97
  control={control}
@@ -148,7 +149,7 @@ export function ProductQuantityControl<T extends FormValues>(
148
149
  isInvalid={
149
150
  Number(minQuantityValue) > Number(maxQuantityValue)
150
151
  }
151
- disabled={isLoading}
152
+ disabled={isLoading || isOverrides}
152
153
  />
153
154
  )}
154
155
  control={control}