@licklist/design 0.67.1 → 0.67.2-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.
- package/.storybook/main.cjs +15 -12
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +35 -40
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +2 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/layout/DropDownToggle.d.ts.map +1 -1
- package/dist/layout/DropDownToggle.js +1 -0
- 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 -0
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +2 -2
- 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/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +48 -2
- package/dist/product-set/form/ProductSetForm.d.ts +4 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +60 -2
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +0 -2
- package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +0 -3
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +0 -3
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.js +2 -1
- package/dist/provider/location-input/LocationInput.d.ts +4 -1
- package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
- package/dist/provider/location-input/LocationInput.js +46 -2
- package/dist/provider/location-input/index.d.ts +1 -0
- package/dist/provider/location-input/index.d.ts.map +1 -1
- package/dist/provider/provider-form/ProviderForm.d.ts +3 -1
- package/dist/provider/provider-form/ProviderForm.d.ts.map +1 -1
- package/dist/provider/provider-form/ProviderForm.js +26 -5
- package/dist/provider/venue-form/VenueForm.d.ts +3 -1
- package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
- package/dist/provider/venue-form/VenueForm.js +4 -2
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +4 -8
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +3 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +6 -3
- package/dist/recurring-date-picker-input/utils.d.ts +5 -0
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +75 -3
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +6 -0
- package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +10 -4
- package/dist/styles/auth/AccessDenied.scss +1 -1
- package/dist/styles/back-button/BackButton.scss +25 -24
- package/dist/styles/back-button/_index.scss +1 -1
- package/dist/styles/company-user-form/UserForm.scss +4 -7
- package/dist/styles/company-user-form/_index.scss +1 -1
- package/dist/styles/custom-fields/CreateSortableListItem.scss +2 -1
- package/dist/styles/custom-fields/_index.scss +1 -1
- package/dist/styles/customers/Filter.scss +5 -5
- package/dist/styles/events/EditEventModal.scss +1 -3
- package/dist/styles/events/EventVenueMap.scss +7 -7
- package/dist/styles/form/Input.scss +1 -1
- package/dist/styles/header/Header.scss +1 -1
- package/dist/styles/header/elements/CompanySelector.scss +2 -2
- package/dist/styles/iframe-events/Calendar.scss +0 -1
- package/dist/styles/iframe-events/CalendarSelect.scss +1 -1
- package/dist/styles/iframe-events/CategoryStepsForm.scss +6 -7
- package/dist/styles/iframe-events/Event.scss +2 -4
- package/dist/styles/iframe-events/EventForm.scss +54 -54
- package/dist/styles/iframe-events/EventNavigationFooter.scss +1 -0
- package/dist/styles/iframe-events/TicketDescription.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/iframe-payments/PaymentForm.scss +1 -1
- package/dist/styles/layout/BackgroundVideoContainer.scss +2 -2
- package/dist/styles/notification/Notification.scss +1 -1
- package/dist/styles/order-items-table/OrderItemsTable.scss +1 -2
- package/dist/styles/product-set/CreateProductSetItem.scss +15 -13
- package/dist/styles/product-set/DateAndRecurrenceInput.scss +6 -8
- package/dist/styles/product-set/EditCategoryModal.scss +4 -4
- package/dist/styles/product-set/EditProductModal.scss +3 -3
- package/dist/styles/product-set/EditStepModal.scss +4 -4
- package/dist/styles/product-set/EditVenueMapSetModal.scss +6 -6
- package/dist/styles/product-set/ProductSetForm.scss +25 -2
- package/dist/styles/product-set/TutorialGifCard.scss +1 -1
- package/dist/styles/product-set/_index.scss +2 -2
- package/dist/styles/report/ReportCard.scss +1 -0
- package/dist/styles/report/_index.scss +1 -1
- package/dist/styles/resources-blocking/_index.scss +4 -0
- package/dist/styles/sales/BookingFilter.scss +2 -2
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/BookingTabs.scss +7 -5
- package/dist/styles/sales/Filters.scss +5 -4
- package/dist/styles/sales/GuestProfile.scss +170 -175
- package/dist/styles/sales/LifeTimeSales.scss +1 -1
- package/dist/styles/sales/ManualBooking.scss +4 -2
- package/dist/styles/snippet-templates/_snippetVariables.scss +63 -244
- package/dist/styles/sortable-field/SortableField.scss +16 -16
- package/dist/styles/sortable-field/_index.scss +1 -1
- package/dist/styles/sortable-tree/Item.scss +4 -4
- package/dist/styles/table/Table.scss +1 -1
- package/dist/styles/themes/bookedit/_variables.scss +10 -32
- package/dist/styles/themes/licklist/_variables.scss +1 -1
- package/dist/styles/tiptap-editor/TiptapEditor.scss +9 -10
- package/dist/styles/tiptap-editor/_index.scss +1 -1
- package/dist/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
- package/dist/styles/virtualized/_index.scss +1 -1
- package/dist/styles/zones/ZoneForm.scss +1 -0
- package/dist/styles/zones/ZoneRecurrencesControl.scss +6 -8
- 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 +3 -2
- 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 +4 -2
- 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 +4 -2
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -1
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -1
- package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +31 -28
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/header/elements/Elements.stories.tsx +1 -1
- package/src/help/popover/Popover.stories.tsx +1 -1
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -3
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
- package/src/layout/DropDown.tsx +2 -1
- package/src/layout/DropDownToggle.tsx +2 -0
- package/src/product-set/card/ProductSetCard.stories.tsx +3 -1
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -4
- package/src/product-set/control/DateInput.tsx +2 -1
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +2 -2
- package/src/product-set/form/ProductCategoriesControl.tsx +38 -2
- package/src/product-set/form/ProductSetForm.tsx +22 -3
- package/src/product-set/form/ProductZonesControl.tsx +4 -7
- package/src/product-set/form/SelectCategoryModal.stories.tsx +1 -1
- package/src/product-set/form/SelectCategoryModal.tsx +2 -2
- package/src/product-set/form/SubProductsControl.tsx +0 -3
- package/src/product-set/form/VenueMapsControl.tsx +0 -3
- package/src/product-set/hooks/useSortableTreeFunctions.ts +2 -0
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +5 -5
- package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
- package/src/product-set/product/quantity/ProductQuantity.stories.tsx +1 -1
- package/src/product-set/product-zone/ProductZoneControl.tsx +9 -9
- package/src/provider/location-input/LocationInput.tsx +40 -1
- package/src/provider/location-input/index.ts +1 -0
- package/src/provider/provider-form/ProviderForm.tsx +26 -2
- package/src/provider/venue-form/VenueForm.tsx +4 -1
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
- package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +11 -4
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +12 -1
- package/src/recurring-date-picker-input/utils.ts +91 -1
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/setting/admin/AdminSetting.stories.tsx +1 -0
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/system/SystemSetting.stories.tsx +1 -1
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -0
- package/src/sortable-tree/SortableTreeItem.tsx +13 -1
- package/src/styles/auth/AccessDenied.scss +1 -1
- package/src/styles/back-button/BackButton.scss +25 -24
- package/src/styles/back-button/_index.scss +1 -1
- package/src/styles/company-user-form/UserForm.scss +4 -7
- package/src/styles/company-user-form/_index.scss +1 -1
- package/src/styles/custom-fields/CreateSortableListItem.scss +2 -1
- package/src/styles/custom-fields/_index.scss +1 -1
- package/src/styles/customers/Filter.scss +5 -5
- package/src/styles/events/EditEventModal.scss +1 -3
- package/src/styles/events/EventVenueMap.scss +7 -7
- package/src/styles/form/Input.scss +1 -1
- package/src/styles/header/Header.scss +1 -1
- package/src/styles/header/elements/CompanySelector.scss +2 -2
- package/src/styles/iframe-events/Calendar.scss +0 -1
- package/src/styles/iframe-events/CalendarSelect.scss +1 -1
- package/src/styles/iframe-events/CategoryStepsForm.scss +6 -7
- package/src/styles/iframe-events/Event.scss +2 -4
- package/src/styles/iframe-events/EventForm.scss +54 -54
- package/src/styles/iframe-events/EventNavigationFooter.scss +1 -0
- package/src/styles/iframe-events/TicketDescription.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/iframe-payments/PaymentForm.scss +1 -1
- package/src/styles/layout/BackgroundVideoContainer.scss +2 -2
- package/src/styles/notification/Notification.scss +1 -1
- package/src/styles/order-items-table/OrderItemsTable.scss +1 -2
- package/src/styles/product-set/CreateProductSetItem.scss +15 -13
- package/src/styles/product-set/DateAndRecurrenceInput.scss +6 -8
- package/src/styles/product-set/EditCategoryModal.scss +4 -4
- package/src/styles/product-set/EditProductModal.scss +3 -3
- package/src/styles/product-set/EditStepModal.scss +4 -4
- package/src/styles/product-set/EditVenueMapSetModal.scss +6 -6
- package/src/styles/product-set/ProductSetForm.scss +25 -2
- package/src/styles/product-set/TutorialGifCard.scss +1 -1
- package/src/styles/product-set/_index.scss +2 -2
- package/src/styles/report/ReportCard.scss +1 -0
- package/src/styles/report/_index.scss +1 -1
- package/src/styles/resources-blocking/_index.scss +4 -0
- package/src/styles/sales/BookingFilter.scss +2 -2
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/BookingTabs.scss +7 -5
- package/src/styles/sales/Filters.scss +5 -4
- package/src/styles/sales/GuestProfile.scss +170 -175
- package/src/styles/sales/LifeTimeSales.scss +1 -1
- package/src/styles/sales/ManualBooking.scss +4 -2
- package/src/styles/snippet-templates/_snippetVariables.scss +63 -244
- package/src/styles/sortable-field/SortableField.scss +16 -16
- package/src/styles/sortable-field/_index.scss +1 -1
- package/src/styles/sortable-tree/Item.scss +4 -4
- package/src/styles/table/Table.scss +1 -1
- package/src/styles/themes/bookedit/_variables.scss +10 -32
- package/src/styles/themes/licklist/_variables.scss +1 -1
- package/src/styles/tiptap-editor/TiptapEditor.scss +9 -10
- package/src/styles/tiptap-editor/_index.scss +1 -1
- package/src/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
- package/src/styles/virtualized/_index.scss +1 -1
- package/src/styles/zones/ZoneForm.scss +1 -0
- package/src/styles/zones/ZoneRecurrencesControl.scss +6 -8
- package/src/tiptap-editor/TipTapEditor.stories.tsx +6 -4
- package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +5 -2
- package/src/zone/form/ZoneForm.tsx +3 -2
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +7 -5
- package/src/zone/form/utils/dates.ts +9 -10
- package/yarn.lock +103 -116
- package/dist/assets/iframe/selectArrow.svg.js +0 -17
|
@@ -86,7 +86,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
86
86
|
return target;
|
|
87
87
|
}
|
|
88
88
|
var ZoneForm = function(param) {
|
|
89
|
-
var defaultValues = param.defaultValues, onSubmit = param.onSubmit, serverErrors = param.serverErrors, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading;
|
|
89
|
+
var defaultValues = param.defaultValues, onSubmit = param.onSubmit, serverErrors = param.serverErrors, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, workHours = param.workHours;
|
|
90
90
|
var t = useTranslation("Design").t;
|
|
91
91
|
var form = useForm({
|
|
92
92
|
mode: "onChange",
|
|
@@ -121,7 +121,8 @@ var ZoneForm = function(param) {
|
|
|
121
121
|
onSubmit: handleSubmit(onFormSubmit),
|
|
122
122
|
children: [
|
|
123
123
|
/*#__PURE__*/ jsx(ZoneControl, {
|
|
124
|
-
isLoading: isLoading
|
|
124
|
+
isLoading: isLoading,
|
|
125
|
+
workHours: workHours
|
|
125
126
|
}),
|
|
126
127
|
/*#__PURE__*/ jsxs(Row, {
|
|
127
128
|
children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
2
2
|
export type ZoneControlProps = {
|
|
3
3
|
isLoading: boolean;
|
|
4
|
-
workHours
|
|
4
|
+
workHours: WorkHour[] | undefined;
|
|
5
5
|
};
|
|
6
|
-
export declare const ZoneControl: ({ isLoading }: ZoneControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ZoneControl: ({ isLoading, workHours }: ZoneControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=ZoneControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,
|
|
1
|
+
{"version":3,"file":"ZoneControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,6BAA8B,gBAAgB,4CA0BrE,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { ZoneImageControl } from './ZoneImageControl.js';
|
|
|
9
9
|
import { GameDurationControl } from './GameDurationControl.js';
|
|
10
10
|
|
|
11
11
|
var ZoneControl = function(param) {
|
|
12
|
-
var isLoading = param.isLoading;
|
|
12
|
+
var isLoading = param.isLoading, workHours = param.workHours;
|
|
13
13
|
return /*#__PURE__*/ jsx(Row, {
|
|
14
14
|
children: /*#__PURE__*/ jsxs(Col, {
|
|
15
15
|
md: 6,
|
|
@@ -19,7 +19,9 @@ var ZoneControl = function(param) {
|
|
|
19
19
|
/*#__PURE__*/ jsx(NameControl, {
|
|
20
20
|
isLoading: isLoading
|
|
21
21
|
}),
|
|
22
|
-
/*#__PURE__*/ jsx(ZoneRecurrencesControl, {
|
|
22
|
+
/*#__PURE__*/ jsx(ZoneRecurrencesControl, {
|
|
23
|
+
workHours: workHours
|
|
24
|
+
}),
|
|
23
25
|
/*#__PURE__*/ jsx("hr", {}),
|
|
24
26
|
/*#__PURE__*/ jsxs(Row, {
|
|
25
27
|
children: [
|
|
@@ -3,9 +3,9 @@ import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMa
|
|
|
3
3
|
export interface DateAndRecurrenceInputValues {
|
|
4
4
|
zoneRecurrences?: Partial<ZoneRecurrence>[];
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
workHours
|
|
8
|
-
isLoading?: boolean;
|
|
6
|
+
type ZoneRecurrenceControlProps = {
|
|
7
|
+
workHours: WorkHour[] | undefined;
|
|
9
8
|
};
|
|
10
|
-
export declare const ZoneRecurrencesControl: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ZoneRecurrencesControl: ({ workHours, }: ZoneRecurrenceControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
11
|
//# sourceMappingURL=ZoneRecurrencesControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneRecurrencesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneRecurrencesControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAC;AAMlG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAWtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;CAC7C;AAED,
|
|
1
|
+
{"version":3,"file":"ZoneRecurrencesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneRecurrencesControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAC;AAMlG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAWtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;CAC7C;AAED,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,mBAEhC,0BAA0B,4CAmM5B,CAAC"}
|
|
@@ -211,7 +211,8 @@ function _ts_generator(thisArg, body) {
|
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
var ZoneRecurrencesControl = function() {
|
|
214
|
+
var ZoneRecurrencesControl = function(param) {
|
|
215
|
+
var workHours = param.workHours;
|
|
215
216
|
var _errors_zoneRecurrences;
|
|
216
217
|
var _useFormContext = useFormContext(), control = _useFormContext.control, register = _useFormContext.register, errors = _useFormContext.formState.errors, getValues = _useFormContext.getValues, setValue = _useFormContext.setValue, clearErrors = _useFormContext.clearErrors;
|
|
217
218
|
var _useFieldArray = useFieldArray({
|
|
@@ -348,7 +349,8 @@ var ZoneRecurrencesControl = function() {
|
|
|
348
349
|
defaultValues: editState.values,
|
|
349
350
|
onChange: handleRecurringDateChange,
|
|
350
351
|
onDelete: handleDelete,
|
|
351
|
-
setInitialStartDateAfterSelect: true
|
|
352
|
+
setInitialStartDateAfterSelect: true,
|
|
353
|
+
workHours: workHours
|
|
352
354
|
})
|
|
353
355
|
})
|
|
354
356
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/utils/dates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAOtF,eAAO,MAAM,qBAAqB,cACrB,MAAM,WACR,MAAM,6BAuChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/utils/dates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAOtF,eAAO,MAAM,qBAAqB,cACrB,MAAM,WACR,MAAM,6BAuChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,QAAQ,EAAE,aAyC9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.67.
|
|
3
|
+
"version": "0.67.2-dev.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.
|
|
45
|
+
"@licklist/core": "0.28.6-dev.2",
|
|
46
46
|
"@licklist/eslint-config": "0.5.5",
|
|
47
|
-
"@licklist/plugins": "0.32.0",
|
|
47
|
+
"@licklist/plugins": "0.32.0-dev.0",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
49
|
"luxon": "1.26.0",
|
|
50
50
|
"react": "17.0.2",
|
|
@@ -61,10 +61,9 @@
|
|
|
61
61
|
"@dnd-kit/utilities": "2.0.0",
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
|
-
"@
|
|
65
|
-
"@licklist/core": "0.29.1",
|
|
64
|
+
"@licklist/core": "0.28.6-dev.1",
|
|
66
65
|
"@licklist/eslint-config": "0.5.5",
|
|
67
|
-
"@licklist/plugins": "0.
|
|
66
|
+
"@licklist/plugins": "0.30.4-dev.3",
|
|
68
67
|
"@mdx-js/react": "1.6.22",
|
|
69
68
|
"@popperjs/core": "2.11.8",
|
|
70
69
|
"@react-aria/utils": "3.9.0",
|
|
@@ -200,5 +199,6 @@
|
|
|
200
199
|
"volta": {
|
|
201
200
|
"node": "20.9.0",
|
|
202
201
|
"yarn": "4.4.0"
|
|
203
|
-
}
|
|
202
|
+
},
|
|
203
|
+
"stableVersion": "0.66.7-dev.5"
|
|
204
204
|
}
|
|
@@ -2,7 +2,7 @@ import { useCallback, useMemo } from "react";
|
|
|
2
2
|
import { Button } from "react-bootstrap";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { range } from "lodash";
|
|
5
|
-
import {
|
|
5
|
+
import { DateTime } from "luxon";
|
|
6
6
|
import { CalendarSelect } from "../CalendarSelect";
|
|
7
7
|
import { CalendarProps } from "../../Calendar";
|
|
8
8
|
|
|
@@ -26,15 +26,21 @@ export const CalendarButtons = ({
|
|
|
26
26
|
}: CalendarButtonsProps) => {
|
|
27
27
|
const { t } = useTranslation("Design");
|
|
28
28
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const onSelectMonth = useCallback(
|
|
30
|
+
(value: string) => {
|
|
31
|
+
const selectedMonth = Number(value);
|
|
32
|
+
const nextDateTime = currentDate.set({ month: selectedMonth });
|
|
33
|
+
|
|
34
|
+
if (nextDateTime <= initialDate) {
|
|
35
|
+
setCurrentDate(initialDate);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
setCurrentDate(nextDateTime);
|
|
40
|
+
},
|
|
36
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
-
|
|
42
|
+
[setCurrentDate, currentDate],
|
|
43
|
+
);
|
|
38
44
|
|
|
39
45
|
const yearOptions = useMemo(() => {
|
|
40
46
|
return range(initialDate.year, initialDate.year + 5, 1).map((year) => {
|
|
@@ -42,10 +48,18 @@ export const CalendarButtons = ({
|
|
|
42
48
|
});
|
|
43
49
|
}, [initialDate]);
|
|
44
50
|
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
const monthOptions = useMemo(() => {
|
|
52
|
+
const initialMonth =
|
|
53
|
+
currentDate.year > initialDate.year ? 1 : initialDate.month;
|
|
54
|
+
return range(initialMonth, 13).map((monthNumber) => {
|
|
55
|
+
return {
|
|
56
|
+
label: DateTime.fromObject({ month: monthNumber }).toLocaleString({
|
|
57
|
+
month: "long",
|
|
58
|
+
}),
|
|
59
|
+
value: monthNumber,
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
}, [initialDate, currentDate]);
|
|
49
63
|
|
|
50
64
|
const onSelectYear = (value: string) => {
|
|
51
65
|
const selectedYear = Number(value);
|
|
@@ -107,22 +121,11 @@ export const CalendarButtons = ({
|
|
|
107
121
|
<hr />
|
|
108
122
|
<div className="calendar-buttons">
|
|
109
123
|
<div className="buttons-wrapper">
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
>
|
|
116
|
-
<SelectArrow />
|
|
117
|
-
</Button>
|
|
118
|
-
<div className="month-title">{currentDate.toFormat("MMMM")}</div>
|
|
119
|
-
<Button
|
|
120
|
-
className="calendar-button"
|
|
121
|
-
onClick={onSelectNextMonth}
|
|
122
|
-
variant="link"
|
|
123
|
-
>
|
|
124
|
-
<SelectArrow />
|
|
125
|
-
</Button>
|
|
124
|
+
<CalendarSelect
|
|
125
|
+
options={monthOptions}
|
|
126
|
+
onChange={onSelectMonth}
|
|
127
|
+
value={currentDate.month}
|
|
128
|
+
/>
|
|
126
129
|
</div>
|
|
127
130
|
<CalendarSelect
|
|
128
131
|
options={yearOptions}
|
|
@@ -17,7 +17,7 @@ export const HelpPopoverPrimaryVariant: Story<HelpPopoverProps> = (args) => (
|
|
|
17
17
|
<HelpPopover {...args} />
|
|
18
18
|
);
|
|
19
19
|
export const HelpPopoverOutlinedInfoVariant: Story<HelpPopoverProps> = (
|
|
20
|
-
args
|
|
20
|
+
args
|
|
21
21
|
) => <HelpPopover {...args} />;
|
|
22
22
|
|
|
23
23
|
DefaultHelpPopover.args = {
|
|
@@ -260,9 +260,9 @@ export function Default() {
|
|
|
260
260
|
(point) =>
|
|
261
261
|
Boolean(
|
|
262
262
|
MENU_STEPS[0].pointProducts.find(
|
|
263
|
-
(pointProduct) => pointProduct.pointId === point.id
|
|
264
|
-
)
|
|
265
|
-
)
|
|
263
|
+
(pointProduct) => pointProduct.pointId === point.id
|
|
264
|
+
)
|
|
265
|
+
)
|
|
266
266
|
)}
|
|
267
267
|
pointProducts={MENU_STEPS[0].pointProducts}
|
|
268
268
|
usedInIframe={usedInIframe}
|
package/src/layout/DropDown.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
children?: React.ReactNode | React.ReactNode[];
|
|
@@ -24,4 +24,5 @@ const DropDown = forwardRef((props: Props, ref: any) => {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
DropDown.displayName = "DropDown";
|
|
27
|
+
|
|
27
28
|
export default DropDown;
|
|
@@ -9,7 +9,8 @@ export default {
|
|
|
9
9
|
|
|
10
10
|
export const Default: Story<ProductSetCardProps> = (args) => (
|
|
11
11
|
<ProductSetCard {...args} />
|
|
12
|
-
)
|
|
12
|
+
)
|
|
13
|
+
|
|
13
14
|
|
|
14
15
|
Default.args = {
|
|
15
16
|
href: "#",
|
|
@@ -17,3 +18,4 @@ Default.args = {
|
|
|
17
18
|
rrule: "FREQ=WEEKLY;BYDAY=WE",
|
|
18
19
|
hasPermission: true,
|
|
19
20
|
};
|
|
21
|
+
|
|
@@ -28,15 +28,13 @@ import {
|
|
|
28
28
|
AvailableTimesControlRef,
|
|
29
29
|
} from "../../zone/form/components/AvailableTimesControl";
|
|
30
30
|
|
|
31
|
-
// eslint-disable-next-line max-len
|
|
32
|
-
|
|
33
31
|
export interface DateAndRecurrenceInputValues {
|
|
34
32
|
menuRecurrences?: Partial<ProductSetRecurrence>[];
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
interface DateAndRecurrenceInputProps {
|
|
38
36
|
isEventEditProductSet?: boolean;
|
|
39
|
-
workHours
|
|
37
|
+
workHours: WorkHour[] | undefined;
|
|
40
38
|
providerHasBookingManagement: boolean;
|
|
41
39
|
isLoading?: boolean;
|
|
42
40
|
}
|
|
@@ -90,7 +88,7 @@ export const DateAndRecurrenceInput = ({
|
|
|
90
88
|
clearEditState();
|
|
91
89
|
});
|
|
92
90
|
|
|
93
|
-
const popoverId = useId()
|
|
91
|
+
const popoverId = useId();
|
|
94
92
|
|
|
95
93
|
const { t } = useTranslation("Design");
|
|
96
94
|
|
|
@@ -228,6 +226,7 @@ export const DateAndRecurrenceInput = ({
|
|
|
228
226
|
defaultValues={editState.values}
|
|
229
227
|
onChange={handleRecurringDateChange}
|
|
230
228
|
onDelete={handleDelete}
|
|
229
|
+
workHours={workHours}
|
|
231
230
|
>
|
|
232
231
|
{providerHasBookingManagement && (
|
|
233
232
|
<AvailableTimesControl
|
|
@@ -247,7 +247,8 @@ export const DateInput = ({
|
|
|
247
247
|
menuRecurrence={menuRecurrence}
|
|
248
248
|
onEdit={() => handleOnEdit(menuRecurrence, index)}
|
|
249
249
|
errorMessage={
|
|
250
|
-
errors?.menuRecurrences?.[`${index}`]?.availableTimes
|
|
250
|
+
errors?.menuRecurrences?.[`${index}`]?.availableTimes
|
|
251
|
+
?.message || errors?.menuRecurrences?.[`${index}`]?.message
|
|
251
252
|
}
|
|
252
253
|
/>
|
|
253
254
|
))}
|
|
@@ -88,7 +88,7 @@ export interface ProductSetControlProps {
|
|
|
88
88
|
fieldSets?: FieldSet[];
|
|
89
89
|
showEmailTemplate?: boolean;
|
|
90
90
|
showSmsTemplate?: boolean;
|
|
91
|
-
workHours
|
|
91
|
+
workHours: WorkHour[] | undefined;
|
|
92
92
|
providerHasBookingManagement?: boolean;
|
|
93
93
|
isOverrides?: boolean;
|
|
94
94
|
occurrenceStartAtDate?: string;
|
|
@@ -23,7 +23,7 @@ interface ProductSetRecurrences {
|
|
|
23
23
|
|
|
24
24
|
export const Default: Story<ProductSetRecurrences> = (args) => {
|
|
25
25
|
const [items, setItems] = useState(
|
|
26
|
-
args.menuRecurrences?.sort((a, b) => a.sort - b.sort) ?? []
|
|
26
|
+
args.menuRecurrences?.sort((a, b) => a.sort - b.sort) ?? []
|
|
27
27
|
);
|
|
28
28
|
|
|
29
29
|
const onDragEnd = ({ over, active }) => {
|
|
@@ -31,7 +31,7 @@ export const Default: Story<ProductSetRecurrences> = (args) => {
|
|
|
31
31
|
|
|
32
32
|
setItems((items) => {
|
|
33
33
|
const prevIndex = items.findIndex(
|
|
34
|
-
(item) => String(item.id) === active.id
|
|
34
|
+
(item) => String(item.id) === active.id
|
|
35
35
|
);
|
|
36
36
|
const nextIndex = items.findIndex((item) => String(item.id) === over.id);
|
|
37
37
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useEffect, useState, useContext } from "react";
|
|
2
2
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
3
3
|
import { uniqueId } from "lodash";
|
|
4
|
-
import { Badge } from "react-bootstrap";
|
|
4
|
+
import { Badge, Button } from "react-bootstrap";
|
|
5
5
|
import {
|
|
6
6
|
Controller,
|
|
7
7
|
useFieldArray,
|
|
8
8
|
useFormContext,
|
|
9
9
|
useWatch,
|
|
10
10
|
} from "react-hook-form";
|
|
11
|
+
import { FaBars, FaBowlingBall, FaCalendar, FaTicketAlt } from "react-icons/fa";
|
|
11
12
|
import { useTranslation } from "react-i18next";
|
|
12
13
|
import { useSensor, MouseSensor } from "@dnd-kit/core";
|
|
13
14
|
import {
|
|
@@ -25,7 +26,11 @@ import { ProductCategoryControl } from "../product-category";
|
|
|
25
26
|
import { ProductCategory } from "../types";
|
|
26
27
|
import { ProductsControl } from "./ProductsControl";
|
|
27
28
|
import { ProductSetFormValues, WithIsLoading } from "./ProductSetForm";
|
|
28
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
SelectCategoryModal,
|
|
31
|
+
CATEGORY_TYPES_NAMES,
|
|
32
|
+
CategoryConfig,
|
|
33
|
+
} from "./SelectCategoryModal";
|
|
29
34
|
import { ProductSetLoadingContext } from "./context";
|
|
30
35
|
import { VenueMapSetModal } from "./VenueMapSetModal";
|
|
31
36
|
import { moveArrayElements, sortArrayByIndex } from "../utils";
|
|
@@ -33,6 +38,29 @@ import { useSortableTreeFunctions } from "../hooks/useSortableTreeFunctions";
|
|
|
33
38
|
// @TODO not for first release
|
|
34
39
|
// import Popover from "./ProductSetFormPopover";
|
|
35
40
|
|
|
41
|
+
const CATEGORIES_TYPE: Partial<Record<CategoryType, CategoryConfig>> = {
|
|
42
|
+
[CATEGORY_TYPES_NAMES.tickets]: {
|
|
43
|
+
label: "tickets",
|
|
44
|
+
icon: <FaTicketAlt color="#0e8ce2" size={10} />,
|
|
45
|
+
},
|
|
46
|
+
[CATEGORY_TYPES_NAMES.bookings]: {
|
|
47
|
+
label: "bookings",
|
|
48
|
+
icon: <FaCalendar color="#0e8ce2" size={10} />,
|
|
49
|
+
},
|
|
50
|
+
[CATEGORY_TYPES_NAMES.menuItems]: {
|
|
51
|
+
label: "menuItems",
|
|
52
|
+
icon: <FaBars color="#0e8ce2" size={10} />,
|
|
53
|
+
},
|
|
54
|
+
[CATEGORY_TYPES_NAMES.game]: {
|
|
55
|
+
label: "game",
|
|
56
|
+
icon: <FaBowlingBall color="#0e8ce2" size={10} />,
|
|
57
|
+
},
|
|
58
|
+
[CATEGORY_TYPES_NAMES.fixedDuration]: {
|
|
59
|
+
label: "fixedDuration",
|
|
60
|
+
icon: <FaCalendar color="#0e8ce2" size={10} />,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
36
64
|
interface ProductCategoriesControlProps extends WithIsLoading {
|
|
37
65
|
stepIndex: number;
|
|
38
66
|
isOverrides?: boolean;
|
|
@@ -228,6 +256,8 @@ export function ProductCategoriesControl({
|
|
|
228
256
|
setIsExpanded(productCategoryId);
|
|
229
257
|
};
|
|
230
258
|
|
|
259
|
+
const categoryType = CATEGORIES_TYPE[productCategory.type];
|
|
260
|
+
|
|
231
261
|
return (
|
|
232
262
|
<Controller
|
|
233
263
|
key={`product-category-${productCategory._id}`}
|
|
@@ -272,6 +302,12 @@ export function ProductCategoriesControl({
|
|
|
272
302
|
)}
|
|
273
303
|
modalClass={ProductSetModalClasses.category}
|
|
274
304
|
isNewAdded={showCategoryModal}
|
|
305
|
+
itemButton={
|
|
306
|
+
<div className="btn-outline-primary item-icon sm border border-primary rounded-sm">
|
|
307
|
+
{categoryType.icon}
|
|
308
|
+
<span className="ml-2">{t(categoryType.label)}</span>
|
|
309
|
+
</div>
|
|
310
|
+
}
|
|
275
311
|
body={
|
|
276
312
|
<ProductCategoryControl
|
|
277
313
|
isLoading={isLoading}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
2
|
import { FormValues } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
|
|
3
3
|
import { Button, Form, Col, Row } from "react-bootstrap";
|
|
4
4
|
import { FormProvider, useForm } from "react-hook-form";
|
|
@@ -22,16 +22,21 @@ import { Step } from "../types";
|
|
|
22
22
|
import { ProductSetContextProvider, ProductSetLoadingContext } from "./context";
|
|
23
23
|
import { SelectItem } from "../../types/generic/SelectItem";
|
|
24
24
|
import { checkAvailableTimesErrors, getFilteredTemplates } from "../utils";
|
|
25
|
+
import { ErrorModal } from "../../iframe/order-process/components/ErrorModal";
|
|
25
26
|
|
|
26
27
|
export interface WithIsLoading {
|
|
27
28
|
isLoading: boolean;
|
|
28
29
|
}
|
|
30
|
+
export interface WithIdOptional {
|
|
31
|
+
id?: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
export interface WithId {
|
|
30
35
|
id: number;
|
|
31
36
|
}
|
|
32
37
|
export interface ProductSetFormValues
|
|
33
38
|
extends FormValues,
|
|
34
|
-
|
|
39
|
+
WithIdOptional,
|
|
35
40
|
ProductSetControlValues {
|
|
36
41
|
steps: Step[];
|
|
37
42
|
isOverrides?: boolean;
|
|
@@ -82,6 +87,7 @@ export function ProductSetForm({
|
|
|
82
87
|
onApproveDialog,
|
|
83
88
|
onDeclineDialog,
|
|
84
89
|
} = useDialogContext();
|
|
90
|
+
const [errorMessage, setErrorMessage] = useState("");
|
|
85
91
|
|
|
86
92
|
const form = useForm<ProductSetFormValues>({
|
|
87
93
|
defaultValues,
|
|
@@ -119,11 +125,18 @@ export function ProductSetForm({
|
|
|
119
125
|
if (!serverErrors) {
|
|
120
126
|
return;
|
|
121
127
|
}
|
|
128
|
+
if (Array.isArray(serverErrors) && serverErrors[0]) {
|
|
129
|
+
setErrorMessage(serverErrors[0]);
|
|
130
|
+
}
|
|
122
131
|
FormErrorService.handleServerErrors(serverErrors, setError);
|
|
123
132
|
}, [serverErrors, setError]);
|
|
124
133
|
|
|
125
134
|
useEffect(() => {
|
|
126
|
-
window.history.pushState(
|
|
135
|
+
window.history.pushState(
|
|
136
|
+
null,
|
|
137
|
+
"",
|
|
138
|
+
window.location.pathname + window.location.search,
|
|
139
|
+
);
|
|
127
140
|
window.addEventListener("beforeunload", onBeforeUnload);
|
|
128
141
|
window.addEventListener("popstate", onPopState);
|
|
129
142
|
|
|
@@ -150,6 +163,12 @@ export function ProductSetForm({
|
|
|
150
163
|
onDecline={onDeclineDialog}
|
|
151
164
|
/>
|
|
152
165
|
|
|
166
|
+
<ErrorModal
|
|
167
|
+
message={errorMessage}
|
|
168
|
+
isOpen={!!errorMessage}
|
|
169
|
+
onClose={() => setErrorMessage("")}
|
|
170
|
+
/>
|
|
171
|
+
|
|
153
172
|
<FormProvider {...form}>
|
|
154
173
|
<Form onSubmit={form.handleSubmit(submitHandler(onSubmitAndRedirect))}>
|
|
155
174
|
<ProductSetLoadingContext.Consumer>
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import React, { useContext, useState } from "react";
|
|
4
|
-
|
|
1
|
+
import { useContext, useState } from "react";
|
|
5
2
|
import {
|
|
6
3
|
ArrayPath,
|
|
7
4
|
Controller,
|
|
@@ -82,14 +79,14 @@ export const ProductZonesControl = <T extends FormValues>({
|
|
|
82
79
|
|
|
83
80
|
const productZonesError = HookFormService.getErrors<T>(
|
|
84
81
|
`${productZonesFieldName}.root` as Path<T>,
|
|
85
|
-
errors
|
|
82
|
+
errors,
|
|
86
83
|
);
|
|
87
84
|
|
|
88
85
|
const zoneCapacity = useWatch({
|
|
89
86
|
control,
|
|
90
87
|
name: [
|
|
91
88
|
...fields.map(
|
|
92
|
-
(_, index) => `${productZonesFieldName}.${index}.capacity` as const
|
|
89
|
+
(_, index) => `${productZonesFieldName}.${index}.capacity` as const,
|
|
93
90
|
),
|
|
94
91
|
],
|
|
95
92
|
});
|
|
@@ -98,7 +95,7 @@ export const ProductZonesControl = <T extends FormValues>({
|
|
|
98
95
|
control,
|
|
99
96
|
name: [
|
|
100
97
|
...fields.map(
|
|
101
|
-
(_, index) => `${productZonesFieldName}.${index}.duration` as const
|
|
98
|
+
(_, index) => `${productZonesFieldName}.${index}.duration` as const,
|
|
102
99
|
),
|
|
103
100
|
],
|
|
104
101
|
});
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "react-icons/fa";
|
|
26
26
|
import { ProductSetLoadingContext } from "./context";
|
|
27
27
|
|
|
28
|
-
const CATEGORY_TYPES_NAMES = {
|
|
28
|
+
export const CATEGORY_TYPES_NAMES = {
|
|
29
29
|
menuItems: CATEGORY_TYPE_MENU_ITEMS,
|
|
30
30
|
tickets: CATEGORY_TYPE_TICKETS,
|
|
31
31
|
bookings: CATEGORY_TYPE_BOOKINGS,
|
|
@@ -33,7 +33,7 @@ const CATEGORY_TYPES_NAMES = {
|
|
|
33
33
|
fixedDuration: CATEGORY_TYPE_FIXED_DURATION,
|
|
34
34
|
} as const;
|
|
35
35
|
|
|
36
|
-
type CategoryConfig = { label: string; icon: ReactElement };
|
|
36
|
+
export type CategoryConfig = { label: string; icon: ReactElement };
|
|
37
37
|
|
|
38
38
|
const MAIN_CATEGORIES: Partial<Record<CategoryType, CategoryConfig>> = {
|
|
39
39
|
[CATEGORY_TYPES_NAMES.tickets]: {
|