@licklist/design 0.59.0-dev.9 → 0.59.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.
- package/bitbucket-pipelines.yml +8 -0
- package/dist/calendar/Calendar.d.ts +1 -1
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/Calendar.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -3
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +1 -3
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +1 -3
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts +1 -2
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.js +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts +1 -3
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -2
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +1 -4
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -3
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/recurring-date-picker-input/utils.d.ts +0 -12
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sales/coupon/control/CouponFormControl.d.ts +1 -2
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +1 -1
- package/dist/sales/coupon/form/CouponFrom.d.ts +2 -2
- package/dist/sales/coupon/form/CouponFrom.d.ts.map +1 -1
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts +0 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -1
- package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
- package/dist/static/manual-date-picker/constants/index.d.ts +1 -4
- package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/constants/index.js +1 -1
- package/dist/static/manual-date-picker/utils/index.d.ts +0 -4
- package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/utils/index.js +1 -1
- package/dist/styles/activity-card/ListActivitiesCard.scss +1 -1
- package/dist/styles/iframe-events/Card.scss +8 -24
- package/dist/styles/iframe-events/PoweredBy.scss +2 -2
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -5
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
- package/dist/styles/iframe-page/Page.scss +0 -1
- package/dist/styles/iframe-page/PageBody.scss +9 -32
- package/dist/styles/iframe-page/PageHeader.scss +39 -41
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +1 -2
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +1 -1
- package/dist/zone/form/ZoneForm.d.ts +2 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +1 -1
- package/dist/zone/form/components/ZoneControl.d.ts +2 -2
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -4
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/jest.config.js +29 -0
- package/package.json +35 -10
- package/src/calendar/Calendar.stories.tsx +0 -23
- package/src/calendar/Calendar.tsx +5 -5
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -4
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +8 -10
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +0 -4
- package/src/iframe/activity-card/ActivityCard.tsx +2 -4
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
- package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
- package/src/iframe/page/components/PageBody/constants.ts +1 -1
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +3 -3
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/iframe/payment/payment-page/PaymentPage.tsx +2 -2
- package/src/iframe/ryft/RyftPaymentForm.tsx +3 -20
- package/src/iframe/ryft/utils/ryft-form.ts +5 -11
- package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -3
- package/src/product-set/control/DateInput.tsx +5 -4
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +1 -5
- package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -2
- package/src/product-set/product/ProductControl.tsx +38 -38
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +27 -89
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +1 -0
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -11
- package/src/recurring-date-picker-input/utils.ts +0 -77
- package/src/sales/booking/results/BookingResults.stories.tsx +2 -3
- package/src/sales/booking/results/components/ResultCard.tsx +5 -2
- package/src/sales/coupon/control/CouponFormControl.tsx +50 -29
- package/src/sales/coupon/form/CouponFrom.tsx +15 -5
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/dashboard/DashboardSettingForm.tsx +0 -13
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
- package/src/static/manual-date-picker/constants/index.ts +2 -6
- package/src/static/manual-date-picker/utils/index.ts +0 -11
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/activity-card/ListActivitiesCard.scss +1 -1
- package/src/styles/iframe-events/Card.scss +8 -24
- package/src/styles/iframe-events/PoweredBy.scss +2 -2
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -5
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
- package/src/styles/iframe-page/Page.scss +0 -1
- package/src/styles/iframe-page/PageBody.scss +9 -32
- package/src/styles/iframe-page/PageHeader.scss +39 -41
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +3 -16
- package/src/zone/form/ZoneForm.tsx +2 -3
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +5 -7
- package/src/zone/form/utils/dates.ts +10 -9
- package/tests/Auth/Authorizer.test.tsx +194 -0
- package/tests/Auth/Layout/UserNavDropDown.test.tsx +43 -0
- package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +33 -0
- package/tests/Auth/Login/LoginComponent.test.tsx +246 -0
- package/tests/Auth/Login/LoginFormComponent.test.tsx +182 -0
- package/tests/Auth/Register/RegisterComponent.test.tsx +285 -0
- package/tests/Auth/Register/RegisterFormComponent.test.tsx +170 -0
- package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +130 -0
- package/tests/Auth/Social/SocialCallbackComponent.test.tsx +133 -0
- package/tests/Auth/Social/SocialFormComponent.test.tsx +118 -0
- package/tests/FileUpload/FileUpload.test.tsx +42 -0
- package/tests/Notification/EmailTemplate.test.tsx +82 -0
- package/tests/ProductSet/ProductSetPopover.test.tsx +40 -0
- package/tests/Report/Report.test.tsx +48 -0
- package/tests/Sales/Coupon.test.tsx +51 -0
- package/tests/Sales/SalesAndVIews.test.tsx +63 -0
- package/tests/SnippetTemplates/SnippetTemplates.test.tsx +56 -0
- package/tests/Table/FilterHelperComponent.test.tsx +88 -0
- package/tests/Table/PaginationHelperComponent.test.tsx +109 -0
- package/tests/Table/PerPageHelperComponent.test.tsx +34 -0
- package/tests/Table/TableHelperComponent.test.tsx +295 -0
- package/tests/TipTapEditor/TipTapEditor.test.tsx +28 -0
- package/tests/__mock__/hooks/useAuthApi.ts +13 -0
- package/tests/__mock__/hooks/useAuthMock.ts +13 -0
- package/tests/__mock__/hooks/useFormMock.ts +27 -0
- package/tests/__mock__/hooks/useNotificationMock.ts +13 -0
- package/tests/__mock__/hooks/useQueryMock.ts +16 -0
- package/tests/__mock__/hooks/useSocialApiMock.ts +20 -0
- package/tests/__mock__/hooks/useTranslationMock.ts +17 -0
- package/tests/__mock__/hooks/useUserApiMock.ts +18 -0
- package/tests/__mock__/hooks/useUserMock.ts +13 -0
- package/tests/__mock__/styleMock.js +1 -0
- package/tests/__mock__/windowMock.ts +5 -0
- package/tests/packages/react-query.tsx +28 -0
- package/tests/setupTests.ts +10 -0
- package/dist/sales/coupon/utils/index.d.ts +0 -7
- package/dist/sales/coupon/utils/index.d.ts.map +0 -1
- package/dist/sales/coupon/utils/index.js +0 -1
- package/src/sales/coupon/utils/index.ts +0 -13
|
@@ -19,7 +19,6 @@ import { scrollToError } from "@licklist/plugins/dist/utils/ScrollUtils";
|
|
|
19
19
|
import { getFirstErrorKey } from "@licklist/plugins/dist/utils/FormValues";
|
|
20
20
|
|
|
21
21
|
import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
22
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
23
22
|
import { CategoryGroup } from "../../../../types/categories";
|
|
24
23
|
import { SaleDeadline } from "../SaleDeadline/SaleDeadline";
|
|
25
24
|
import {
|
|
@@ -65,7 +64,6 @@ export interface EditEventFormProps extends HasPermissionProp {
|
|
|
65
64
|
createProductSet: (props: EditEventFormValues) => void;
|
|
66
65
|
setEditProductSetId: (value: string) => void;
|
|
67
66
|
isExternalPaymentLinkEnabled?: boolean;
|
|
68
|
-
workHours: WorkHour[] | undefined;
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
const eventImageTypes = {
|
|
@@ -85,7 +83,6 @@ export const EditEventForm = ({
|
|
|
85
83
|
createProductSet,
|
|
86
84
|
setEditProductSetId,
|
|
87
85
|
isExternalPaymentLinkEnabled,
|
|
88
|
-
workHours,
|
|
89
86
|
}: EditEventFormProps) => {
|
|
90
87
|
const { t } = useTranslation(["Design", "Validation"]);
|
|
91
88
|
|
|
@@ -406,7 +403,6 @@ export const EditEventForm = ({
|
|
|
406
403
|
setEditProductSetId={setEditProductSetId}
|
|
407
404
|
setShowEditProductSet={setShowEditProductSet}
|
|
408
405
|
showEditProductSet={showEditProductSet}
|
|
409
|
-
workHours={workHours}
|
|
410
406
|
/>
|
|
411
407
|
|
|
412
408
|
{hasPermission && !showEditProductSet && (
|
package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx
CHANGED
|
@@ -5,7 +5,6 @@ import { useId } from "@react-aria/utils";
|
|
|
5
5
|
import { Controller, useFormContext } from "react-hook-form";
|
|
6
6
|
import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
|
|
7
7
|
import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
8
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
9
8
|
import { ConfirmModal } from "../../../../modals/confirmation/ConfirmModal";
|
|
10
9
|
import { EditEventFormValues } from "../EditEventForm/EditEventForm";
|
|
11
10
|
import { EditEventProductSet } from "./component/EditEventProductSet";
|
|
@@ -16,7 +15,6 @@ interface SelectEventProductSetProps extends HasPermissionProp {
|
|
|
16
15
|
setShowEditProductSet: (value: boolean) => void;
|
|
17
16
|
createProductSet: (props: EditEventFormValues) => void;
|
|
18
17
|
setEditProductSetId: (value: string) => void;
|
|
19
|
-
workHours: WorkHour[] | undefined;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
export const SelectEventProductSet = ({
|
|
@@ -25,7 +23,6 @@ export const SelectEventProductSet = ({
|
|
|
25
23
|
setEditProductSetId,
|
|
26
24
|
showEditProductSet,
|
|
27
25
|
setShowEditProductSet,
|
|
28
|
-
workHours,
|
|
29
26
|
}: SelectEventProductSetProps) => {
|
|
30
27
|
const { t } = useTranslation(["Design"]);
|
|
31
28
|
const form = useFormContext<EditEventFormValues>();
|
|
@@ -202,13 +199,14 @@ export const SelectEventProductSet = ({
|
|
|
202
199
|
</Form.Group>
|
|
203
200
|
</div>
|
|
204
201
|
{showEditProductSet && productSetId && (
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
<>
|
|
203
|
+
<EditEventProductSet
|
|
204
|
+
onSubmit={onSubmit}
|
|
205
|
+
defaultValues={
|
|
206
|
+
productSetId === editedProductSet?.id && editedProductSet
|
|
207
|
+
}
|
|
208
|
+
/>
|
|
209
|
+
</>
|
|
212
210
|
)}
|
|
213
211
|
</>
|
|
214
212
|
);
|
|
@@ -5,7 +5,6 @@ import { isEqual } from "lodash";
|
|
|
5
5
|
import { useParams } from "react-router-dom";
|
|
6
6
|
import { useEventEditProductSetContext } from "@licklist/plugins/dist/context/event/EventEditProductSetContext";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
9
8
|
import { BlockLoader } from "../../../../../static/loader/BlockLoader";
|
|
10
9
|
import { ProductSetControl } from "../../../../../product-set";
|
|
11
10
|
import { ProductSetContextProvider } from "../../../../../product-set/form/context";
|
|
@@ -23,13 +22,11 @@ export interface EventDates {
|
|
|
23
22
|
interface EditEventProductSetProps {
|
|
24
23
|
onSubmit: (value: EditEventFormValues["editedProductSet"]) => void;
|
|
25
24
|
defaultValues?: EditEventFormValues["editedProductSet"];
|
|
26
|
-
workHours: WorkHour[] | undefined;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
export const EditEventProductSet = ({
|
|
30
28
|
onSubmit,
|
|
31
29
|
defaultValues,
|
|
32
|
-
workHours,
|
|
33
30
|
}: EditEventProductSetProps) => {
|
|
34
31
|
const { companyId } = useParams<{
|
|
35
32
|
companyId: string;
|
|
@@ -127,7 +124,6 @@ export const EditEventProductSet = ({
|
|
|
127
124
|
companyName={selectedCompany?.title}
|
|
128
125
|
fee={feeInPercent}
|
|
129
126
|
isEventEditProductSet
|
|
130
|
-
workHours={workHours}
|
|
131
127
|
/>
|
|
132
128
|
<Button
|
|
133
129
|
disabled={isLoading}
|
|
@@ -13,14 +13,12 @@ export type ActivityCardProps = {
|
|
|
13
13
|
onSelect: () => void;
|
|
14
14
|
isSelected: boolean;
|
|
15
15
|
layout?: Layout;
|
|
16
|
-
availableTimes?: string | null;
|
|
17
16
|
};
|
|
18
17
|
|
|
19
18
|
export const ActivityCard = ({
|
|
20
19
|
title,
|
|
21
20
|
duration,
|
|
22
21
|
price,
|
|
23
|
-
availableTimes,
|
|
24
22
|
// image,
|
|
25
23
|
onSelect,
|
|
26
24
|
isSelected,
|
|
@@ -35,6 +33,7 @@ export const ActivityCard = ({
|
|
|
35
33
|
>
|
|
36
34
|
<div className={clsx("d-flex", "flex-column")}>
|
|
37
35
|
<div className="activity-card-title">{title}</div>
|
|
36
|
+
|
|
38
37
|
{duration && <div>{duration}</div>}
|
|
39
38
|
|
|
40
39
|
{price && <div>{price}</div>}
|
|
@@ -51,8 +50,7 @@ export const ActivityCard = ({
|
|
|
51
50
|
})}
|
|
52
51
|
>
|
|
53
52
|
<div className="description">
|
|
54
|
-
<div className="title
|
|
55
|
-
{availableTimes && <div>{availableTimes}</div>}
|
|
53
|
+
<div className="title">{title}</div>
|
|
56
54
|
{duration && (
|
|
57
55
|
<div>
|
|
58
56
|
<p>{duration}</p>
|
|
@@ -29,7 +29,6 @@ interface IframeEventCardProps {
|
|
|
29
29
|
titleId?: string;
|
|
30
30
|
descriptionId?: string;
|
|
31
31
|
imageClassName?: string;
|
|
32
|
-
showMoreInfo?: boolean;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
export function IframeEventCard({
|
|
@@ -47,7 +46,6 @@ export function IframeEventCard({
|
|
|
47
46
|
titleId,
|
|
48
47
|
descriptionId,
|
|
49
48
|
imageClassName,
|
|
50
|
-
showMoreInfo,
|
|
51
49
|
}: IframeEventCardProps) {
|
|
52
50
|
const { formatNumber } = useIntl();
|
|
53
51
|
const { t } = useTranslation("Design");
|
|
@@ -72,7 +70,6 @@ export function IframeEventCard({
|
|
|
72
70
|
)}
|
|
73
71
|
onClick={goToDetails ? onClick : undefined}
|
|
74
72
|
>
|
|
75
|
-
{showMoreInfo && <div className="iframe-event-card__info-icon">i</div>}
|
|
76
73
|
{imageSrc && (
|
|
77
74
|
<Card.Img
|
|
78
75
|
className={imageClassName ?? "card-image"}
|
|
@@ -94,8 +91,12 @@ export function IframeEventCard({
|
|
|
94
91
|
<div className="icon-wrapper">
|
|
95
92
|
<CalendarSvg />
|
|
96
93
|
</div>
|
|
97
|
-
<p className="m-0 list-view-hided">
|
|
98
|
-
|
|
94
|
+
<p className="iframe-event-card__bold m-0 list-view-hided">
|
|
95
|
+
{date}
|
|
96
|
+
</p>
|
|
97
|
+
<p className="iframe-event-card__bold m-0 grid-view-hided">
|
|
98
|
+
{shortDate}
|
|
99
|
+
</p>
|
|
99
100
|
</div>
|
|
100
101
|
</Card.Text>
|
|
101
102
|
|
|
@@ -105,7 +106,7 @@ export function IframeEventCard({
|
|
|
105
106
|
<div className="icon-wrapper">
|
|
106
107
|
<ClockSvg />
|
|
107
108
|
</div>
|
|
108
|
-
<p className="m-0">{type}</p>
|
|
109
|
+
<p className="iframe-event-card__bold m-0">{type}</p>
|
|
109
110
|
</div>
|
|
110
111
|
</Card.Text>
|
|
111
112
|
)}
|
|
@@ -116,7 +117,7 @@ export function IframeEventCard({
|
|
|
116
117
|
<div className="icon-wrapper">
|
|
117
118
|
<TicketSvg />
|
|
118
119
|
</div>
|
|
119
|
-
<p className="m-0">
|
|
120
|
+
<p className="iframe-event-card__bold m-0">
|
|
120
121
|
{t("from")}{" "}
|
|
121
122
|
{formatNumber(cost, { style: "currency", currency: "GBP" })}
|
|
122
123
|
</p>
|
package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx
CHANGED
|
@@ -90,7 +90,7 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
90
90
|
type="number"
|
|
91
91
|
onChange={(e) => handleChangeValue(Number(e.target.value))}
|
|
92
92
|
value={value}
|
|
93
|
-
min={
|
|
93
|
+
min={min}
|
|
94
94
|
max={max}
|
|
95
95
|
defaultValue={defaultValue}
|
|
96
96
|
placeholder={placeholder}
|
|
@@ -25,6 +25,6 @@ export const COLLAPSE_MARGIN = 36;
|
|
|
25
25
|
|
|
26
26
|
export const PAGE_LEFT_BLOCK_CONTAINER_ID = "page-left-block-container";
|
|
27
27
|
export const PAGE_CALENDAR_SELECT_WRAPPER = "calendar-select-wrapper";
|
|
28
|
-
export const
|
|
28
|
+
export const PAYMENT_LINK_PAGE_BODY = "payment_link_page_body";
|
|
29
29
|
|
|
30
30
|
export const PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
PAGE_LEFT_BLOCK_CONTAINER_ID,
|
|
17
17
|
PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,
|
|
18
18
|
PAGE_CALENDAR_SELECT_WRAPPER,
|
|
19
|
-
|
|
19
|
+
PAYMENT_LINK_PAGE_BODY,
|
|
20
20
|
} from "../constants";
|
|
21
21
|
import { ChangeRightBlockHeightEvent } from "../types";
|
|
22
22
|
|
|
@@ -52,10 +52,10 @@ export const useResizePageBody = () => {
|
|
|
52
52
|
? calenderWrapper.clientHeight
|
|
53
53
|
: 0;
|
|
54
54
|
|
|
55
|
-
const paymentLinkPageBody = document.getElementById(
|
|
55
|
+
const paymentLinkPageBody = document.getElementById(PAYMENT_LINK_PAGE_BODY);
|
|
56
56
|
if (paymentLinkPageBody) {
|
|
57
57
|
paymentLinkPageBody.scroll({
|
|
58
|
-
top: -
|
|
58
|
+
top: -rightBlockHeight,
|
|
59
59
|
behavior: "smooth",
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -63,7 +63,7 @@ const processedPaymentSummary = ({
|
|
|
63
63
|
const total = calculateTotalPrice(order, externalPaymentDetail);
|
|
64
64
|
|
|
65
65
|
const totalDiscount = calculateTotalDiscount(order.payments);
|
|
66
|
-
|
|
66
|
+
const totalWithDiscount = total - Number(totalDiscount);
|
|
67
67
|
let summaryItems: SummaryItem[] = [
|
|
68
68
|
{
|
|
69
69
|
translateKey: AMOUNT_TOTAL,
|
|
@@ -74,7 +74,7 @@ const processedPaymentSummary = ({
|
|
|
74
74
|
if (totalDiscount) {
|
|
75
75
|
summaryItems.push({
|
|
76
76
|
translateKey: AMOUNT_WITH_DISCOUNT,
|
|
77
|
-
price:
|
|
77
|
+
price: totalWithDiscount < 0 ? 0 : totalWithDiscount,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -84,17 +84,17 @@ const processedPaymentSummary = ({
|
|
|
84
84
|
|
|
85
85
|
summaryItems.push({
|
|
86
86
|
translateKey: TOTAL_PAID,
|
|
87
|
-
price: order.
|
|
87
|
+
price: totalWithDiscount <= 0 ? 0 : order.totalAmount,
|
|
88
88
|
});
|
|
89
|
-
if (
|
|
89
|
+
if (totalWithDiscount <= 0) {
|
|
90
90
|
return summaryItems;
|
|
91
91
|
}
|
|
92
92
|
summaryItems = [...summaryItems, ...externalPaymentDetail];
|
|
93
93
|
|
|
94
|
-
if (order.
|
|
94
|
+
if (totalWithDiscount > order.totalAmount) {
|
|
95
95
|
summaryItems.push({
|
|
96
96
|
translateKey: REMAINING_TO_PAY,
|
|
97
|
-
price: order.
|
|
97
|
+
price: totalWithDiscount - order.totalAmount,
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
return summaryItems;
|
|
@@ -16,7 +16,7 @@ import { PaymentTimer } from "./PaymentTimer";
|
|
|
16
16
|
import { Page, PageBody } from "../../page";
|
|
17
17
|
import { BookingSummary } from "../../order-process";
|
|
18
18
|
import { cartSumByOrderProducts } from "../../order-process/components/BookingSummary/utils";
|
|
19
|
-
import {
|
|
19
|
+
import { PAYMENT_LINK_PAGE_BODY } from "../../page/components/PageBody/constants";
|
|
20
20
|
|
|
21
21
|
export interface PaymentMetadata {
|
|
22
22
|
total: number;
|
|
@@ -126,7 +126,7 @@ export const PaymentPage = ({
|
|
|
126
126
|
onCloseButtonClick={isIframePayment ? onGoBack : undefined}
|
|
127
127
|
/> */}
|
|
128
128
|
<PageBody
|
|
129
|
-
id={
|
|
129
|
+
id={PAYMENT_LINK_PAGE_BODY}
|
|
130
130
|
leftBlock={
|
|
131
131
|
<PageBody.LeftBlock>
|
|
132
132
|
<div className="d-flex align-items-center mb-5">
|
|
@@ -12,8 +12,6 @@ import {
|
|
|
12
12
|
RYFT_STATUS_PENDING_ACTION,
|
|
13
13
|
AttemptPaymentResponse,
|
|
14
14
|
} from "@licklist/plugins/dist/hooks/Ryft/useRyftPayment";
|
|
15
|
-
import { ProviderPaymentSettings } from "@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper";
|
|
16
|
-
|
|
17
15
|
import { BlockLoader, ButtonLoader } from "../../static";
|
|
18
16
|
import { injectComponentsInRyftForm } from "./utils/ryft-form";
|
|
19
17
|
|
|
@@ -42,13 +40,11 @@ export interface RyftPaymentFormProps {
|
|
|
42
40
|
) => Promise<void>;
|
|
43
41
|
onSubmit: () => Promise<AttemptPaymentResponse>;
|
|
44
42
|
resetReferrer?: () => void;
|
|
45
|
-
providerPaymentSettings?: ProviderPaymentSettings;
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
export const RyftPaymentForm = ({
|
|
49
46
|
accountId,
|
|
50
47
|
isCreateLoading,
|
|
51
|
-
providerPaymentSettings,
|
|
52
48
|
initRyft,
|
|
53
49
|
resetReferrer,
|
|
54
50
|
onSubmit,
|
|
@@ -123,26 +119,13 @@ export const RyftPaymentForm = ({
|
|
|
123
119
|
};
|
|
124
120
|
|
|
125
121
|
useEffect(
|
|
126
|
-
() => {
|
|
127
|
-
if (
|
|
128
|
-
!formRef.current?.childNodes?.length ||
|
|
129
|
-
formRef.current?.childNodes?.length < 3 ||
|
|
130
|
-
!accountId.data?.account_id
|
|
131
|
-
) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
injectComponentsInRyftForm({
|
|
135
|
-
t,
|
|
136
|
-
additionalPaymentMethodsEnabled:
|
|
137
|
-
providerPaymentSettings?.additionalPaymentMethodsEnabled,
|
|
138
|
-
});
|
|
139
|
-
},
|
|
122
|
+
() => injectComponentsInRyftForm({ t }),
|
|
140
123
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
141
124
|
[formRef.current?.childNodes?.length]
|
|
142
125
|
);
|
|
143
126
|
|
|
144
127
|
useEffect(() => {
|
|
145
|
-
if (!accountId.data
|
|
128
|
+
if (!accountId.data || accountId.isError) return;
|
|
146
129
|
|
|
147
130
|
initRyft(
|
|
148
131
|
() => {
|
|
@@ -156,7 +139,7 @@ export const RyftPaymentForm = ({
|
|
|
156
139
|
);
|
|
157
140
|
|
|
158
141
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
159
|
-
}, [accountId.data
|
|
142
|
+
}, [accountId.data]);
|
|
160
143
|
|
|
161
144
|
if (accountId.isLoading || accountId.isFetching || isCreateLoading)
|
|
162
145
|
return (
|
|
@@ -2,18 +2,17 @@ import { TFunction } from "react-i18next";
|
|
|
2
2
|
|
|
3
3
|
export const injectComponentsInRyftForm = ({
|
|
4
4
|
t,
|
|
5
|
-
additionalPaymentMethodsEnabled,
|
|
6
5
|
}: {
|
|
7
6
|
t: TFunction<string[]>;
|
|
8
|
-
additionalPaymentMethodsEnabled?: boolean;
|
|
9
7
|
}) => {
|
|
10
8
|
const cardContainer = document.getElementById("ryft-pay-iframe");
|
|
9
|
+
const oldCardDividerContainer = document.getElementById(
|
|
10
|
+
"card-title-container"
|
|
11
|
+
);
|
|
11
12
|
|
|
12
|
-
if (!cardContainer) {
|
|
13
|
+
if (!cardContainer || oldCardDividerContainer) {
|
|
13
14
|
return;
|
|
14
15
|
}
|
|
15
|
-
// Removing of the old title container
|
|
16
|
-
document.getElementById("card-title-container")?.remove();
|
|
17
16
|
|
|
18
17
|
const cardTitle = document.createElement("div");
|
|
19
18
|
const cardText = document.createElement("div");
|
|
@@ -27,14 +26,10 @@ export const injectComponentsInRyftForm = ({
|
|
|
27
26
|
|
|
28
27
|
const payGrid = document.getElementById("ryft-pay-grid");
|
|
29
28
|
|
|
30
|
-
if (!payGrid
|
|
29
|
+
if (!payGrid) {
|
|
31
30
|
return;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
// Removing of the old mobile title container and divider container
|
|
35
|
-
document.getElementById("mobile-pay-title")?.remove();
|
|
36
|
-
document.getElementById("mobile-pay-divider-container")?.remove();
|
|
37
|
-
|
|
38
33
|
// Adding title and divider for apple and google pay button
|
|
39
34
|
const mobilePayTitle = document.createElement("div");
|
|
40
35
|
const dividerText = document.createElement("div");
|
|
@@ -42,7 +37,6 @@ export const injectComponentsInRyftForm = ({
|
|
|
42
37
|
const container = document.createElement("div");
|
|
43
38
|
mobilePayTitle.className = "mobile-pay-title";
|
|
44
39
|
mobilePayTitle.innerText = t("Design:expressCheckoutWith");
|
|
45
|
-
mobilePayTitle.id = "mobile-pay-title";
|
|
46
40
|
dividerText.id = "mobile-pay-divider-text";
|
|
47
41
|
dividerText.innerText = "or";
|
|
48
42
|
divider.id = "mobile-pay-divider";
|
|
@@ -36,7 +36,7 @@ export interface DateAndRecurrenceInputValues {
|
|
|
36
36
|
|
|
37
37
|
interface DateAndRecurrenceInputProps {
|
|
38
38
|
isEventEditProductSet?: boolean;
|
|
39
|
-
workHours
|
|
39
|
+
workHours?: WorkHour[];
|
|
40
40
|
providerHasBookingManagement: boolean;
|
|
41
41
|
isLoading?: boolean;
|
|
42
42
|
}
|
|
@@ -90,7 +90,7 @@ export const DateAndRecurrenceInput = ({
|
|
|
90
90
|
clearEditState();
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
const popoverId = useId()
|
|
93
|
+
const popoverId = useId()!;
|
|
94
94
|
|
|
95
95
|
const { t } = useTranslation("Design");
|
|
96
96
|
|
|
@@ -228,7 +228,6 @@ export const DateAndRecurrenceInput = ({
|
|
|
228
228
|
defaultValues={editState.values}
|
|
229
229
|
onChange={handleRecurringDateChange}
|
|
230
230
|
onDelete={handleDelete}
|
|
231
|
-
workHours={workHours}
|
|
232
231
|
>
|
|
233
232
|
{providerHasBookingManagement && (
|
|
234
233
|
<AvailableTimesControl
|
|
@@ -5,8 +5,9 @@ import { Form, OverlayTrigger, Popover } from "react-bootstrap";
|
|
|
5
5
|
import { useFieldArray, useFormContext } from "react-hook-form";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import { useClickAway } from "react-use";
|
|
8
|
-
import { TIMEZONE
|
|
8
|
+
import { TIMEZONE } from "@licklist/core/dist/Config/Date";
|
|
9
9
|
import { ProductSetRecurrence } from "@licklist/core/dist/DataMapper/Product/ProductSetRecurrenceDataMapper";
|
|
10
|
+
import { TIME_FORMAT } from "@licklist/core/dist/Config/Date";
|
|
10
11
|
import { DateTime } from "luxon";
|
|
11
12
|
import RRule, { Frequency } from "rrule";
|
|
12
13
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
@@ -26,6 +27,7 @@ import {
|
|
|
26
27
|
import { ProductSetRecurrenceOverridesControl } from "./ProductSetRecurrenceOverridesControl";
|
|
27
28
|
import { MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE } from "../product/constants";
|
|
28
29
|
|
|
30
|
+
|
|
29
31
|
export interface DateAndRecurrenceInputValues {
|
|
30
32
|
menuRecurrences?: Partial<ProductSetRecurrence>[];
|
|
31
33
|
}
|
|
@@ -57,7 +59,7 @@ export const DateInput = ({
|
|
|
57
59
|
control,
|
|
58
60
|
keyName: "_id",
|
|
59
61
|
});
|
|
60
|
-
|
|
62
|
+
|
|
61
63
|
const [isDatePopoverVisible, setIsDatePopoverVisible] = useState(false);
|
|
62
64
|
const availableTimesFormRef = useRef<AvailableTimesControlRef>();
|
|
63
65
|
const [editState, setEditState] = useState<{
|
|
@@ -92,7 +94,6 @@ export const DateInput = ({
|
|
|
92
94
|
// Hotfix for an issue with Popover close & open actions
|
|
93
95
|
setTimeout(() => {
|
|
94
96
|
setEditState({ index, values: next });
|
|
95
|
-
setAvailableTimes(next.availableTimes || []);
|
|
96
97
|
setIsDatePopoverVisible(() => true);
|
|
97
98
|
}, 100);
|
|
98
99
|
};
|
|
@@ -220,7 +221,7 @@ export const DateInput = ({
|
|
|
220
221
|
workHours={workHours}
|
|
221
222
|
isLoading={isLoading}
|
|
222
223
|
ref={availableTimesFormRef}
|
|
223
|
-
defaultValues={
|
|
224
|
+
defaultValues={[]}
|
|
224
225
|
errorMessage={
|
|
225
226
|
errors?.menuRecurrences?.[`${editState?.index}`]
|
|
226
227
|
?.availableTimes?.message
|
|
@@ -85,7 +85,7 @@ export interface ProductSetControlProps {
|
|
|
85
85
|
fieldSets?: FieldSet[];
|
|
86
86
|
showEmailTemplate?: boolean;
|
|
87
87
|
showSmsTemplate?: boolean;
|
|
88
|
-
workHours
|
|
88
|
+
workHours?: WorkHour[];
|
|
89
89
|
providerHasBookingManagement?: boolean;
|
|
90
90
|
isOverrides?: boolean;
|
|
91
91
|
}
|
|
@@ -26,16 +26,12 @@ 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
|
-
|
|
34
|
+
WithId,
|
|
39
35
|
ProductSetControlValues {
|
|
40
36
|
steps: Step[];
|
|
41
37
|
isOverrides?: boolean;
|
|
@@ -24,10 +24,8 @@ export const useSortableTreeFunctions = ({
|
|
|
24
24
|
const cancelChanges = (index: number) => {
|
|
25
25
|
if (isOverrides) return;
|
|
26
26
|
if (!previousValue) {
|
|
27
|
-
// eslint-disable-next-line consistent-return
|
|
28
27
|
return remove(index);
|
|
29
28
|
}
|
|
30
|
-
// eslint-disable-next-line consistent-return
|
|
31
29
|
return setValue(`${fieldName}.${index}` as const, previousValue);
|
|
32
30
|
};
|
|
33
31
|
|
|
@@ -7,17 +7,14 @@ 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,
|
|
19
15
|
} from "@licklist/plugins/dist/types/services/Form/hook-form-service";
|
|
20
16
|
import { useId } from "@react-aria/utils";
|
|
17
|
+
import clsx from "clsx";
|
|
21
18
|
import React, {
|
|
22
19
|
ChangeEvent,
|
|
23
20
|
useCallback,
|
|
@@ -39,7 +36,7 @@ import {
|
|
|
39
36
|
} from "react-hook-form";
|
|
40
37
|
import { useTranslation } from "react-i18next";
|
|
41
38
|
import { useImages } from "@licklist/plugins/dist/hooks/Media/useImages";
|
|
42
|
-
|
|
39
|
+
import { PRODUCT_DEfAULT_COLORS } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
43
40
|
import {
|
|
44
41
|
Image,
|
|
45
42
|
IMAGE_TYPE_IMAGE,
|
|
@@ -149,7 +146,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
149
146
|
clearErrors,
|
|
150
147
|
} = useFormContext<T>();
|
|
151
148
|
|
|
152
|
-
const { setLoading
|
|
149
|
+
const { setLoading } = useContext(ProductSetLoadingContext);
|
|
153
150
|
const { t } = useTranslation(["Design", "Validation", "ProductSet"]);
|
|
154
151
|
const [expanded, setExpanded] = useState(false);
|
|
155
152
|
const [initialImages, setInitialImages] = useState<Image[] | null>(null);
|
|
@@ -162,8 +159,8 @@ export function ProductControl<T extends FormValues>({
|
|
|
162
159
|
|
|
163
160
|
const advancedId = useId();
|
|
164
161
|
const nameId = useId();
|
|
165
|
-
|
|
166
|
-
const productGroupId = useId();
|
|
162
|
+
// @TODO: no need for v1 release
|
|
163
|
+
// const productGroupId = useId();
|
|
167
164
|
const descriptionId = useId();
|
|
168
165
|
const termsAndConditionsId = useId();
|
|
169
166
|
const isAvailableId = useId();
|
|
@@ -403,35 +400,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
403
400
|
isRequired={false}
|
|
404
401
|
defaultColors={PRODUCT_DEfAULT_COLORS}
|
|
405
402
|
/>
|
|
406
|
-
|
|
407
|
-
<Form.Group controlId={productGroupId}>
|
|
408
|
-
<Form.Label>{t("productGroup")}</Form.Label>
|
|
409
|
-
<Form.Control
|
|
410
|
-
as="select"
|
|
411
|
-
{...register(`${fieldNamePrefix}.productGroupId` as Path<T>)}
|
|
412
|
-
isInvalid={HookFormService.isInvalid<T>(
|
|
413
|
-
`${fieldNamePrefix}.productGroupId` as Path<T>,
|
|
414
|
-
errors
|
|
415
|
-
)}
|
|
416
|
-
disabled={isLoading}
|
|
417
|
-
defaultValue=""
|
|
418
|
-
>
|
|
419
|
-
<option value="">{t("Design:selectProductGroup")}</option>
|
|
420
|
-
{productGroupList.map((productGroup) => {
|
|
421
|
-
return (
|
|
422
|
-
<option value={productGroup.id} key={productGroup.id}>
|
|
423
|
-
{productGroup.value}
|
|
424
|
-
</option>
|
|
425
|
-
);
|
|
426
|
-
})}
|
|
427
|
-
</Form.Control>
|
|
428
|
-
<Form.Control.Feedback type="invalid">
|
|
429
|
-
{HookFormService.getErrors<T>(
|
|
430
|
-
`${fieldNamePrefix}.productGroupId` as Path<T>,
|
|
431
|
-
errors
|
|
432
|
-
)}
|
|
433
|
-
</Form.Control.Feedback>
|
|
434
|
-
</Form.Group>
|
|
435
403
|
</Col>
|
|
436
404
|
</Row>
|
|
437
405
|
|
|
@@ -704,6 +672,38 @@ export function ProductControl<T extends FormValues>({
|
|
|
704
672
|
</Collapse>
|
|
705
673
|
|
|
706
674
|
<Row>
|
|
675
|
+
{/* @TODO: no need for v1 release
|
|
676
|
+
<Col xs={12} sm={6}>
|
|
677
|
+
<Form.Group controlId={productGroupId}>
|
|
678
|
+
<Form.Label>{t("productGroup")}</Form.Label>
|
|
679
|
+
<Form.Control
|
|
680
|
+
as="select"
|
|
681
|
+
{...register(`${fieldNamePrefix}.productGroupId` as Path<T>)}
|
|
682
|
+
isInvalid={HookFormService.isInvalid<T>(
|
|
683
|
+
`${fieldNamePrefix}.productGroupId` as Path<T>,
|
|
684
|
+
errors
|
|
685
|
+
)}
|
|
686
|
+
disabled={isLoading}
|
|
687
|
+
defaultValue=""
|
|
688
|
+
>
|
|
689
|
+
<option value="">{t("Design:selectProductGroup")}</option>
|
|
690
|
+
{productGroupList.map((productGroup) => {
|
|
691
|
+
return (
|
|
692
|
+
<option value={productGroup.id} key={productGroup.id}>
|
|
693
|
+
{productGroup.value}
|
|
694
|
+
</option>
|
|
695
|
+
);
|
|
696
|
+
})}
|
|
697
|
+
</Form.Control>
|
|
698
|
+
<Form.Control.Feedback type="invalid">
|
|
699
|
+
{HookFormService.getErrors<T>(
|
|
700
|
+
`${fieldNamePrefix}.productGroupId` as Path<T>,
|
|
701
|
+
errors
|
|
702
|
+
)}
|
|
703
|
+
</Form.Control.Feedback>
|
|
704
|
+
</Form.Group>
|
|
705
|
+
</Col> */}
|
|
706
|
+
|
|
707
707
|
<Col xs={12}>
|
|
708
708
|
{hasBookingManagement && (
|
|
709
709
|
<ProductBookingManagementControl<T>
|