@licklist/design 0.67.2 → 0.67.3-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/Calendar.d.ts +1 -1
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +35 -40
- package/dist/calendar/utils/index.d.ts +2 -2
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/calendar/utils/index.js +20 -4
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +2 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +5 -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 +3 -6
- 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/event/event-card/IframeEventCard.d.ts +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +9 -3
- 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/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 +41 -2
- package/dist/provider/location-input/LocationInputDescription.d.ts +4 -1
- package/dist/provider/location-input/LocationInputDescription.d.ts.map +1 -1
- package/dist/provider/location-input/LocationInputDescription.js +27 -12
- 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 +7 -3
- 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 +7 -3
- 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 +4 -7
- package/dist/sales/guest-profile/previous-bookings/PreviousBookings.js +1 -1
- package/dist/sales/manual-booking/formatDays.js +3 -3
- package/dist/sales/manual-booking/select-event/SelectEvent.d.ts.map +1 -1
- package/dist/sales/manual-booking/select-event/SelectEvent.js +3 -3
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +2 -2
- package/dist/sales/notes/NotesTableRow.js +3 -4
- 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 +11 -11
- 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/calendar/utils/index.ts +26 -4
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +3 -5
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +0 -4
- 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-card/IframeEventCard.tsx +16 -2
- 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 +37 -1
- 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 +36 -1
- package/src/provider/location-input/LocationInputDescription.tsx +23 -11
- package/src/provider/location-input/index.ts +1 -0
- package/src/provider/provider-form/ProviderForm.tsx +7 -2
- package/src/provider/venue-form/VenueForm.tsx +5 -2
- 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 +4 -10
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +1 -1
- package/src/sales/manual-booking/formatDays.ts +3 -3
- package/src/sales/manual-booking/select-event/SelectEvent.tsx +2 -2
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +2 -2
- package/src/sales/notes/NotesTableRow.tsx +3 -3
- 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 +6 -0
- 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 +187 -201
- package/dist/assets/iframe/selectArrow.svg.js +0 -17
|
@@ -6,10 +6,10 @@ export type ZoneFormProps = {
|
|
|
6
6
|
onSubmit: (values: Partial<Zone>) => void;
|
|
7
7
|
serverErrors?: ServerError;
|
|
8
8
|
isLoading?: boolean;
|
|
9
|
-
workHours
|
|
9
|
+
workHours: WorkHour[] | undefined;
|
|
10
10
|
};
|
|
11
11
|
export type ZoneFormValues = Partial<Zone> & {
|
|
12
12
|
localImageBlobURL?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, }: ZoneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, workHours, }: ZoneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
//# sourceMappingURL=ZoneForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,
|
|
1
|
+
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,QAAQ,qEAMlB,aAAa,4CAiDf,CAAC"}
|
|
@@ -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.3-dev.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.29.1",
|
|
45
|
+
"@licklist/core": "0.29.1-dev.2",
|
|
46
46
|
"@licklist/eslint-config": "0.5.5",
|
|
47
|
-
"@licklist/plugins": "0.32.0",
|
|
47
|
+
"@licklist/plugins": "0.32.0-dev.3",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
|
-
"luxon": "
|
|
49
|
+
"luxon": "3.5.0",
|
|
50
50
|
"react": "17.0.2",
|
|
51
51
|
"react-dom": "17.0.2",
|
|
52
52
|
"react-hook-form": "7.52.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.29.1-dev.2",
|
|
66
65
|
"@licklist/eslint-config": "0.5.5",
|
|
67
|
-
"@licklist/plugins": "0.32.0",
|
|
66
|
+
"@licklist/plugins": "0.32.0-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",
|
|
@@ -101,7 +100,7 @@
|
|
|
101
100
|
"framer-motion": "4.1.17",
|
|
102
101
|
"konva": "6.0.0",
|
|
103
102
|
"lodash": "4.17.21",
|
|
104
|
-
"luxon": "
|
|
103
|
+
"luxon": "3.5.0",
|
|
105
104
|
"moment": "2.29.1",
|
|
106
105
|
"react": "17.0.2",
|
|
107
106
|
"react-bootstrap": "1.6.1",
|
|
@@ -145,7 +144,7 @@
|
|
|
145
144
|
"@svgr/rollup": "8.1.0",
|
|
146
145
|
"@swc/core": "1.6.5",
|
|
147
146
|
"@types/lodash": "4.17.5",
|
|
148
|
-
"@types/luxon": "
|
|
147
|
+
"@types/luxon": "3.4.2",
|
|
149
148
|
"@types/mdx-js__react": "1.5.3",
|
|
150
149
|
"@types/node": "20.9.0",
|
|
151
150
|
"@types/react": "17.0.80",
|
|
@@ -200,5 +199,6 @@
|
|
|
200
199
|
"volta": {
|
|
201
200
|
"node": "20.9.0",
|
|
202
201
|
"yarn": "4.4.0"
|
|
203
|
-
}
|
|
204
|
-
|
|
202
|
+
},
|
|
203
|
+
"stableVersion": "0.66.7-dev.5"
|
|
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}
|
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
import { DateTime, Interval } from "luxon";
|
|
2
2
|
|
|
3
|
-
export const getMonthCalendarDates = (
|
|
3
|
+
export const getMonthCalendarDates = (
|
|
4
|
+
initialDate: DateTime,
|
|
5
|
+
timeZone?: string,
|
|
6
|
+
): DateTime[] => {
|
|
4
7
|
const startOfMonth = initialDate.startOf("month");
|
|
5
8
|
const endOfMonth = initialDate.endOf("month");
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
const dateTimes = Interval.fromDateTimes(startOfMonth, endOfMonth)
|
|
8
11
|
.splitBy({ day: 1 })
|
|
9
12
|
.map((d) => d.start);
|
|
13
|
+
|
|
14
|
+
if (timeZone) {
|
|
15
|
+
return dateTimes.map((date) =>
|
|
16
|
+
date.setZone(timeZone, { keepLocalTime: true }),
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return dateTimes;
|
|
10
21
|
};
|
|
11
22
|
|
|
12
|
-
export const getWeekCalendarDates = (
|
|
23
|
+
export const getWeekCalendarDates = (
|
|
24
|
+
initialDate: DateTime,
|
|
25
|
+
timeZone?: string,
|
|
26
|
+
): DateTime[] => {
|
|
13
27
|
const lastDay = initialDate.plus({ days: 7 });
|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
const dateTimes = Interval.fromDateTimes(initialDate, lastDay)
|
|
16
30
|
.splitBy({ day: 1 })
|
|
17
31
|
.map((d) => d.start);
|
|
32
|
+
|
|
33
|
+
if (timeZone) {
|
|
34
|
+
return dateTimes.map((date) =>
|
|
35
|
+
date.setZone(timeZone, { keepLocalTime: true }),
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return dateTimes;
|
|
18
40
|
};
|
|
@@ -35,13 +35,11 @@ export const SaleDeadline = ({ disabled = false }: { disabled?: boolean }) => {
|
|
|
35
35
|
const saleDeadline = watch("saleDeadline");
|
|
36
36
|
|
|
37
37
|
useEffect(() => {
|
|
38
|
-
if (saleDeadline) {
|
|
39
|
-
setDeadlineType(
|
|
40
|
-
saleDeadline < 0 ? SALE_DEADLINE_BEFORE_TYPE : SALE_DEADLINE_AFTER_TYPE,
|
|
41
|
-
);
|
|
38
|
+
if (saleDeadline > 0) {
|
|
39
|
+
setDeadlineType(SALE_DEADLINE_AFTER_TYPE);
|
|
42
40
|
}
|
|
43
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
-
}, []);
|
|
42
|
+
}, [saleDeadline]);
|
|
45
43
|
|
|
46
44
|
return (
|
|
47
45
|
<Form.Group className="sales-deadline">
|
package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx
CHANGED
|
@@ -42,10 +42,6 @@ export const SelectEventProductSet = ({
|
|
|
42
42
|
const productSetId = watch("productSetId");
|
|
43
43
|
const editedProductSet = watch("editedProductSet");
|
|
44
44
|
|
|
45
|
-
const selectedProductSet = productSets.find(
|
|
46
|
-
(productSet) => productSet.id === productSetId,
|
|
47
|
-
)?.parentMenuId;
|
|
48
|
-
|
|
49
45
|
const onEditProductSet = useCallback(
|
|
50
46
|
() => {
|
|
51
47
|
setEditProductSetId(String(productSetId));
|
|
@@ -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 = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Card } from "react-bootstrap";
|
|
1
|
+
import { Button, Card } from "react-bootstrap";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import clsx from "clsx";
|
|
@@ -47,6 +47,7 @@ export function IframeEventCard({
|
|
|
47
47
|
descriptionId,
|
|
48
48
|
imageClassName,
|
|
49
49
|
showMoreInfo,
|
|
50
|
+
snippetSetting,
|
|
50
51
|
}: IframeEventCardProps) {
|
|
51
52
|
const { formatNumber } = useIntl();
|
|
52
53
|
const { t } = useTranslation("Design");
|
|
@@ -69,7 +70,11 @@ export function IframeEventCard({
|
|
|
69
70
|
{ "list-view": isListView },
|
|
70
71
|
className,
|
|
71
72
|
)}
|
|
72
|
-
onClick={
|
|
73
|
+
onClick={
|
|
74
|
+
goToDetails || !snippetSetting.displayBookingButtonOnEventList
|
|
75
|
+
? onClick
|
|
76
|
+
: undefined
|
|
77
|
+
}
|
|
73
78
|
>
|
|
74
79
|
{showMoreInfo && <div className="iframe-event-card__info-icon">i</div>}
|
|
75
80
|
{imageSrc && (
|
|
@@ -133,6 +138,15 @@ export function IframeEventCard({
|
|
|
133
138
|
/>
|
|
134
139
|
</Card.Text>
|
|
135
140
|
)}
|
|
141
|
+
{!!snippetSetting.displayBookingButtonOnEventList && showMoreInfo && (
|
|
142
|
+
<Button
|
|
143
|
+
className="step-save-btn w-25 mt-4"
|
|
144
|
+
type="button"
|
|
145
|
+
onClick={onClick}
|
|
146
|
+
>
|
|
147
|
+
{t("book")}
|
|
148
|
+
</Button>
|
|
149
|
+
)}
|
|
136
150
|
</div>
|
|
137
151
|
</Card.Body>
|
|
138
152
|
</Card>
|
|
@@ -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
|
|