@licklist/design 0.67.0 → 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.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +4 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +13 -11
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +2 -1
- 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 +4 -2
- 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 +3 -2
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +15 -2
- 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/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/component/EditEventForm/EditEventForm.tsx +2 -0
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +18 -12
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +4 -0
- 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 +15 -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/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 +127 -114
- 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.0",
|
|
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.0",
|
|
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}
|
|
@@ -122,6 +122,7 @@ export const EditEventForm = ({
|
|
|
122
122
|
const visible = watch("visible");
|
|
123
123
|
const editedProductSet = watch("editedProductSet");
|
|
124
124
|
const productSetId = watch("productSetId");
|
|
125
|
+
const occurrenceStartAtDate = watch("start");
|
|
125
126
|
|
|
126
127
|
const {
|
|
127
128
|
images,
|
|
@@ -403,6 +404,7 @@ export const EditEventForm = ({
|
|
|
403
404
|
setEditProductSetId={setEditProductSetId}
|
|
404
405
|
setShowEditProductSet={setShowEditProductSet}
|
|
405
406
|
showEditProductSet={showEditProductSet}
|
|
407
|
+
occurrenceStartAtDate={occurrenceStartAtDate}
|
|
406
408
|
/>
|
|
407
409
|
|
|
408
410
|
{hasPermission && !showEditProductSet && (
|
package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx
CHANGED
|
@@ -15,6 +15,7 @@ interface SelectEventProductSetProps extends HasPermissionProp {
|
|
|
15
15
|
setShowEditProductSet: (value: boolean) => void;
|
|
16
16
|
createProductSet: (props: EditEventFormValues) => void;
|
|
17
17
|
setEditProductSetId: (value: string) => void;
|
|
18
|
+
occurrenceStartAtDate: string;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export const SelectEventProductSet = ({
|
|
@@ -23,6 +24,7 @@ export const SelectEventProductSet = ({
|
|
|
23
24
|
setEditProductSetId,
|
|
24
25
|
showEditProductSet,
|
|
25
26
|
setShowEditProductSet,
|
|
27
|
+
occurrenceStartAtDate,
|
|
26
28
|
}: SelectEventProductSetProps) => {
|
|
27
29
|
const { t } = useTranslation(["Design"]);
|
|
28
30
|
const form = useFormContext<EditEventFormValues>();
|
|
@@ -88,8 +90,11 @@ export const SelectEventProductSet = ({
|
|
|
88
90
|
setValue("productSetId", value);
|
|
89
91
|
};
|
|
90
92
|
|
|
91
|
-
const showOverrideProductSet =
|
|
92
|
-
|
|
93
|
+
const showOverrideProductSet = !showEditProductSet && productSetId;
|
|
94
|
+
|
|
95
|
+
const isOverrideProductSet = productSets.find(
|
|
96
|
+
(productSet) => productSet.id === productSetId,
|
|
97
|
+
)?.isOverride;
|
|
93
98
|
|
|
94
99
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
100
|
const onSubmit = (value: EditEventFormValues["editedProductSet"]) => {
|
|
@@ -141,7 +146,7 @@ export const SelectEventProductSet = ({
|
|
|
141
146
|
value={productSet.id}
|
|
142
147
|
>
|
|
143
148
|
{isCurrentEditedProductSet ||
|
|
144
|
-
productSet
|
|
149
|
+
productSet.isOverride
|
|
145
150
|
? `[${t("edited")}] ${
|
|
146
151
|
isCurrentEditedProductSet
|
|
147
152
|
? editedProductSet?.name
|
|
@@ -172,7 +177,9 @@ export const SelectEventProductSet = ({
|
|
|
172
177
|
className="btn product-set-button "
|
|
173
178
|
onClick={onEditProductSet}
|
|
174
179
|
>
|
|
175
|
-
{
|
|
180
|
+
{isOverrideProductSet
|
|
181
|
+
? t("editOverrides")
|
|
182
|
+
: t("editProductSet")}
|
|
176
183
|
</Button>
|
|
177
184
|
)}
|
|
178
185
|
{showEditProductSet && (
|
|
@@ -206,14 +213,13 @@ export const SelectEventProductSet = ({
|
|
|
206
213
|
</Form.Group>
|
|
207
214
|
</div>
|
|
208
215
|
{showEditProductSet && productSetId && (
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
</>
|
|
216
|
+
<EditEventProductSet
|
|
217
|
+
onSubmit={onSubmit}
|
|
218
|
+
occurrenceStartAtDate={occurrenceStartAtDate}
|
|
219
|
+
defaultValues={
|
|
220
|
+
productSetId === editedProductSet?.id && editedProductSet
|
|
221
|
+
}
|
|
222
|
+
/>
|
|
217
223
|
)}
|
|
218
224
|
</>
|
|
219
225
|
);
|
|
@@ -22,11 +22,13 @@ export interface EventDates {
|
|
|
22
22
|
interface EditEventProductSetProps {
|
|
23
23
|
onSubmit: (value: EditEventFormValues["editedProductSet"]) => void;
|
|
24
24
|
defaultValues?: EditEventFormValues["editedProductSet"];
|
|
25
|
+
occurrenceStartAtDate: string;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export const EditEventProductSet = ({
|
|
28
29
|
onSubmit,
|
|
29
30
|
defaultValues,
|
|
31
|
+
occurrenceStartAtDate,
|
|
30
32
|
}: EditEventProductSetProps) => {
|
|
31
33
|
const { companyId } = useParams<{
|
|
32
34
|
companyId: string;
|
|
@@ -125,6 +127,8 @@ export const EditEventProductSet = ({
|
|
|
125
127
|
fee={feeInPercent}
|
|
126
128
|
isEventEditProductSet
|
|
127
129
|
isOverrides
|
|
130
|
+
occurrenceStartAtDate={occurrenceStartAtDate}
|
|
131
|
+
workHours={undefined}
|
|
128
132
|
/>
|
|
129
133
|
<Button
|
|
130
134
|
disabled={isLoading}
|
|
@@ -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
|
))}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
1
2
|
import { Col, Form, Row } from "react-bootstrap";
|
|
2
3
|
import { Controller, useFormContext } from "react-hook-form";
|
|
3
4
|
import { useTranslation } from "react-i18next";
|
|
4
5
|
import clsx from "clsx";
|
|
6
|
+
import { DateTime } from "luxon";
|
|
5
7
|
import {
|
|
6
8
|
OPERATIONAL_COST_CUSTOMER,
|
|
7
9
|
OPERATIONAL_COST_PROVIDER,
|
|
@@ -14,6 +16,7 @@ import {
|
|
|
14
16
|
RELY_ON_PEOPLE_TYPES,
|
|
15
17
|
RelyOnPeopleType,
|
|
16
18
|
} from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
19
|
+
import { DATE_MONTH_LOCALE_FORMAT } from "@licklist/core/dist/Config";
|
|
17
20
|
import { useId } from "@react-aria/utils";
|
|
18
21
|
import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
|
|
19
22
|
import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper";
|
|
@@ -85,9 +88,10 @@ export interface ProductSetControlProps {
|
|
|
85
88
|
fieldSets?: FieldSet[];
|
|
86
89
|
showEmailTemplate?: boolean;
|
|
87
90
|
showSmsTemplate?: boolean;
|
|
88
|
-
workHours
|
|
91
|
+
workHours: WorkHour[] | undefined;
|
|
89
92
|
providerHasBookingManagement?: boolean;
|
|
90
93
|
isOverrides?: boolean;
|
|
94
|
+
occurrenceStartAtDate?: string;
|
|
91
95
|
isCreateNewOverrides?: boolean;
|
|
92
96
|
}
|
|
93
97
|
|
|
@@ -105,6 +109,7 @@ export function ProductSetControl({
|
|
|
105
109
|
workHours,
|
|
106
110
|
providerHasBookingManagement = false,
|
|
107
111
|
isOverrides = false,
|
|
112
|
+
occurrenceStartAtDate,
|
|
108
113
|
isCreateNewOverrides = false,
|
|
109
114
|
}: ProductSetControlProps) {
|
|
110
115
|
const { t } = useTranslation(["Design", "Validation", "Notification"]);
|
|
@@ -114,10 +119,12 @@ export function ProductSetControl({
|
|
|
114
119
|
formState: { errors },
|
|
115
120
|
watch,
|
|
116
121
|
setError,
|
|
122
|
+
setValue,
|
|
117
123
|
clearErrors,
|
|
118
124
|
} = useFormContext<ProductSetControlValues>();
|
|
119
125
|
|
|
120
126
|
const steps = watch("steps");
|
|
127
|
+
const productSetName = watch("name");
|
|
121
128
|
|
|
122
129
|
const nameId = useId();
|
|
123
130
|
const termsAndConditionsId = useId();
|
|
@@ -131,6 +138,13 @@ export function ProductSetControl({
|
|
|
131
138
|
productCategories?.some((category) => checkIfZoneCategory(category?.type)),
|
|
132
139
|
);
|
|
133
140
|
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (!occurrenceStartAtDate) return;
|
|
143
|
+
const eventStartDate = DateTime.fromISO(occurrenceStartAtDate);
|
|
144
|
+
const eventStart = eventStartDate.toFormat(DATE_MONTH_LOCALE_FORMAT);
|
|
145
|
+
setValue("name", `${productSetName} (${eventStart})`);
|
|
146
|
+
}, [setValue, occurrenceStartAtDate]);
|
|
147
|
+
|
|
134
148
|
return (
|
|
135
149
|
<Row
|
|
136
150
|
className={`product-set-form ${
|
|
@@ -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
|
|