@licklist/design 0.58.4-dev.2 → 0.58.5

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 (131) hide show
  1. package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
  2. package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
  3. package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
  4. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
  5. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  6. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  7. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  8. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/product-set/card/ProductSetCard.d.ts +1 -2
  11. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  12. package/dist/product-set/card/ProductSetCard.js +1 -1
  13. package/dist/product-set/control/ProductSetControl.d.ts +1 -2
  14. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  15. package/dist/product-set/control/ProductSetControl.js +1 -1
  16. package/dist/product-set/control/TutorialGifCard.d.ts +1 -2
  17. package/dist/product-set/control/TutorialGifCard.d.ts.map +1 -1
  18. package/dist/product-set/control/TutorialGifCard.js +1 -1
  19. package/dist/product-set/form/ProductCategoriesControl.d.ts +1 -2
  20. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  21. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  22. package/dist/product-set/form/ProductSetForm.d.ts +2 -7
  23. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  24. package/dist/product-set/form/ProductSetForm.js +1 -1
  25. package/dist/product-set/form/ProductsControl.d.ts +1 -2
  26. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  27. package/dist/product-set/form/ProductsControl.js +1 -1
  28. package/dist/product-set/form/StepsControl.d.ts +1 -2
  29. package/dist/product-set/form/StepsControl.d.ts.map +1 -1
  30. package/dist/product-set/form/StepsControl.js +1 -1
  31. package/dist/product-set/form/SubProductsControl.d.ts +1 -2
  32. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  33. package/dist/product-set/form/SubProductsControl.js +1 -1
  34. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts +1 -2
  35. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
  36. package/dist/product-set/hooks/useSortableTreeFunctions.js +1 -1
  37. package/dist/product-set/item/CreateProductSetItem.d.ts +1 -2
  38. package/dist/product-set/item/CreateProductSetItem.d.ts.map +1 -1
  39. package/dist/product-set/item/CreateProductSetItem.js +1 -1
  40. package/dist/product-set/product/ProductControl.d.ts +1 -2
  41. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  42. package/dist/product-set/product/ProductControl.js +1 -1
  43. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts +2 -4
  44. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
  45. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.js +1 -1
  46. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts +0 -1
  47. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  48. package/dist/product-set/product/quantity/ProductQuantityControl.js +1 -1
  49. package/dist/product-set/product-category/ProductCategoryControl.d.ts +1 -2
  50. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  51. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  52. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -2
  53. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  54. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  55. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  56. package/dist/sortable-list/SortableList.d.ts +1 -2
  57. package/dist/sortable-list/SortableList.d.ts.map +1 -1
  58. package/dist/sortable-list/SortableList.js +1 -1
  59. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -3
  60. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  61. package/dist/sortable-tree/SortableTreeItem.js +1 -1
  62. package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
  63. package/dist/static/manual-date-picker/constants/index.d.ts +1 -4
  64. package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
  65. package/dist/static/manual-date-picker/constants/index.js +1 -1
  66. package/dist/static/manual-date-picker/utils/index.d.ts +0 -4
  67. package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
  68. package/dist/static/manual-date-picker/utils/index.js +1 -1
  69. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -10
  70. package/dist/styles/iframe-events/Card.scss +8 -24
  71. package/dist/styles/iframe-events/PoweredBy.scss +2 -2
  72. package/dist/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
  73. package/dist/styles/iframe-page/Page.scss +0 -1
  74. package/dist/styles/iframe-page/PageBody.scss +11 -32
  75. package/dist/styles/iframe-page/PageHeader.scss +39 -41
  76. package/dist/styles/product-set/EditVenueMapSetModal.scss +1 -1
  77. package/dist/styles/sales/BookingResults.scss +1 -1
  78. package/package.json +3 -3
  79. package/src/calendar/Calendar.stories.tsx +2 -9
  80. package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
  81. package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
  82. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
  83. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
  84. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -6
  85. package/src/product-set/card/ProductSetCard.tsx +1 -10
  86. package/src/product-set/control/ProductSetControl.tsx +24 -46
  87. package/src/product-set/control/TutorialGifCard.tsx +3 -11
  88. package/src/product-set/form/ProductCategoriesControl.tsx +1 -12
  89. package/src/product-set/form/ProductSetForm.tsx +1 -10
  90. package/src/product-set/form/ProductsControl.tsx +0 -10
  91. package/src/product-set/form/StepsControl.tsx +2 -8
  92. package/src/product-set/form/SubProductsControl.tsx +0 -3
  93. package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -4
  94. package/src/product-set/item/CreateProductSetItem.tsx +0 -3
  95. package/src/product-set/product/ProductControl.tsx +12 -23
  96. package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -10
  97. package/src/product-set/product/quantity/ProductQuantityControl.tsx +3 -4
  98. package/src/product-set/product-category/ProductCategoryControl.tsx +8 -12
  99. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -4
  100. package/src/sales/booking/results/components/ResultCard.tsx +3 -0
  101. package/src/sortable-list/SortableList.tsx +0 -3
  102. package/src/sortable-tree/SortableTreeItem.tsx +1 -7
  103. package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
  104. package/src/static/manual-date-picker/constants/index.ts +2 -6
  105. package/src/static/manual-date-picker/utils/index.ts +0 -11
  106. package/src/static/switch/BooleanSwitch.tsx +1 -1
  107. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -10
  108. package/src/styles/iframe-events/Card.scss +8 -24
  109. package/src/styles/iframe-events/PoweredBy.scss +2 -2
  110. package/src/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
  111. package/src/styles/iframe-page/Page.scss +0 -1
  112. package/src/styles/iframe-page/PageBody.scss +11 -32
  113. package/src/styles/iframe-page/PageHeader.scss +39 -41
  114. package/src/styles/product-set/EditVenueMapSetModal.scss +1 -1
  115. package/src/styles/sales/BookingResults.scss +1 -1
  116. package/dist/product-set/control/DateInput.d.ts +0 -17
  117. package/dist/product-set/control/DateInput.d.ts.map +0 -1
  118. package/dist/product-set/control/DateInput.js +0 -1
  119. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts +0 -11
  120. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts.map +0 -1
  121. package/dist/product-set/control/ProductSetRecurrenceOverridesControl.js +0 -1
  122. package/dist/recurring-date-picker-input/DatePickerInput.d.ts +0 -19
  123. package/dist/recurring-date-picker-input/DatePickerInput.d.ts.map +0 -1
  124. package/dist/recurring-date-picker-input/DatePickerInput.js +0 -1
  125. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts +0 -15
  126. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +0 -1
  127. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.js +0 -1
  128. package/src/product-set/control/DateInput.tsx +0 -311
  129. package/src/product-set/control/ProductSetRecurrenceOverridesControl.tsx +0 -63
  130. package/src/recurring-date-picker-input/DatePickerInput.tsx +0 -93
  131. package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +0 -137
