@licklist/design 0.67.2 → 0.67.3-dev.1
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.d.ts +2 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +5 -3
- 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 +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 +6 -8
- 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 +3 -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/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 +3 -2
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +3 -1
- 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 +4 -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 +6 -2
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +65 -5
- 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/RecurrenceIntervalAndFrequencyInput.d.ts +2 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +7 -13
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +4 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +7 -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 +72 -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 +3 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +4 -2
- package/dist/zone/form/components/ZoneControl.d.ts +3 -2
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +5 -2
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +5 -4
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +5 -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/EditEventForm/EditEventForm.tsx +3 -0
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +3 -5
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +3 -4
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +3 -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-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 +6 -4
- package/src/product-set/control/DateInput.tsx +2 -1
- package/src/product-set/control/ProductSetControl.tsx +5 -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 +25 -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/RecurrenceIntervalAndFrequencyInput.tsx +8 -22
- package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +11 -4
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +17 -3
- package/src/recurring-date-picker-input/utils.ts +86 -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 +9 -2
- package/src/zone/form/components/ZoneControl.tsx +8 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +10 -5
- package/src/zone/form/utils/dates.ts +9 -10
- package/yarn.lock +217 -204
- package/dist/assets/iframe/selectArrow.svg.js +0 -17
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { DateTime } from "luxon";
|
|
2
1
|
import { Col, Row } from "react-bootstrap";
|
|
3
2
|
import { useFormContext } from "react-hook-form";
|
|
4
3
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
6
4
|
import { WorkingHoursInputValues } from ".";
|
|
7
5
|
import { useWeekdays } from "./utils";
|
|
8
6
|
|
|
@@ -24,22 +22,10 @@ export function WorkingHoursInputDescription() {
|
|
|
24
22
|
<Row key={i}>
|
|
25
23
|
<Col xs="auto">{weekdays[i]}:</Col>
|
|
26
24
|
<Col>
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
TIME_FORMAT,
|
|
32
|
-
),
|
|
33
|
-
end: DateTime.fromISO(weekday.start).toFormat(
|
|
34
|
-
TIME_FORMAT,
|
|
35
|
-
),
|
|
36
|
-
})
|
|
37
|
-
: t("timeFrom", {
|
|
38
|
-
start: DateTime.fromISO(weekday.start).toFormat(
|
|
39
|
-
TIME_FORMAT,
|
|
40
|
-
),
|
|
41
|
-
})
|
|
42
|
-
: null}
|
|
25
|
+
{t("timeInterval", {
|
|
26
|
+
start: weekday.start,
|
|
27
|
+
end: weekday.end,
|
|
28
|
+
})}
|
|
43
29
|
</Col>
|
|
44
30
|
</Row>
|
|
45
31
|
);
|
|
@@ -8,12 +8,8 @@ import {
|
|
|
8
8
|
useWatch,
|
|
9
9
|
Validate,
|
|
10
10
|
} from "react-hook-form";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
TIME_FORMAT,
|
|
14
|
-
TIME_FULL_FORMAT,
|
|
15
|
-
} from "@licklist/core/dist/Config";
|
|
16
|
-
import { fromFormat } from "@licklist/plugins/dist/utils/dateTime";
|
|
11
|
+
import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
12
|
+
import { fromIso } from "@licklist/core/dist/Services";
|
|
17
13
|
import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
|
|
18
14
|
|
|
19
15
|
interface RecurrenceIntervalAndFrequencyInputProps {
|
|
@@ -31,17 +27,9 @@ interface RecurrenceIntervalAndFrequencyInputProps {
|
|
|
31
27
|
RegisterOptions,
|
|
32
28
|
"max" | "min" | "validate" | "required" | "pattern"
|
|
33
29
|
>;
|
|
30
|
+
timeZone: string;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
const fromTimeFormat = fromFormat(TIME_FORMAT);
|
|
37
|
-
const fromTimeFullFormat = fromFormat(TIME_FULL_FORMAT);
|
|
38
|
-
|
|
39
|
-
// default values and entered values are in different formats
|
|
40
|
-
const fromTimeFormats = (time: string) =>
|
|
41
|
-
fromTimeFormat(time).isValid
|
|
42
|
-
? fromTimeFormat(time)
|
|
43
|
-
: fromTimeFullFormat(time);
|
|
44
|
-
|
|
45
33
|
function RecurrenceIntervalAndFrequencyInput({
|
|
46
34
|
disabled = false,
|
|
47
35
|
minDate,
|
|
@@ -51,6 +39,7 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
51
39
|
endTimeLabel,
|
|
52
40
|
startTimeRules,
|
|
53
41
|
endTimeRules,
|
|
42
|
+
timeZone,
|
|
54
43
|
}: RecurrenceIntervalAndFrequencyInputProps) {
|
|
55
44
|
const { t } = useTranslation(["Design", "Notification", "App"]);
|
|
56
45
|
|
|
@@ -66,10 +55,10 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
66
55
|
|
|
67
56
|
const _startTime = useWatch({ control, name: "startTime" });
|
|
68
57
|
const startTime =
|
|
69
|
-
_startTime &&
|
|
58
|
+
_startTime && fromIso(_startTime, timeZone).toFormat(TIME_FORMAT);
|
|
70
59
|
|
|
71
60
|
const _endTime = useWatch({ control, name: "endTime" });
|
|
72
|
-
const endTime = _endTime &&
|
|
61
|
+
const endTime = _endTime && fromIso(_endTime, timeZone).toFormat(TIME_FORMAT);
|
|
73
62
|
|
|
74
63
|
useEffect(() => {
|
|
75
64
|
if (!startDate || !endDate) {
|
|
@@ -119,11 +108,8 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
119
108
|
if (!startDate || !date) {
|
|
120
109
|
return true;
|
|
121
110
|
}
|
|
122
|
-
const currentStartDate =
|
|
123
|
-
|
|
124
|
-
DATE_FORMAT,
|
|
125
|
-
);
|
|
126
|
-
const currentEndDate = DateTime.fromFormat(date, DATE_FORMAT);
|
|
111
|
+
const currentStartDate = fromIso(startDate, timeZone);
|
|
112
|
+
const currentEndDate = fromIso(date, timeZone);
|
|
127
113
|
return currentEndDate.diff(currentStartDate, ["days"]).days >=
|
|
128
114
|
0
|
|
129
115
|
? true
|
|
@@ -12,9 +12,7 @@ export default {
|
|
|
12
12
|
component: RecurringDatePickerInput,
|
|
13
13
|
} as Meta;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export const Default: Story<DefaultRecurringDatePickerInputProps> = (args) => {
|
|
15
|
+
export const Default: Story<RecurringDatePickerInputProps> = (args) => {
|
|
18
16
|
return (
|
|
19
17
|
<Card style={{ maxWidth: "max-content" }}>
|
|
20
18
|
<Card.Body>
|
|
@@ -23,7 +21,7 @@ export const Default: Story<DefaultRecurringDatePickerInputProps> = (args) => {
|
|
|
23
21
|
</Card>
|
|
24
22
|
);
|
|
25
23
|
};
|
|
26
|
-
export const Valid: Story<
|
|
24
|
+
export const Valid: Story<RecurringDatePickerInputProps> = (args) => {
|
|
27
25
|
return (
|
|
28
26
|
<Card style={{ maxWidth: "max-content" }}>
|
|
29
27
|
<Card.Body>
|
|
@@ -34,6 +32,15 @@ export const Valid: Story<DefaultRecurringDatePickerInputProps> = (args) => {
|
|
|
34
32
|
};
|
|
35
33
|
Default.args = {
|
|
36
34
|
onChange: (data) => console.log("onSubmit", data),
|
|
35
|
+
workHours: [
|
|
36
|
+
{ start: "20:00", end: "04:00", day: 0, description: "" },
|
|
37
|
+
{ start: "20:00", end: "04:00", day: 1, description: "" },
|
|
38
|
+
{ start: "20:00", end: "04:00", day: 2, description: "" },
|
|
39
|
+
{ start: "20:00", end: "12:00", day: 3, description: "" },
|
|
40
|
+
{ start: "20:00", end: "23:00", day: 4, description: "" },
|
|
41
|
+
{ start: "08:00", end: "12:00", day: 5, description: "" },
|
|
42
|
+
{ start: "10:00", end: "16:00", day: 6, description: "" },
|
|
43
|
+
],
|
|
37
44
|
};
|
|
38
45
|
Valid.args = {
|
|
39
46
|
onChange: (data) => console.log("onSubmit", data),
|
|
@@ -2,7 +2,7 @@ import { useEffect, useMemo, PropsWithChildren } from "react";
|
|
|
2
2
|
import RRule, { Frequency, Weekday } from "rrule";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import Button from "react-bootstrap/Button";
|
|
5
|
-
import { DateTime, Interval } from "luxon";
|
|
5
|
+
import { DateTime, Interval, WeekdayNumbers } from "luxon";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
7
|
import {
|
|
8
8
|
DATE_TIME_FORMAT,
|
|
@@ -12,9 +12,14 @@ import {
|
|
|
12
12
|
import { usePreviousValue } from "@licklist/plugins/dist/hooks/Value/usePreviousValue";
|
|
13
13
|
import { FormProvider, useForm } from "react-hook-form";
|
|
14
14
|
import { Form } from "react-bootstrap";
|
|
15
|
+
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
15
16
|
import RecurrenceIntervalAndFrequencyInput from "./RecurrenceIntervalAndFrequencyInput";
|
|
16
17
|
import RecurrenceWeekdaysInput from "./RecurrenceWeekdaysInput";
|
|
17
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
parseAndValidateRRule,
|
|
20
|
+
SupportedFrequency,
|
|
21
|
+
useWorkHoursValidation,
|
|
22
|
+
} from "./utils";
|
|
18
23
|
import { ConfirmModal } from "../modals";
|
|
19
24
|
import { DeleteFieldButton } from "../product-set/elements";
|
|
20
25
|
|
|
@@ -26,6 +31,8 @@ export interface RecurringDatePickerInputProps {
|
|
|
26
31
|
initialFrequency?: Frequency;
|
|
27
32
|
setInitialStartDateAfterSelect?: boolean;
|
|
28
33
|
minDate?: string;
|
|
34
|
+
workHours: WorkHour[] | undefined;
|
|
35
|
+
timeZone: string;
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
export interface RecurringDatePickerInputValues {
|
|
@@ -51,6 +58,8 @@ export function RecurringDatePickerInput({
|
|
|
51
58
|
setInitialStartDateAfterSelect = false,
|
|
52
59
|
children,
|
|
53
60
|
minDate,
|
|
61
|
+
workHours,
|
|
62
|
+
timeZone,
|
|
54
63
|
}: PropsWithChildren<RecurringDatePickerInputProps>) {
|
|
55
64
|
const { t } = useTranslation(["Design"]);
|
|
56
65
|
|
|
@@ -84,6 +93,8 @@ export function RecurringDatePickerInput({
|
|
|
84
93
|
byWeekDay,
|
|
85
94
|
});
|
|
86
95
|
|
|
96
|
+
const validator = useWorkHoursValidation(byWeekDay, workHours, timeZone);
|
|
97
|
+
|
|
87
98
|
const onSubmit = (nextState: RecurringDatePickerInputValues) => {
|
|
88
99
|
const end = getDateTimeObject(endDate, endTime || "23:59:59");
|
|
89
100
|
|
|
@@ -149,7 +160,7 @@ export function RecurringDatePickerInput({
|
|
|
149
160
|
// Luxon use standard ISO calendar but in that case
|
|
150
161
|
// first weekday from weekdays array start from 0 index.
|
|
151
162
|
// We need to add 1 to it to show correct data
|
|
152
|
-
const currentWeekDay = byWeekDay[0]?.weekday + 1;
|
|
163
|
+
const currentWeekDay = (byWeekDay[0]?.weekday + 1) as WeekdayNumbers;
|
|
153
164
|
|
|
154
165
|
const currentDate = DateTime.local();
|
|
155
166
|
|
|
@@ -188,6 +199,9 @@ export function RecurringDatePickerInput({
|
|
|
188
199
|
<RecurrenceIntervalAndFrequencyInput
|
|
189
200
|
disabled={disabled}
|
|
190
201
|
minDate={minDate}
|
|
202
|
+
startTimeRules={validator}
|
|
203
|
+
endTimeRules={validator}
|
|
204
|
+
timeZone={timeZone}
|
|
191
205
|
/>
|
|
192
206
|
|
|
193
207
|
{children}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
2
|
+
import { fromIso } from "@licklist/core/dist/Services";
|
|
3
|
+
import { DateTime, Interval } from "luxon";
|
|
4
|
+
import { Validate } from "react-hook-form";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
2
6
|
import RRule, { Frequency, Weekday } from "rrule";
|
|
3
7
|
|
|
4
8
|
export const getWeekdayForFrequency = ({
|
|
@@ -11,6 +15,7 @@ export const getWeekdayForFrequency = ({
|
|
|
11
15
|
const parsedDate = DateTime.fromISO(date);
|
|
12
16
|
return new Weekday(
|
|
13
17
|
parsedDate.weekday - 1,
|
|
18
|
+
// eslint-disable-next-line no-nested-ternary
|
|
14
19
|
frequency !== Frequency.MONTHLY
|
|
15
20
|
? undefined
|
|
16
21
|
: parsedDate.day + 7 > parsedDate.daysInMonth
|
|
@@ -109,3 +114,83 @@ export const parseAndValidateRRule = ({
|
|
|
109
114
|
until: options.until,
|
|
110
115
|
} as ParsedRRuleOptions;
|
|
111
116
|
};
|
|
117
|
+
|
|
118
|
+
export const useWorkHoursValidation = (
|
|
119
|
+
byWeekDay: Weekday[] = [],
|
|
120
|
+
workHours: WorkHour[] | undefined,
|
|
121
|
+
timeZone: string,
|
|
122
|
+
): {
|
|
123
|
+
/* @ts-expect-error 2314 */
|
|
124
|
+
validate?: Validate<string>;
|
|
125
|
+
} => {
|
|
126
|
+
const { t } = useTranslation("Validation");
|
|
127
|
+
if (!workHours) return {};
|
|
128
|
+
|
|
129
|
+
// map every day to array of intervals describing workhours for that day
|
|
130
|
+
let intervalsByDay = workHours.map((workhour, index, self) => {
|
|
131
|
+
const res: Interval[] = [];
|
|
132
|
+
|
|
133
|
+
const startTime = fromIso(workhour.start, timeZone);
|
|
134
|
+
const endTime = fromIso(workhour.end, timeZone);
|
|
135
|
+
|
|
136
|
+
if (endTime > startTime) {
|
|
137
|
+
res.push(Interval.fromDateTimes(startTime, endTime));
|
|
138
|
+
} else {
|
|
139
|
+
// if end is before start, then it means that end is on the next day
|
|
140
|
+
// so count only to the end of current day
|
|
141
|
+
res.push(Interval.fromDateTimes(startTime, startTime.endOf("day")));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const prevIndex = index === 0 ? self.length - 1 : index - 1;
|
|
145
|
+
|
|
146
|
+
const prevStartTime = fromIso(self[prevIndex].start, timeZone);
|
|
147
|
+
const prevEndTime = fromIso(self[prevIndex].end, timeZone);
|
|
148
|
+
|
|
149
|
+
// if prevStartTime > prevEndTime then it means that prevEndTime is on the current day
|
|
150
|
+
// so we need to add interval from start of current day to prevEndTime
|
|
151
|
+
if (prevStartTime > prevEndTime) {
|
|
152
|
+
res.push(Interval.fromDateTimes(prevEndTime.startOf("day"), prevEndTime));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return res;
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// if length === 0 or length === 7 then all workhours are selected, no need to filter
|
|
159
|
+
if (![0, 7].includes(byWeekDay.length)) {
|
|
160
|
+
intervalsByDay = intervalsByDay.filter((_, index) =>
|
|
161
|
+
byWeekDay.find(({ weekday }) => weekday === index),
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
validate: (_time: string) => {
|
|
167
|
+
// workaround for issue with form values
|
|
168
|
+
// default values and entered values have different formats
|
|
169
|
+
const time = fromIso(_time, timeZone);
|
|
170
|
+
|
|
171
|
+
const notFittingIntervalsByDay = intervalsByDay.reduce<Interval[][]>(
|
|
172
|
+
(acc, intervalsByDay) => {
|
|
173
|
+
if (!intervalsByDay.some((interval) => interval.contains(time))) {
|
|
174
|
+
acc.push(intervalsByDay);
|
|
175
|
+
}
|
|
176
|
+
return acc;
|
|
177
|
+
},
|
|
178
|
+
[],
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
const notFittingIntervals = notFittingIntervalsByDay
|
|
182
|
+
.flat()
|
|
183
|
+
.filter((interval) => !interval.contains(time));
|
|
184
|
+
|
|
185
|
+
const attribute = notFittingIntervals
|
|
186
|
+
.map((interval) => interval.toFormat("HH:mm"))
|
|
187
|
+
.join(", ");
|
|
188
|
+
|
|
189
|
+
if (notFittingIntervalsByDay.length !== 0) {
|
|
190
|
+
return t("outsideWorkingHours", { attribute }) as string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return true;
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { DateTime } from "luxon";
|
|
4
3
|
import { useIntl } from "react-intl";
|
|
5
4
|
import {
|
|
6
5
|
Order,
|
|
@@ -12,6 +11,7 @@ import * as Config from "@licklist/core/dist/Config";
|
|
|
12
11
|
import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
|
|
13
12
|
import { getOrderSourceTitle } from "@licklist/plugins/dist/utils/sourceTitle";
|
|
14
13
|
import { FaUser } from "react-icons/fa";
|
|
14
|
+
import { fromIso } from "@licklist/core/dist/Services";
|
|
15
15
|
|
|
16
16
|
export type ResultCardProps = {
|
|
17
17
|
className: string;
|
|
@@ -20,8 +20,6 @@ export type ResultCardProps = {
|
|
|
20
20
|
onCardClick?: (id: number) => void;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
// @TODO integrate when API will be available
|
|
24
|
-
// activity and staff keys
|
|
25
23
|
export const ResultCard = ({
|
|
26
24
|
order,
|
|
27
25
|
className,
|
|
@@ -48,11 +46,7 @@ export const ResultCard = ({
|
|
|
48
46
|
const productList = products.map((product) => product.name)?.join(", ") || "";
|
|
49
47
|
const activityName = event?.name || menu?.name || "";
|
|
50
48
|
|
|
51
|
-
const onClick = () =>
|
|
52
|
-
if (!onCardClick) return;
|
|
53
|
-
|
|
54
|
-
onCardClick(id);
|
|
55
|
-
};
|
|
49
|
+
const onClick = () => onCardClick?.(id);
|
|
56
50
|
|
|
57
51
|
return (
|
|
58
52
|
<div
|
|
@@ -87,10 +81,10 @@ export const ResultCard = ({
|
|
|
87
81
|
{t("status")}: {t(status)}
|
|
88
82
|
</p>
|
|
89
83
|
<p>
|
|
90
|
-
{t("date")}: {formatDateStringForEvent(startDate
|
|
84
|
+
{t("date")}: {formatDateStringForEvent(startDate)}
|
|
91
85
|
</p>
|
|
92
86
|
<p>
|
|
93
|
-
{t("time")}: {
|
|
87
|
+
{t("time")}: {fromIso(startDate).toFormat(TIME_FORMAT)}
|
|
94
88
|
</p>
|
|
95
89
|
<p className="products" title={productList}>
|
|
96
90
|
{t("products")}: {productList}
|
|
@@ -19,7 +19,7 @@ export const PreviousBookings = ({
|
|
|
19
19
|
const [showOlderBookings, setShowOlderBookings] = useState(false);
|
|
20
20
|
|
|
21
21
|
const formatDate = (date: string) => {
|
|
22
|
-
return DateTime.fromJSDate(new Date(date)).toFormat("dd LLL yyyy
|
|
22
|
+
return DateTime.fromJSDate(new Date(date)).toFormat("dd LLL yyyy HH:mm");
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const capitalizeFirstLetter = (string: string) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
2
|
-
import {
|
|
2
|
+
import { fromIso } from "@licklist/core/dist/Services";
|
|
3
3
|
|
|
4
4
|
export const formatToDays = (daysInWeek?: number[]): string | null => {
|
|
5
5
|
if (!daysInWeek) {
|
|
@@ -40,7 +40,7 @@ export const formatToDays = (daysInWeek?: number[]): string | null => {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export const formatToHours = (startAt: string, endAt: string) => {
|
|
43
|
-
const firstTime =
|
|
44
|
-
const lastTime =
|
|
43
|
+
const firstTime = fromIso(startAt).toFormat(TIME_FORMAT);
|
|
44
|
+
const lastTime = fromIso(endAt).toFormat(TIME_FORMAT);
|
|
45
45
|
return `${firstTime} - ${lastTime}`;
|
|
46
46
|
};
|
|
@@ -2,8 +2,8 @@ import { useTranslation } from "react-i18next";
|
|
|
2
2
|
import { Card, Form } from "react-bootstrap";
|
|
3
3
|
import MediaService from "@licklist/plugins/dist/services/Media/MediaService";
|
|
4
4
|
import { rrulestr } from "rrule";
|
|
5
|
-
import { DateTime } from "luxon";
|
|
6
5
|
import { ManualBookingEvent } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
6
|
+
import { fromIso } from "@licklist/core/dist/Services";
|
|
7
7
|
import { formatToDays, formatToHours } from "../formatDays";
|
|
8
8
|
import { BlockLoader } from "../../../static/loader";
|
|
9
9
|
|
|
@@ -106,7 +106,7 @@ export const EventCardManualBooking = ({
|
|
|
106
106
|
rrule.includes("EXDATE") ? rrule.split(";EXDATE=")[0] : rrule,
|
|
107
107
|
)?.options?.byweekday,
|
|
108
108
|
)
|
|
109
|
-
: formatToDays([
|
|
109
|
+
: formatToDays([fromIso(startAt)?.day])}
|
|
110
110
|
</div>
|
|
111
111
|
<div className="event-card-hours">{formatToHours(startAt, endAt)}</div>
|
|
112
112
|
</div>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useTranslation } from "react-i18next";
|
|
2
2
|
import { ManualBookingOrder } from "@licklist/plugins/dist/context/sale/ManualBookingStepsContext";
|
|
3
|
-
import { DateTime } from "luxon";
|
|
4
3
|
import {
|
|
5
4
|
DATE_TIME_MANUAL_BOOKING_FORMAT,
|
|
6
5
|
TIME_FORMAT,
|
|
@@ -12,6 +11,7 @@ import {
|
|
|
12
11
|
RelyOnPeopleType,
|
|
13
12
|
} from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
14
13
|
import { getRelyOnPeopleMultiplier } from "@licklist/plugins/dist/utils/relyOnPeople";
|
|
14
|
+
import { fromIso } from "@licklist/core/dist/Services";
|
|
15
15
|
import { BlockLoader } from "../../../static/loader";
|
|
16
16
|
|
|
17
17
|
export interface ManualBookingSummaryProps {
|
|
@@ -41,7 +41,7 @@ export const ManualBookingSummary = ({
|
|
|
41
41
|
const { formatNumber } = useIntl();
|
|
42
42
|
const showRelyOnPeople =
|
|
43
43
|
relyOnPeopleType && relyOnPeopleType !== RELY_ON_PEOPLE_QUANTITY;
|
|
44
|
-
const currentDate =
|
|
44
|
+
const currentDate = fromIso(orderDate);
|
|
45
45
|
const date = currentDate.toFormat(DATE_TIME_MANUAL_BOOKING_FORMAT);
|
|
46
46
|
const time = currentDate.toFormat(TIME_FORMAT);
|
|
47
47
|
return (
|
|
@@ -9,8 +9,8 @@ import { DateTime } from "luxon";
|
|
|
9
9
|
import {
|
|
10
10
|
DATE_TIME_FORMAT,
|
|
11
11
|
DATE_TIME_FULL_FORMAT,
|
|
12
|
+
UTC_TIMEZONE,
|
|
12
13
|
} from "@licklist/core/dist/Config";
|
|
13
|
-
import { getClientTimeZone } from "@licklist/core/dist/Services";
|
|
14
14
|
import { FaEllipsisH, FaEye, FaTrashAlt } from "react-icons/fa";
|
|
15
15
|
import { ConfirmModal } from "../../modals";
|
|
16
16
|
import { MenuButton } from "../../table";
|
|
@@ -27,9 +27,9 @@ export const TableRow = ({ note, onClick, onDeleteNote }: TableRowProps) => {
|
|
|
27
27
|
const [isOverlayVisibile, setIsOverlayVisible] = useState(false);
|
|
28
28
|
|
|
29
29
|
const date = DateTime.fromFormat(note.updatedAt, DATE_TIME_FULL_FORMAT, {
|
|
30
|
-
zone:
|
|
30
|
+
zone: UTC_TIMEZONE,
|
|
31
31
|
})
|
|
32
|
-
.
|
|
32
|
+
.toLocal()
|
|
33
33
|
.toFormat(DATE_TIME_FORMAT);
|
|
34
34
|
|
|
35
35
|
return (
|
|
@@ -19,6 +19,7 @@ export const SettingFormComponent: Story<AdminSettingFormProps> = (args) => (
|
|
|
19
19
|
</Container>
|
|
20
20
|
);
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
export const PaymentFeeFormComponent: Story<PaymentFeeFormProps> = (args) => {
|
|
23
24
|
const form = useForm<PaymentFeeFormFieldValues>({
|
|
24
25
|
defaultValues: args.defaultValues,
|
|
@@ -10,7 +10,7 @@ import Row from "react-bootstrap/Row";
|
|
|
10
10
|
import Col from "react-bootstrap/Col";
|
|
11
11
|
import { Link } from "react-router-dom";
|
|
12
12
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
13
|
-
import {
|
|
13
|
+
import { ProvidableType } from "@licklist/core/dist/DataMapper/Provider/ProvidableDataMapper";
|
|
14
14
|
import { FaCommentAlt } from "react-icons/fa";
|
|
15
15
|
import { PaymentFeeForm, PaymentFeeFormFieldValues } from "./PaymentFeeForm";
|
|
16
16
|
import { Currency } from "../../types/currency";
|
|
@@ -32,7 +32,7 @@ export interface AdminSettingFormProps extends HasPermissionProp {
|
|
|
32
32
|
providerMetadata: {
|
|
33
33
|
country?: string;
|
|
34
34
|
providableId?: number;
|
|
35
|
-
providerType?:
|
|
35
|
+
providerType?: ProvidableType;
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -307,6 +307,7 @@ export function Preview({
|
|
|
307
307
|
productCategoryId: 57,
|
|
308
308
|
productGroupId: null,
|
|
309
309
|
availableQuantity: 980,
|
|
310
|
+
zoneId: null,
|
|
310
311
|
name: "Cofee",
|
|
311
312
|
description: "",
|
|
312
313
|
price: 15,
|
|
@@ -315,6 +316,8 @@ export function Preview({
|
|
|
315
316
|
maxQuantity: 15,
|
|
316
317
|
totalQuantity: 980,
|
|
317
318
|
type: "sale" as const,
|
|
319
|
+
capacity: 0,
|
|
320
|
+
duration: 0,
|
|
318
321
|
weight: 0,
|
|
319
322
|
isAvailable: true,
|
|
320
323
|
isSoldOut: false,
|
|
@@ -333,6 +336,7 @@ export function Preview({
|
|
|
333
336
|
productCategoryId: 57,
|
|
334
337
|
productGroupId: null,
|
|
335
338
|
availableQuantity: 980,
|
|
339
|
+
zoneId: null,
|
|
336
340
|
name: "Cofee 2",
|
|
337
341
|
description: "",
|
|
338
342
|
price: 15,
|
|
@@ -341,6 +345,8 @@ export function Preview({
|
|
|
341
345
|
maxQuantity: 15,
|
|
342
346
|
totalQuantity: 980,
|
|
343
347
|
type: "sale" as const,
|
|
348
|
+
capacity: 0,
|
|
349
|
+
duration: 0,
|
|
344
350
|
weight: 0,
|
|
345
351
|
isAvailable: true,
|
|
346
352
|
isSoldOut: false,
|
|
@@ -33,6 +33,7 @@ export interface SortableTreeItemProps {
|
|
|
33
33
|
body: ReactNode;
|
|
34
34
|
children?: ReactNode;
|
|
35
35
|
preItem?: ReactNode;
|
|
36
|
+
itemButton?: ReactNode;
|
|
36
37
|
postItem?: ReactNode;
|
|
37
38
|
sortableItems?: string[];
|
|
38
39
|
isExpanded?: boolean;
|
|
@@ -82,6 +83,7 @@ export function SortableTreeItem({
|
|
|
82
83
|
secondaryBadge,
|
|
83
84
|
setIsExpanded,
|
|
84
85
|
isOverride,
|
|
86
|
+
itemButton,
|
|
85
87
|
}: SortableTreeItemProps) {
|
|
86
88
|
const [expanded, setExpanded] = useState(isExpanded);
|
|
87
89
|
const [isModalVisible, setIsModalVisible] = useState(isNewAdded);
|
|
@@ -287,9 +289,13 @@ export function SortableTreeItem({
|
|
|
287
289
|
className={clsx(
|
|
288
290
|
"sortable-tree-item-title",
|
|
289
291
|
modalLabel && "sortable-tree-product-set-element-title",
|
|
292
|
+
"d-flex justify-content-between",
|
|
290
293
|
)}
|
|
291
294
|
>
|
|
292
295
|
{title}
|
|
296
|
+
<div className="sortable-tree-item-subtitle">
|
|
297
|
+
{itemButton}
|
|
298
|
+
</div>
|
|
293
299
|
</span>
|
|
294
300
|
{!expanded && (
|
|
295
301
|
<span className="sortable-tree-item-subtitle">
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
$base-height: 2.5rem;
|
|
2
2
|
|
|
3
3
|
.button-wrapper {
|
|
4
|
-
|
|
5
|
-
height: $base-height;
|
|
6
|
-
width: $base-height;
|
|
7
|
-
border-radius: $base-height;
|
|
8
|
-
transition: $color-transition;
|
|
9
|
-
|
|
10
|
-
.back-button {
|
|
11
|
-
font-size: 2rem;
|
|
12
|
-
width: $base-height;
|
|
4
|
+
background-color: $snippet-page-header-steps-close-button-background-color;
|
|
13
5
|
height: $base-height;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
justify-content: center;
|
|
17
|
-
font-weight: lighter;
|
|
18
|
-
color: $snippet-page-header-steps-close-button-border-color;
|
|
6
|
+
width: $base-height;
|
|
7
|
+
border-radius: $base-height;
|
|
19
8
|
transition: $color-transition;
|
|
20
9
|
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
|
|
11
|
+
.back-button {
|
|
12
|
+
font-size: 2rem;
|
|
13
|
+
width: $base-height;
|
|
14
|
+
height: $base-height;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
font-weight: lighter;
|
|
19
|
+
color: $snippet-page-header-steps-close-button-border-color;
|
|
20
|
+
transition: $color-transition;
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
23
25
|
}
|
|
24
|
-
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
27
|
+
&.back-button {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
margin-right: 1rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "./BackButton.scss";
|
|
1
|
+
@import "./BackButton.scss";
|
|
@@ -33,15 +33,11 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&.active {
|
|
36
|
-
color: #
|
|
37
|
-
background: linear-gradient(
|
|
38
|
-
149.72deg,
|
|
39
|
-
#d9efff 50.04%,
|
|
40
|
-
#e9f4fe 107.75%
|
|
41
|
-
);
|
|
36
|
+
color: #0E8CE2;
|
|
37
|
+
background: linear-gradient(149.72deg, #D9EFFF 50.04%, #E9F4FE 107.75%);
|
|
42
38
|
|
|
43
39
|
svg path {
|
|
44
|
-
stroke: #
|
|
40
|
+
stroke: #0E8CE2;
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
43
|
}
|
|
@@ -66,3 +62,4 @@
|
|
|
66
62
|
}
|
|
67
63
|
}
|
|
68
64
|
}
|
|
65
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "./UserForm.scss";
|
|
1
|
+
@import "./UserForm.scss";
|