@@ -9,14 +9,10 @@ import { Icon, Image } from "../../static";
9
9
 
10
10
  export interface TutorialGifCardProps {
11
11
  tutorialAsset?: string;
12
- isOverrides?: boolean;
13
12
  }
14
13
 
15
14
  // @TODO: Tutorial GIF asset should be passed as context, which is better
16
- const TutorialGifCard = ({
17
- tutorialAsset,
18
- isOverrides,
19
- }: TutorialGifCardProps) => {
15
+ const TutorialGifCard = ({ tutorialAsset }: TutorialGifCardProps) => {
20
16
  const { pathname } = useLocation();
21
17
  const [isVisible, setIsVisible] = useState(pathname?.includes("/create"));
22
18
  const { t } = useTranslation(["Design"]);
@@ -50,12 +46,8 @@ const TutorialGifCard = ({
50
46
  </button>
51
47
  </Card.Header>
52
48
  <Card.Body className="tutorial-card-body">
53
- <p>
54
- {t(isOverrides ? "buildOverrideProductSet" : "buildProductSet")}
55
- </p>
56
- <span>
57
- {t(isOverrides ? "buildOverrideRules" : "buildProductSetDesc")}
58
- </span>
49
+ <p>{t("buildProductSet")}</p>
50
+ <span>{t("buildProductSetDesc")}</span>
59
51
  {tutorialAsset && <Image src={tutorialAsset} alt="Tutorial Gif" />}
60
52
  </Card.Body>
61
53
  </Card>
@@ -35,7 +35,6 @@ import { useSortableTreeFunctions } from "../hooks/useSortableTreeFunctions";
35
35
 
36
36
  interface ProductCategoriesControlProps extends WithIsLoading {
37
37
  stepIndex: number;
38
- isOverrides?: boolean;
39
38
  }
40
39
 
41
40
  const getCategoryDefaultValue = (
@@ -66,7 +65,6 @@ const getCategoryDefaultValue = (
66
65
  export function ProductCategoriesControl({
67
66
  isLoading,
68
67
  stepIndex,
69
- isOverrides,
70
68
  }: ProductCategoriesControlProps) {
71
69
  const { t } = useTranslation("Design");
72
70
  const {
@@ -107,7 +105,6 @@ export function ProductCategoriesControl({
107
105
  const { edit, saveValidField, cancelChanges } = useSortableTreeFunctions({
108
106
  fieldName: productCategoriesFieldName,
109
107
  remove,
110
- isOverrides,
111
108
  });
112
109
 
113
110
  const productCategories: ProductCategory[] = useWatch({
@@ -132,7 +129,7 @@ export function ProductCategoriesControl({
132
129
  });
133
130
 
134
131
  const handleDragEnd = (event) => {
135
- if (isOverrides) return;
132
+ // @TODO uncomment when will be fix for change sort index
136
133
  const { active, over } = event;
137
134
 
138
135
  if (!active || !over || !active?.id || !over?.id) return;
@@ -269,10 +266,8 @@ export function ProductCategoriesControl({
269
266
  categoryName={value}
270
267
  stepIndex={stepIndex}
271
268
  productCategoryIndex={index}
272
- isOverride={isOverrides}
273
269
  />
274
270
  }
275
- isOverride={isOverrides}
276
271
  onDelete={() => remove(index)}
277
272
  validate={() =>
278
273
  trigger(`steps.${stepIndex}.productCategories.${index}`)
@@ -295,7 +290,6 @@ export function ProductCategoriesControl({
295
290
  zones={zones}
296
291
  productCategoryIndex={index}
297
292
  categoryType={productCategory.type}
298
- isOverrides={isOverrides}
299
293
  />
300
294
  </SortableTree.Item>
301
295
  )}
@@ -305,9 +299,7 @@ export function ProductCategoriesControl({
305
299
  </SortableTree>
306
300
  <CreateProductSetItem
307
301
  title={t("addCategory")}
308
- isOverride={isOverrides}
309
302
  onClick={() => {
310
- if (isOverrides) return;
311
303
  setIsSelectCategoryVisible(true);
312
304
  }}
313
305
  />
@@ -316,7 +308,6 @@ export function ProductCategoriesControl({
316
308
  isVisible={isSelectCategoryVisible}
317
309
  onHide={() => setIsSelectCategoryVisible(false)}
318
310
  onCategorySelect={(categoryType) => {
319
- if (isOverrides) return;
320
311
  append(getCategoryDefaultValue(categoryType, fields.length));
321
312
  setShowCategoryModal(true);
322
313
  if (
@@ -330,9 +321,7 @@ export function ProductCategoriesControl({
330
321
  <>
331
322
  <CreateProductSetItem
332
323
  title={t("editMap")}
333
- isOverride={isOverrides}
334
324
  onClick={() => {
335
- if (isOverrides) return;
336
325
  setIsVenueMapSetModalVisible(true);
337
326
  }}
338
327
  className={clsx(
@@ -26,19 +26,14 @@ 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
-
33
29
  export interface WithId {
34
30
  id: number;
35
31
  }
36
32
  export interface ProductSetFormValues
37
33
  extends FormValues,
38
- WithIdOptional,
34
+ WithId,
39
35
  ProductSetControlValues {
40
36
  steps: Step[];
41
- isOverrides?: boolean;
42
37
  }
43
38
 
44
39
  export interface ProductSetFormProps
@@ -55,7 +50,6 @@ export interface ProductSetFormProps
55
50
  providerHasBookingManagement?: ProviderBookingManagementSetting["hasBookingManagement"];
56
51
  zones?: Zone[] | null;
57
52
  isCreateAction?: boolean;
58
- isOverrides?: boolean;
59
53
  workHours?: WorkHour[];
60
54
  }
61
55
 
@@ -73,7 +67,6 @@ export function ProductSetForm({
73
67
  zones,
74
68
  isCreateAction,
75
69
  workHours,
76
- isOverrides,
77
70
  ...shared
78
71
  }: ProductSetFormProps) {
79
72
  const { t } = useTranslation("Design");
@@ -91,7 +84,6 @@ export function ProductSetForm({
91
84
  });
92
85
 
93
86
  const { setError, reset } = form;
94
-
95
87
  const formValues = form.watch();
96
88
 
97
89
  const submitHandler = (onSubmit: (values: ProductSetFormValues) => void) => {
@@ -169,7 +161,6 @@ export function ProductSetForm({
169
161
  companyName={companyName}
170
162
  workHours={workHours}
171
163
  providerHasBookingManagement={providerHasBookingManagement}
172
- isOverrides={isOverrides}
173
164
  />
174
165
  <Row>
175
166
  <Col md={6} sm={12} />
@@ -34,7 +34,6 @@ interface ProductsControlProps extends WithIsLoading {
34
34
  hasTicket?: boolean;
35
35
  categoryType: CategoryType;
36
36
  zones?: Zone[];
37
- isOverrides?: boolean;
38
37
  }
39
38
 
40
39
  const getDefaultProductValue = (sort: number): Product => ({
@@ -78,7 +77,6 @@ export function ProductsControl({
78
77
  hasTicket,
79
78
  categoryType,
80
79
  zones,
81
- isOverrides,
82
80
  }: ProductsControlProps) {
83
81
  const { t } = useTranslation("Design");
84
82
  const form = useFormContext<ProductSetFormValues>();
@@ -114,7 +112,6 @@ export function ProductsControl({
114
112
  const { edit, saveValidField, cancelChanges } = useSortableTreeFunctions({
115
113
  fieldName: productControlFieldName,
116
114
  remove,
117
- isOverrides,
118
115
  });
119
116
 
120
117
  const allowDeposits = watch(
@@ -162,7 +159,6 @@ export function ProductsControl({
162
159
  });
163
160
 
164
161
  const handleDragEnd = (_event) => {
165
- if (isOverrides) return;
166
162
  const { active, over } = _event;
167
163
 
168
164
  if (!active || !over || !active?.id || !over?.id) return;
@@ -180,7 +176,6 @@ export function ProductsControl({
180
176
  };
181
177
 
182
178
  const onProductRemove = (index: number) => {
183
- if (isOverrides) return;
184
179
  const currentProduct = getValues(
185
180
  `${productControlFieldName}.${index}` as const
186
181
  );
@@ -220,12 +215,10 @@ export function ProductsControl({
220
215
  isExpanded={isFirstProductAdded}
221
216
  isInvalid={!!categoryProductErrors}
222
217
  title={value}
223
- isOverride={isOverrides}
224
218
  badge={<Badge className="product-badge">{t("product")}</Badge>}
225
219
  isIconInHeader={false}
226
220
  cancelChanges={() => cancelChanges(index)}
227
221
  edit={() => edit(index)}
228
- isProduct
229
222
  secondaryBadge={getBadgeConfig(categoryType, t(categoryType))}
230
223
  subTitle={
231
224
  <div className="product-set-badges-container">
@@ -262,7 +255,6 @@ export function ProductsControl({
262
255
  hasTicket={hasTicket}
263
256
  categoryType={categoryType}
264
257
  zoneDuration={catergoryZone?.defaultDuration}
265
- isOverrides={isOverrides}
266
258
  />
267
259
  }
268
260
  onDelete={() => onProductRemove(index)}
@@ -284,9 +276,7 @@ export function ProductsControl({
284
276
  </SortableTree>
285
277
  <CreateProductSetItem
286
278
  title={t("addProduct")}
287
- isOverride={isOverrides}
288
279
  onClick={() => {
289
- if (isOverrides) return;
290
280
  append(getDefaultProductValue(fields.length));
291
281
  setShowProductModal(true);
292
282
 
@@ -18,10 +18,9 @@ import { ProductSetFormValues } from "./ProductSetForm";
18
18
 
19
19
  interface StepsControlProps {
20
20
  isLoading: boolean;
21
- isOverrides?: boolean;
22
21
  }
23
22
 
24
- export function StepsControl({ isLoading, isOverrides }: StepsControlProps) {
23
+ export function StepsControl({ isLoading }: StepsControlProps) {
25
24
  const form = useFormContext<ProductSetFormValues>();
26
25
  const { t } = useTranslation("Design");
27
26
  const [showStepModal, setShowStepModal] = useState(false);
@@ -43,7 +42,6 @@ export function StepsControl({ isLoading, isOverrides }: StepsControlProps) {
43
42
  const { edit, saveValidField, cancelChanges } = useSortableTreeFunctions({
44
43
  fieldName: "steps",
45
44
  remove,
46
- isOverrides,
47
45
  });
48
46
 
49
47
  useEffect(() => {
@@ -92,9 +90,8 @@ export function StepsControl({ isLoading, isOverrides }: StepsControlProps) {
92
90
  modalLabel={t("addNewStep")}
93
91
  modalClass={ProductSetModalClasses.step}
94
92
  isNewAdded={showStepModal}
95
- edit={() => !isOverrides && edit(index)}
93
+ edit={() => edit(index)}
96
94
  cancelChanges={() => cancelChanges(index)}
97
- isOverride={isOverrides}
98
95
  subTitle={
99
96
  <div className="product-set-badges-container">
100
97
  <div className="product-set-subtitle-dot product-set-subtitle-step-dot" />
@@ -139,7 +136,6 @@ export function StepsControl({ isLoading, isOverrides }: StepsControlProps) {
139
136
  <ProductCategoriesControl
140
137
  isLoading={isLoading}
141
138
  stepIndex={index}
142
- isOverrides={isOverrides}
143
139
  />
144
140
  </SortableTree.Item>
145
141
  )}
@@ -149,9 +145,7 @@ export function StepsControl({ isLoading, isOverrides }: StepsControlProps) {
149
145
 
150
146
  <CreateProductSetItem
151
147
  title={t("addStep")}
152
- isOverride={isOverrides}
153
148
  onClick={() => {
154
- if (isOverrides) return;
155
149
  append(getDefaultStepsValues());
156
150
  setShowStepModal(true);
157
151
  if (errors.steps?.type === HookFormService.manualErrorType) {
@@ -15,7 +15,6 @@ interface SubProductsControlProps {
15
15
  productCategoryIndex: number;
16
16
  productIndex: number;
17
17
  isLoading: boolean;
18
- isOverrides?: boolean;
19
18
  }
20
19
 
21
20
  export function SubProductsControl({
@@ -24,7 +23,6 @@ export function SubProductsControl({
24
23
  stepIndex,
25
24
  productCategoryIndex,
26
25
  productIndex,
27
- isOverrides,
28
26
  }: SubProductsControlProps) {
29
27
  const form = useFormContext<ProductSetFormValues>();
30
28
  const { fields, append } = useFieldArray({
@@ -51,7 +49,6 @@ export function SubProductsControl({
51
49
  key={`sub-product-${subProduct.id}-${index}`}
52
50
  id={subProduct.id}
53
51
  title={subProduct.name}
54
- isOverride={isOverrides}
55
52
  body={
56
53
  <ProductControl<ProductSetFormValues>
57
54
  isLoading={isLoading}
@@ -4,25 +4,21 @@ import { useFormContext } from "react-hook-form";
4
4
  interface useSortableTreeFunctionsProps {
5
5
  fieldName: string;
6
6
  remove: (index?: number | number[]) => void;
7
- isOverrides?: boolean;
8
7
  }
9
8
  export const useSortableTreeFunctions = ({
10
9
  fieldName,
11
10
  remove,
12
- isOverrides,
13
11
  }: useSortableTreeFunctionsProps) => {
14
12
  const { getValues, setValue } = useFormContext();
15
13
  const [previousValue, setEditValue] = useState(null);
16
14
 
17
15
  const edit = (index: number) => {
18
- if (isOverrides) return;
19
16
  const currentCategoryProduct = getValues(`${fieldName}.${index}` as const);
20
17
  const cloneCategoryProduct = structuredClone(currentCategoryProduct);
21
18
  setEditValue(cloneCategoryProduct);
22
19
  };
23
20
 
24
21
  const cancelChanges = (index: number) => {
25
- if (isOverrides) return;
26
22
  if (!previousValue) {
27
23
  return remove(index);
28
24
  }
@@ -6,21 +6,18 @@ interface CreateProductSetItemProps {
6
6
  onClick: () => void;
7
7
  title: string;
8
8
  className?: string;
9
- isOverride?: boolean;
10
9
  }
11
10
 
12
11
  export function CreateProductSetItem({
13
12
  onClick,
14
13
  title,
15
14
  className,
16
- isOverride,
17
15
  }: CreateProductSetItemProps) {
18
16
  return (
19
17
  <button
20
18
  className={clsx(
21
19
  "product-set-item-wrapper w-100",
22
20
  `product-set-item-wrapper-${title.toLowerCase().split(" ")[1]}`,
23
- isOverride && "bg-light",
24
21
  className
25
22
  )}
26
23
  onClick={onClick}
@@ -113,7 +113,6 @@ export interface ProductControlProps<T>
113
113
  productName: string;
114
114
  hasTicket?: boolean;
115
115
  categoryType?: CategoryType;
116
- isOverrides?: boolean;
117
116
  zoneDuration?: number;
118
117
  }
119
118
 
@@ -129,7 +128,6 @@ export function ProductControl<T extends FormValues>({
129
128
  hasTicket,
130
129
  categoryType,
131
130
  zoneDuration,
132
- isOverrides = false,
133
131
  }: ProductControlProps<T>) {
134
132
  const {
135
133
  register,
@@ -262,7 +260,7 @@ export function ProductControl<T extends FormValues>({
262
260
  `${fieldNamePrefix}.name` as Path<T>,
263
261
  errors
264
262
  )}
265
- disabled={isLoading || isOverrides}
263
+ disabled={isLoading}
266
264
  placeholder={t("name")}
267
265
  />
268
266
  <Form.Control.Feedback type="invalid">
@@ -282,7 +280,7 @@ export function ProductControl<T extends FormValues>({
282
280
  viewMode={false}
283
281
  onUpdate={onChange}
284
282
  content={value as string}
285
- disabled={isLoading || isOverrides}
283
+ disabled={isLoading}
286
284
  />
287
285
  )}
288
286
  rules={{
@@ -328,7 +326,6 @@ export function ProductControl<T extends FormValues>({
328
326
  <ProductQuantityControl<T>
329
327
  isLoading={isLoading}
330
328
  fieldNamePrefix={fieldNamePrefix}
331
- isOverrides={isOverrides}
332
329
  onFocus={onFocus}
333
330
  />
334
331
 
@@ -373,7 +370,7 @@ export function ProductControl<T extends FormValues>({
373
370
  `${fieldNamePrefix}.quantitySelector` as Path<T>,
374
371
  errors
375
372
  )}
376
- disabled={isLoading || hasTicket || isOverrides}
373
+ disabled={isLoading || hasTicket}
377
374
  >
378
375
  {quantitySelectorList.map((selector) => (
379
376
  <option value={selector.id} key={selector.id}>
@@ -395,14 +392,13 @@ export function ProductControl<T extends FormValues>({
395
392
  <Row className="align-items-start duration-capacity-container">
396
393
  <ProductDurationControl
397
394
  fieldNamePrefix={fieldNamePrefix}
398
- disabled={disabledDuration || isOverrides}
395
+ disabled={disabledDuration}
399
396
  />
400
397
 
401
398
  <Col lg={4} md={4}>
402
399
  <FormNumberInput
403
400
  fieldName={`${fieldNamePrefix}.capacity`}
404
401
  label={t("capacity")}
405
- disabled={isOverrides}
406
402
  rules={{
407
403
  min: {
408
404
  value: 0,
@@ -430,7 +426,6 @@ export function ProductControl<T extends FormValues>({
430
426
  fieldName={`${fieldNamePrefix}.capacity`}
431
427
  label={t("capacity")}
432
428
  onChange={onChangeGameCapacity}
433
- disabled={isOverrides}
434
429
  rules={{
435
430
  min: {
436
431
  value: 0,
@@ -446,7 +441,7 @@ export function ProductControl<T extends FormValues>({
446
441
  <FormNumberInput
447
442
  fieldName={`${fieldNamePrefix}.duration`}
448
443
  label={t("durationMinutes")}
449
- disabled={disabledDuration || isOverrides}
444
+ disabled={disabledDuration}
450
445
  rules={{
451
446
  min: {
452
447
  value: 0,
@@ -492,7 +487,7 @@ export function ProductControl<T extends FormValues>({
492
487
  `${fieldNamePrefix}.termsAndConditions` as Path<T>,
493
488
  errors
494
489
  )}
495
- disabled={isLoading || isOverrides}
490
+ disabled={isLoading}
496
491
  name={name}
497
492
  />
498
493
  )}
@@ -518,7 +513,6 @@ export function ProductControl<T extends FormValues>({
518
513
  onFileRemove={onImageRemove}
519
514
  defaultFiles={images}
520
515
  isLoading={isImageUploading}
521
- disabled={isOverrides}
522
516
  withIcon
523
517
  title={t("addImage")}
524
518
  />
@@ -539,7 +533,7 @@ export function ProductControl<T extends FormValues>({
539
533
  name={name}
540
534
  value={Boolean(value)}
541
535
  onChange={onChange}
542
- disabled={isLoading || isOverrides}
536
+ disabled={isLoading}
543
537
  />
544
538
  );
545
539
  }}
@@ -574,7 +568,7 @@ export function ProductControl<T extends FormValues>({
574
568
  custom
575
569
  type="checkbox"
576
570
  name={advancedId}
577
- disabled={isLoading || isOverrides}
571
+ disabled={isLoading}
578
572
  >
579
573
  <Form.Check.Input
580
574
  checked={expanded}
@@ -601,7 +595,7 @@ export function ProductControl<T extends FormValues>({
601
595
  name={name}
602
596
  value={Boolean(value)}
603
597
  onChange={onChange}
604
- disabled={isLoading || isOverrides}
598
+ disabled={isLoading}
605
599
  />
606
600
  )}
607
601
  control={control}
@@ -621,7 +615,7 @@ export function ProductControl<T extends FormValues>({
621
615
  name={name}
622
616
  value={Boolean(value)}
623
617
  onChange={onChange}
624
- disabled={isLoading || isOverrides}
618
+ disabled={isLoading}
625
619
  />
626
620
  )}
627
621
  control={control}
@@ -630,12 +624,7 @@ export function ProductControl<T extends FormValues>({
630
624
  </Form.Group>
631
625
  {[CATEGORY_TYPE_GAME, CATEGORY_TYPE_FIXED_DURATION].includes(
632
626
  categoryType
633
- ) && (
634
- <FixedDurationOptions
635
- fieldNamePrefix={fieldNamePrefix}
636
- isOverrides={isOverrides}
637
- />
638
- )}
627
+ ) && <FixedDurationOptions fieldNamePrefix={fieldNamePrefix} />}
639
628
  <Form.Group
640
629
  controlId={minSpendId}
641
630
  className="advanced-switch-container"
@@ -645,7 +634,7 @@ export function ProductControl<T extends FormValues>({
645
634
  isRequired={false}
646
635
  isMoreThanZero
647
636
  allowDeposits={false}
648
- isLoading={isLoading || isOverrides}
637
+ isLoading={isLoading}
649
638
  fieldNamePrefix={`${fieldNamePrefix}.minSpend` as Path<T>}
650
639
  />
651
640
  </Form.Group>
@@ -5,15 +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
-
9
-
10
- interface FixedDurationOptionsProps<T> extends FieldNamePrefixPath<T> {
11
- isOverrides?: boolean;
12
- }
8
+ type FixedDurationOptionsProps<T> = FieldNamePrefixPath<T>;
13
9
 
14
10
  export const FixedDurationOptions = <T,>({
15
11
  fieldNamePrefix,
16
- isOverrides,
17
12
  }: FixedDurationOptionsProps<T>) => {
18
13
  const { t } = useTranslation("Design");
19
14
 
@@ -26,7 +21,6 @@ export const FixedDurationOptions = <T,>({
26
21
  <FormNumberInput
27
22
  fieldName={`${fieldNamePrefix}.subSlots`}
28
23
  label={t("subSlotsInMin")}
29
- disabled={isOverrides}
30
24
  />
31
25
  </Col>
32
26
 
@@ -34,7 +28,7 @@ export const FixedDurationOptions = <T,>({
34
28
  <FormNumberInput
35
29
  fieldName={`${fieldNamePrefix}.pause`}
36
30
  label={t("pauseInMin")}
37
- disabled={!subSlotsFieldValue || isOverrides}
31
+ disabled={!subSlotsFieldValue}
38
32
  />
39
33
  </Col>
40
34
  </Row>
@@ -44,7 +38,6 @@ export const FixedDurationOptions = <T,>({
44
38
  <FormNumberInput
45
39
  fieldName={`${fieldNamePrefix}.offset`}
46
40
  label={t("offsetInMin")}
47
- disabled={isOverrides}
48
41
  />
49
42
  </Col>
50
43
 
@@ -52,7 +45,6 @@ export const FixedDurationOptions = <T,>({
52
45
  <FormNumberInput
53
46
  fieldName={`${fieldNamePrefix}.serviceTime`}
54
47
  label={t("serviceTimeInMin")}
55
- disabled={isOverrides}
56
48
  />
57
49
  </Col>
58
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}