@licklist/design 0.67.2-dev.5 → 0.67.2
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 +12 -15
- package/dist/assets/iframe/selectArrow.svg.js +17 -0
- package/dist/auth/Login/LoginComponent.js +1 -2
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +40 -35
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -2
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +3 -5
- 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 -3
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
- 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 +3 -9
- 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 +0 -2
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/layout/DropDown.d.ts +1 -2
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/layout/DropDownToggle.d.ts.map +1 -1
- package/dist/layout/DropDownToggle.js +0 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +0 -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 +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 +2 -48
- package/dist/product-set/form/ProductSetForm.d.ts +1 -4
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +2 -60
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +2 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
- 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 +3 -0
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +3 -0
- package/dist/provider/location-input/LocationInput.d.ts +1 -4
- package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
- package/dist/provider/location-input/LocationInput.js +2 -41
- package/dist/provider/location-input/index.d.ts +0 -1
- package/dist/provider/location-input/index.d.ts.map +1 -1
- package/dist/provider/provider-form/ProviderForm.d.ts +1 -3
- package/dist/provider/provider-form/ProviderForm.d.ts.map +1 -1
- package/dist/provider/provider-form/ProviderForm.js +2 -4
- package/dist/provider/venue-form/VenueForm.d.ts +1 -3
- package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
- package/dist/provider/venue-form/VenueForm.js +2 -4
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +8 -4
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -3
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +3 -6
- package/dist/recurring-date-picker-input/utils.d.ts +0 -5
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +3 -75
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +2 -0
- 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 +0 -6
- package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +4 -10
- package/dist/styles/auth/AccessDenied.scss +1 -1
- package/dist/styles/back-button/BackButton.scss +24 -25
- package/dist/styles/back-button/_index.scss +1 -1
- package/dist/styles/company-user-form/UserForm.scss +7 -4
- package/dist/styles/company-user-form/_index.scss +1 -1
- package/dist/styles/custom-fields/CreateSortableListItem.scss +1 -2
- package/dist/styles/custom-fields/_index.scss +1 -1
- package/dist/styles/customers/Filter.scss +5 -5
- package/dist/styles/events/EditEventModal.scss +3 -1
- 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 +1 -0
- package/dist/styles/iframe-events/CalendarSelect.scss +1 -1
- package/dist/styles/iframe-events/CategoryStepsForm.scss +7 -6
- package/dist/styles/iframe-events/Event.scss +4 -2
- package/dist/styles/iframe-events/EventForm.scss +54 -54
- package/dist/styles/iframe-events/EventNavigationFooter.scss +0 -1
- 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 +2 -1
- package/dist/styles/product-set/CreateProductSetItem.scss +13 -15
- package/dist/styles/product-set/DateAndRecurrenceInput.scss +8 -6
- 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 +2 -25
- package/dist/styles/product-set/TutorialGifCard.scss +1 -1
- package/dist/styles/product-set/_index.scss +2 -2
- package/dist/styles/report/ReportCard.scss +0 -1
- package/dist/styles/report/_index.scss +1 -1
- package/dist/styles/resources-blocking/_index.scss +0 -4
- package/dist/styles/sales/BookingFilter.scss +2 -2
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/BookingTabs.scss +5 -7
- package/dist/styles/sales/Filters.scss +4 -5
- package/dist/styles/sales/GuestProfile.scss +175 -170
- package/dist/styles/sales/LifeTimeSales.scss +1 -1
- package/dist/styles/sales/ManualBooking.scss +2 -4
- package/dist/styles/snippet-templates/_snippetVariables.scss +244 -63
- 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 +32 -10
- package/dist/styles/themes/licklist/_variables.scss +1 -1
- package/dist/styles/tiptap-editor/TiptapEditor.scss +10 -9
- package/dist/styles/tiptap-editor/_index.scss +1 -1
- package/dist/styles/venue-map-sets/VenueMapSetForm.scss +4 -5
- package/dist/styles/virtualized/_index.scss +1 -1
- package/dist/styles/zones/ZoneForm.scss +0 -1
- package/dist/styles/zones/ZoneRecurrencesControl.scss +8 -6
- 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 +2 -3
- 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 +2 -4
- 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 +2 -4
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/package.json +8 -8
- 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 +28 -31
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +5 -3
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +4 -0
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
- 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 +2 -16
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -3
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
- package/src/layout/DropDown.tsx +1 -2
- package/src/layout/DropDownToggle.tsx +0 -2
- package/src/product-set/card/ProductSetCard.stories.tsx +1 -3
- package/src/product-set/control/DateAndRecurrenceInput.tsx +4 -3
- package/src/product-set/control/DateInput.tsx +1 -2
- 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 +1 -37
- package/src/product-set/form/ProductSetForm.tsx +3 -22
- package/src/product-set/form/ProductZonesControl.tsx +7 -4
- 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 +3 -0
- package/src/product-set/form/VenueMapsControl.tsx +3 -0
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +5 -5
- package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
- package/src/product-set/product/quantity/ProductQuantity.stories.tsx +1 -1
- package/src/product-set/product-zone/ProductZoneControl.tsx +9 -9
- package/src/provider/location-input/LocationInput.tsx +1 -36
- package/src/provider/location-input/index.ts +0 -1
- package/src/provider/provider-form/ProviderForm.tsx +1 -6
- package/src/provider/venue-form/VenueForm.tsx +1 -4
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
- package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +4 -11
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -12
- package/src/recurring-date-picker-input/utils.ts +1 -91
- package/src/sales/booking/results/components/ResultCard.tsx +2 -0
- package/src/setting/admin/AdminSetting.stories.tsx +0 -1
- 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 +0 -6
- package/src/sortable-tree/SortableTreeItem.tsx +0 -6
- package/src/styles/auth/AccessDenied.scss +1 -1
- package/src/styles/back-button/BackButton.scss +24 -25
- package/src/styles/back-button/_index.scss +1 -1
- package/src/styles/company-user-form/UserForm.scss +7 -4
- package/src/styles/company-user-form/_index.scss +1 -1
- package/src/styles/custom-fields/CreateSortableListItem.scss +1 -2
- package/src/styles/custom-fields/_index.scss +1 -1
- package/src/styles/customers/Filter.scss +5 -5
- package/src/styles/events/EditEventModal.scss +3 -1
- 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 +1 -0
- package/src/styles/iframe-events/CalendarSelect.scss +1 -1
- package/src/styles/iframe-events/CategoryStepsForm.scss +7 -6
- package/src/styles/iframe-events/Event.scss +4 -2
- package/src/styles/iframe-events/EventForm.scss +54 -54
- package/src/styles/iframe-events/EventNavigationFooter.scss +0 -1
- 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 +2 -1
- package/src/styles/product-set/CreateProductSetItem.scss +13 -15
- package/src/styles/product-set/DateAndRecurrenceInput.scss +8 -6
- 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 +2 -25
- package/src/styles/product-set/TutorialGifCard.scss +1 -1
- package/src/styles/product-set/_index.scss +2 -2
- package/src/styles/report/ReportCard.scss +0 -1
- package/src/styles/report/_index.scss +1 -1
- package/src/styles/resources-blocking/_index.scss +0 -4
- package/src/styles/sales/BookingFilter.scss +2 -2
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/BookingTabs.scss +5 -7
- package/src/styles/sales/Filters.scss +4 -5
- package/src/styles/sales/GuestProfile.scss +175 -170
- package/src/styles/sales/LifeTimeSales.scss +1 -1
- package/src/styles/sales/ManualBooking.scss +2 -4
- package/src/styles/snippet-templates/_snippetVariables.scss +244 -63
- 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 +32 -10
- package/src/styles/themes/licklist/_variables.scss +1 -1
- package/src/styles/tiptap-editor/TiptapEditor.scss +10 -9
- package/src/styles/tiptap-editor/_index.scss +1 -1
- package/src/styles/venue-map-sets/VenueMapSetForm.scss +4 -5
- package/src/styles/virtualized/_index.scss +1 -1
- package/src/styles/zones/ZoneForm.scss +0 -1
- package/src/styles/zones/ZoneRecurrencesControl.scss +8 -6
- package/src/tiptap-editor/TipTapEditor.stories.tsx +4 -6
- package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +2 -5
- package/src/zone/form/ZoneForm.tsx +2 -3
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +5 -7
- package/src/zone/form/utils/dates.ts +10 -9
- package/yarn.lock +141 -128
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
3
|
import { Form, Row, Col, Button } from 'react-bootstrap';
|
|
4
4
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
@@ -10,16 +10,7 @@ import { useDialogContext } from '../../modals/dialog/DialogContext.js';
|
|
|
10
10
|
import { ProductSetControl } from '../control/ProductSetControl.js';
|
|
11
11
|
import { ProductSetContextProvider, ProductSetLoadingContext } from './context.js';
|
|
12
12
|
import { getFilteredTemplates, checkAvailableTimesErrors } from '../utils/index.js';
|
|
13
|
-
import { ErrorModal } from '../../iframe/order-process/components/ErrorModal/ErrorModal.js';
|
|
14
13
|
|
|
15
|
-
function _array_like_to_array(arr, len) {
|
|
16
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
17
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
18
|
-
return arr2;
|
|
19
|
-
}
|
|
20
|
-
function _array_with_holes(arr) {
|
|
21
|
-
if (Array.isArray(arr)) return arr;
|
|
22
|
-
}
|
|
23
14
|
function _define_property(obj, key, value) {
|
|
24
15
|
if (key in obj) {
|
|
25
16
|
Object.defineProperty(obj, key, {
|
|
@@ -33,33 +24,6 @@ function _define_property(obj, key, value) {
|
|
|
33
24
|
}
|
|
34
25
|
return obj;
|
|
35
26
|
}
|
|
36
|
-
function _iterable_to_array_limit(arr, i) {
|
|
37
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
38
|
-
if (_i == null) return;
|
|
39
|
-
var _arr = [];
|
|
40
|
-
var _n = true;
|
|
41
|
-
var _d = false;
|
|
42
|
-
var _s, _e;
|
|
43
|
-
try {
|
|
44
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
45
|
-
_arr.push(_s.value);
|
|
46
|
-
if (i && _arr.length === i) break;
|
|
47
|
-
}
|
|
48
|
-
} catch (err) {
|
|
49
|
-
_d = true;
|
|
50
|
-
_e = err;
|
|
51
|
-
} finally{
|
|
52
|
-
try {
|
|
53
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
54
|
-
} finally{
|
|
55
|
-
if (_d) throw _e;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return _arr;
|
|
59
|
-
}
|
|
60
|
-
function _non_iterable_rest() {
|
|
61
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
62
|
-
}
|
|
63
27
|
function _object_spread(target) {
|
|
64
28
|
for(var i = 1; i < arguments.length; i++){
|
|
65
29
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -126,17 +90,6 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
126
90
|
}
|
|
127
91
|
return target;
|
|
128
92
|
}
|
|
129
|
-
function _sliced_to_array(arr, i) {
|
|
130
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
131
|
-
}
|
|
132
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
133
|
-
if (!o) return;
|
|
134
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
135
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
136
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
137
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
138
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
139
|
-
}
|
|
140
93
|
function ProductSetForm(_param) {
|
|
141
94
|
var companyName = _param.companyName, isLoading = _param.isLoading, defaultValues = _param.defaultValues, onSubmitAndRedirect = _param.onSubmitAndRedirect, onSubmitNoRedirect = _param.onSubmitNoRedirect, productGroupList = _param.productGroupList, serverErrors = _param.serverErrors, _param_providerHasMap = _param.providerHasMap, providerHasMap = _param_providerHasMap === void 0 ? false : _param_providerHasMap, _param_venueMapSets = _param.venueMapSets, venueMapSets = _param_venueMapSets === void 0 ? [] : _param_venueMapSets, providerHasBookingManagement = _param.providerHasBookingManagement, zones = _param.zones, isCreateAction = _param.isCreateAction, workHours = _param.workHours, isOverrides = _param.isOverrides, isCreateNewOverrides = _param.isCreateNewOverrides, shared = _object_without_properties(_param, [
|
|
142
95
|
"companyName",
|
|
@@ -157,7 +110,6 @@ function ProductSetForm(_param) {
|
|
|
157
110
|
]);
|
|
158
111
|
var t = useTranslation("Design").t;
|
|
159
112
|
var _useDialogContext = useDialogContext(), isShownDialog = _useDialogContext.isShownDialog, onBeforeUnload = _useDialogContext.onBeforeUnload, onPopState = _useDialogContext.onPopState, onApproveDialog = _useDialogContext.onApproveDialog, onDeclineDialog = _useDialogContext.onDeclineDialog;
|
|
160
|
-
var _useState = _sliced_to_array(useState(""), 2), errorMessage = _useState[0], setErrorMessage = _useState[1];
|
|
161
113
|
var form = useForm({
|
|
162
114
|
defaultValues: defaultValues,
|
|
163
115
|
mode: "onChange"
|
|
@@ -189,16 +141,13 @@ function ProductSetForm(_param) {
|
|
|
189
141
|
if (!serverErrors) {
|
|
190
142
|
return;
|
|
191
143
|
}
|
|
192
|
-
if (Array.isArray(serverErrors) && serverErrors[0]) {
|
|
193
|
-
setErrorMessage(serverErrors[0]);
|
|
194
|
-
}
|
|
195
144
|
FormErrorService.handleServerErrors(serverErrors, setError);
|
|
196
145
|
}, [
|
|
197
146
|
serverErrors,
|
|
198
147
|
setError
|
|
199
148
|
]);
|
|
200
149
|
useEffect(function() {
|
|
201
|
-
window.history.pushState(null, "", window.location.pathname
|
|
150
|
+
window.history.pushState(null, "", window.location.pathname);
|
|
202
151
|
window.addEventListener("beforeunload", onBeforeUnload);
|
|
203
152
|
window.addEventListener("popstate", onPopState);
|
|
204
153
|
return function() {
|
|
@@ -221,13 +170,6 @@ function ProductSetForm(_param) {
|
|
|
221
170
|
onApprove: onApproveDialog,
|
|
222
171
|
onDecline: onDeclineDialog
|
|
223
172
|
}),
|
|
224
|
-
/*#__PURE__*/ jsx(ErrorModal, {
|
|
225
|
-
message: errorMessage,
|
|
226
|
-
isOpen: !!errorMessage,
|
|
227
|
-
onClose: function() {
|
|
228
|
-
return setErrorMessage("");
|
|
229
|
-
}
|
|
230
|
-
}),
|
|
231
173
|
/*#__PURE__*/ jsx(FormProvider, _object_spread_props(_object_spread({}, form), {
|
|
232
174
|
children: /*#__PURE__*/ jsx(Form, {
|
|
233
175
|
onSubmit: form.handleSubmit(submitHandler(onSubmitAndRedirect)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAQtE,UAAU,wBAAwB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAaD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,UAAU,mDAIrD,wBAAwB,CAAC,CAAC,CAAC,4CAqI7B,CAAC"}
|
|
@@ -11,6 +11,8 @@ import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
|
|
|
11
11
|
import { SortableTree } from '../../sortable-tree/SortableTree.js';
|
|
12
12
|
import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js';
|
|
13
13
|
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
+
// @ts-nocheck
|
|
14
16
|
function _array_like_to_array(arr, len) {
|
|
15
17
|
if (len == null || len > arr.length) len = arr.length;
|
|
16
18
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
1
|
import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
3
|
-
export declare const CATEGORY_TYPES_NAMES: {
|
|
4
|
-
readonly menuItems: "menuItems";
|
|
5
|
-
readonly tickets: "tickets";
|
|
6
|
-
readonly bookings: "bookings";
|
|
7
|
-
readonly game: "game";
|
|
8
|
-
readonly fixedDuration: "fixedDuration";
|
|
9
|
-
};
|
|
10
|
-
export type CategoryConfig = {
|
|
11
|
-
label: string;
|
|
12
|
-
icon: ReactElement;
|
|
13
|
-
};
|
|
14
2
|
export interface SelectCategoryModalProps {
|
|
15
3
|
isVisible: boolean;
|
|
16
4
|
onHide: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAML,YAAY,EACb,MAAM,kEAAkE,CAAC;AAoD1E,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;CACpD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,MAAM,EACN,gBAAgB,GACjB,EAAE,wBAAwB,2CAyH1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SubProductsControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"SubProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SubProductsControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,EAAE,uBAAuB,2CA4DzB"}
|
|
@@ -108,6 +108,9 @@ function SubProductsControl(param) {
|
|
|
108
108
|
images: (_subProducts_index = subProducts[index]) === null || _subProducts_index === void 0 ? void 0 : _subProducts_index.images
|
|
109
109
|
});
|
|
110
110
|
// @ts-expect-error TS2345
|
|
111
|
+
// @TODO fix prod type error
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
113
|
+
// @ts-ignore
|
|
111
114
|
append(subProductCopy);
|
|
112
115
|
}
|
|
113
116
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VenueMapsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/VenueMapsControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAG7F,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF,eAAO,MAAM,gBAAgB,mEAK1B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"VenueMapsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/VenueMapsControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAG7F,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF,eAAO,MAAM,gBAAgB,mEAK1B,qBAAqB,4CAgEvB,CAAC"}
|
|
@@ -35,6 +35,9 @@ var VenueMapsControl = function(param) {
|
|
|
35
35
|
url: image.url,
|
|
36
36
|
name: name,
|
|
37
37
|
points: points,
|
|
38
|
+
// @TODO fix prod type error
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
40
|
+
// @ts-ignore
|
|
38
41
|
products: products,
|
|
39
42
|
pointProducts: pointProducts,
|
|
40
43
|
onPointProductsChange: onPointProductsChange
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function LocationInput({ path }: {
|
|
3
|
-
path: TimeZonePath;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function LocationInput(): import("react/jsx-runtime").JSX.Element;
|
|
5
2
|
//# sourceMappingURL=LocationInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationInput.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/LocationInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LocationInput.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/LocationInput.tsx"],"names":[],"mappings":"AAQA,wBAAgB,aAAa,4CA2C5B"}
|
|
@@ -3,11 +3,8 @@ import { useId } from '@react-aria/utils';
|
|
|
3
3
|
import { Form } from 'react-bootstrap';
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { useTimeZoneApi } from '@licklist/plugins';
|
|
7
|
-
import '../../static/index.js';
|
|
8
6
|
import CountryCodeSelect from '../../static/CountryCodeSelect.js';
|
|
9
7
|
import { FormGroupControll } from './components/FormGroupControll.js';
|
|
10
|
-
import { BlockLoader } from '../../static/loader/BlockLoader.js';
|
|
11
8
|
|
|
12
9
|
function _define_property(obj, key, value) {
|
|
13
10
|
if (key in obj) {
|
|
@@ -61,12 +58,10 @@ function _object_spread_props(target, source) {
|
|
|
61
58
|
}
|
|
62
59
|
return target;
|
|
63
60
|
}
|
|
64
|
-
function LocationInput(
|
|
65
|
-
var
|
|
66
|
-
var _errors_location, _errors_location1, _errors_location2, _errors_location3, _errors_location_country, _errors_location4, _errors_timeZoneId, _errors_timeZoneId1;
|
|
61
|
+
function LocationInput() {
|
|
62
|
+
var _errors_location, _errors_location1, _errors_location2, _errors_location3, _errors_location_country, _errors_location4;
|
|
67
63
|
var _useFormContext = useFormContext(), register = _useFormContext.register, errors = _useFormContext.formState.errors;
|
|
68
64
|
var t = useTranslation("Design").t;
|
|
69
|
-
var _useTimeZoneApi_useAll = useTimeZoneApi(path).useAll(), data = _useTimeZoneApi_useAll.data, isLoading = _useTimeZoneApi_useAll.isLoading;
|
|
70
65
|
var countryId = useId();
|
|
71
66
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
72
67
|
children: [
|
|
@@ -108,40 +103,6 @@ function LocationInput(param) {
|
|
|
108
103
|
error: errors === null || errors === void 0 ? void 0 : (_errors_location4 = errors.location) === null || _errors_location4 === void 0 ? void 0 : (_errors_location_country = _errors_location4.country) === null || _errors_location_country === void 0 ? void 0 : _errors_location_country.message
|
|
109
104
|
})
|
|
110
105
|
]
|
|
111
|
-
}),
|
|
112
|
-
isLoading ? /*#__PURE__*/ jsx(BlockLoader, {}) : /*#__PURE__*/ jsxs(Form.Group, {
|
|
113
|
-
controlId: "timeZoneId",
|
|
114
|
-
children: [
|
|
115
|
-
/*#__PURE__*/ jsx(Form.Label, {
|
|
116
|
-
children: t("locationTimeZone")
|
|
117
|
-
}),
|
|
118
|
-
/*#__PURE__*/ jsxs(Form.Control, _object_spread_props(_object_spread({}, register("timeZoneId", {
|
|
119
|
-
required: t("Validation:fieldRequired", {
|
|
120
|
-
attribute: t("locationTimeZone")
|
|
121
|
-
})
|
|
122
|
-
})), {
|
|
123
|
-
as: "select",
|
|
124
|
-
custom: true,
|
|
125
|
-
isInvalid: Boolean(errors === null || errors === void 0 ? void 0 : (_errors_timeZoneId = errors.timeZoneId) === null || _errors_timeZoneId === void 0 ? void 0 : _errors_timeZoneId.message),
|
|
126
|
-
children: [
|
|
127
|
-
/*#__PURE__*/ jsx("option", {
|
|
128
|
-
value: "",
|
|
129
|
-
disabled: true,
|
|
130
|
-
children: t("chooseTimeZone")
|
|
131
|
-
}, ""),
|
|
132
|
-
data.map(function(zone) {
|
|
133
|
-
return /*#__PURE__*/ jsx("option", {
|
|
134
|
-
value: zone.id.toString(),
|
|
135
|
-
children: zone.name
|
|
136
|
-
}, zone.id);
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
|
-
})),
|
|
140
|
-
/*#__PURE__*/ jsx(Form.Control.Feedback, {
|
|
141
|
-
type: "invalid",
|
|
142
|
-
children: errors === null || errors === void 0 ? void 0 : (_errors_timeZoneId1 = errors.timeZoneId) === null || _errors_timeZoneId1 === void 0 ? void 0 : _errors_timeZoneId1.message
|
|
143
|
-
})
|
|
144
|
-
]
|
|
145
106
|
})
|
|
146
107
|
]
|
|
147
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
|
|
2
|
-
import { TimeZonePath } from "@licklist/plugins";
|
|
3
2
|
import { CategoriesInputProps, CategoriesInputValues } from "../categories-input";
|
|
4
3
|
import { LocationInputValues } from "../location-input";
|
|
5
4
|
import { ProviderDetailsInputProps, ProviderDetailsInputValues } from "../provider-details-input";
|
|
@@ -12,7 +11,6 @@ export interface ProviderFormProps extends HasPermissionProp {
|
|
|
12
11
|
companiesOptions?: TypeaheadOptions[];
|
|
13
12
|
onSubmit: (values: ProviderFormValues) => void;
|
|
14
13
|
intent?: "create" | "update";
|
|
15
|
-
path: TimeZonePath;
|
|
16
14
|
}
|
|
17
|
-
export declare function ProviderForm({ defaultValues, categories, companiesOptions, linkTypes, onSubmit, intent, hasPermission,
|
|
15
|
+
export declare function ProviderForm({ defaultValues, categories, companiesOptions, linkTypes, onSubmit, intent, hasPermission, }: ProviderFormProps): import("react/jsx-runtime").JSX.Element;
|
|
18
16
|
//# sourceMappingURL=ProviderForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderForm.d.ts","sourceRoot":"","sources":["../../../src/provider/provider-form/ProviderForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"ProviderForm.d.ts","sourceRoot":"","sources":["../../../src/provider/provider-form/ProviderForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAEvF,OAAO,EAGL,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,GACzD,mBAAmB,GACnB,qBAAqB,CAAC;AAExB,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC;IACnD,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC9B;AAOD,wBAAgB,YAAY,CAAC,EAC3B,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,MAAiB,EACjB,aAAoB,GACrB,EAAE,iBAAiB,2CA6GnB"}
|
|
@@ -116,7 +116,7 @@ var providerImageTypes = {
|
|
|
116
116
|
uploadCover: IMAGE_TYPE_MAP[IMAGE_TYPE_COVER]
|
|
117
117
|
};
|
|
118
118
|
function ProviderForm(param) {
|
|
119
|
-
var defaultValues = param.defaultValues, categories = param.categories, companiesOptions = param.companiesOptions, linkTypes = param.linkTypes, onSubmit = param.onSubmit, _param_intent = param.intent, intent = _param_intent === void 0 ? "update" : _param_intent, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission
|
|
119
|
+
var defaultValues = param.defaultValues, categories = param.categories, companiesOptions = param.companiesOptions, linkTypes = param.linkTypes, onSubmit = param.onSubmit, _param_intent = param.intent, intent = _param_intent === void 0 ? "update" : _param_intent, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission;
|
|
120
120
|
var _errors_location_country, _errors_location;
|
|
121
121
|
var form = useForm({
|
|
122
122
|
defaultValues: defaultValues
|
|
@@ -158,9 +158,7 @@ function ProviderForm(param) {
|
|
|
158
158
|
label: t("location"),
|
|
159
159
|
description: /*#__PURE__*/ jsx(LocationInputDescription, {}),
|
|
160
160
|
error: errors === null || errors === void 0 ? void 0 : (_errors_location = errors.location) === null || _errors_location === void 0 ? void 0 : (_errors_location_country = _errors_location.country) === null || _errors_location_country === void 0 ? void 0 : _errors_location_country.message,
|
|
161
|
-
children: /*#__PURE__*/ jsx(LocationInput, {
|
|
162
|
-
path: path
|
|
163
|
-
})
|
|
161
|
+
children: /*#__PURE__*/ jsx(LocationInput, {})
|
|
164
162
|
}),
|
|
165
163
|
categories && categories.length > 0 && /*#__PURE__*/ jsx(CollapsibleInputGroup, {
|
|
166
164
|
eventKey: "categories",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
|
|
2
|
-
import { TimeZonePath } from "@licklist/plugins";
|
|
3
2
|
import { CategoriesInputProps, CategoriesInputValues } from "../categories-input";
|
|
4
3
|
import { LocationInputValues } from "../location-input";
|
|
5
4
|
import { ProviderDetailsInputProps, ProviderDetailsInputValues } from "../provider-details-input";
|
|
@@ -15,7 +14,6 @@ export interface VenueFormProps extends HasPermissionProp {
|
|
|
15
14
|
intent?: "create" | "update";
|
|
16
15
|
isLoading?: boolean;
|
|
17
16
|
errorResponse?: unknown;
|
|
18
|
-
path: TimeZonePath;
|
|
19
17
|
}
|
|
20
|
-
export declare function VenueForm({ defaultValues, categories, linkTypes, companiesOptions, onSubmit, intent, hasPermission, isLoading, errorResponse,
|
|
18
|
+
export declare function VenueForm({ defaultValues, categories, linkTypes, companiesOptions, onSubmit, intent, hasPermission, isLoading, errorResponse, }: VenueFormProps): import("react/jsx-runtime").JSX.Element;
|
|
21
19
|
//# sourceMappingURL=VenueForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VenueForm.d.ts","sourceRoot":"","sources":["../../../src/provider/venue-form/VenueForm.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"VenueForm.d.ts","sourceRoot":"","sources":["../../../src/provider/venue-form/VenueForm.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAIvF,OAAO,EAGL,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,MAAM,eAAe,GAAG,0BAA0B,GACtD,mBAAmB,GACnB,uBAAuB,GACvB,qBAAqB,CAAC;AAExB,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC;IACnD,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAOD,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,UAAU,EACV,SAAS,EACT,gBAAqB,EACrB,QAAQ,EACR,MAAiB,EACjB,aAAoB,EACpB,SAAS,EACT,aAAa,GACd,EAAE,cAAc,2CAmKhB"}
|
|
@@ -119,7 +119,7 @@ var providerImageTypes = {
|
|
|
119
119
|
uploadCover: IMAGE_TYPE_MAP[IMAGE_TYPE_COVER]
|
|
120
120
|
};
|
|
121
121
|
function VenueForm(param) {
|
|
122
|
-
var defaultValues = param.defaultValues, categories = param.categories, linkTypes = param.linkTypes, _param_companiesOptions = param.companiesOptions, companiesOptions = _param_companiesOptions === void 0 ? [] : _param_companiesOptions, onSubmit = param.onSubmit, _param_intent = param.intent, intent = _param_intent === void 0 ? "update" : _param_intent, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, isLoading = param.isLoading, errorResponse = param.errorResponse
|
|
122
|
+
var defaultValues = param.defaultValues, categories = param.categories, linkTypes = param.linkTypes, _param_companiesOptions = param.companiesOptions, companiesOptions = _param_companiesOptions === void 0 ? [] : _param_companiesOptions, onSubmit = param.onSubmit, _param_intent = param.intent, intent = _param_intent === void 0 ? "update" : _param_intent, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, isLoading = param.isLoading, errorResponse = param.errorResponse;
|
|
123
123
|
var _errors_location, _errors_workingHours, _errors_categories;
|
|
124
124
|
var form = useForm({
|
|
125
125
|
defaultValues: defaultValues,
|
|
@@ -186,9 +186,7 @@ function VenueForm(param) {
|
|
|
186
186
|
error: (errors === null || errors === void 0 ? void 0 : (_errors_location = errors.location) === null || _errors_location === void 0 ? void 0 : _errors_location.message) || (errors === null || errors === void 0 ? void 0 : errors.location) && t("Validation:isNotValidField", {
|
|
187
187
|
attribute: "The location data"
|
|
188
188
|
}),
|
|
189
|
-
children: /*#__PURE__*/ jsx(LocationInput, {
|
|
190
|
-
path: path
|
|
191
|
-
})
|
|
189
|
+
children: /*#__PURE__*/ jsx(LocationInput, {})
|
|
192
190
|
}),
|
|
193
191
|
/*#__PURE__*/ jsx(CollapsibleInputGroup, {
|
|
194
192
|
eventKey: "workingHours",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkingHoursInputDescription.d.ts","sourceRoot":"","sources":["../../../src/provider/working-hours-input/WorkingHoursInputDescription.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkingHoursInputDescription.d.ts","sourceRoot":"","sources":["../../../src/provider/working-hours-input/WorkingHoursInputDescription.tsx"],"names":[],"mappings":"AAQA,wBAAgB,4BAA4B,4CAwC3C"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { DateTime } from 'luxon';
|
|
2
3
|
import { Row, Col } from 'react-bootstrap';
|
|
3
4
|
import { useFormContext } from 'react-hook-form';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { TIME_FORMAT } from '@licklist/core/dist/Config';
|
|
5
7
|
import { useWeekdays } from './utils.js';
|
|
6
8
|
|
|
7
9
|
function WorkingHoursInputDescription() {
|
|
@@ -30,10 +32,12 @@ function WorkingHoursInputDescription() {
|
|
|
30
32
|
]
|
|
31
33
|
}),
|
|
32
34
|
/*#__PURE__*/ jsx(Col, {
|
|
33
|
-
children: t("timeInterval", {
|
|
34
|
-
start: weekday.start,
|
|
35
|
-
end: weekday.
|
|
36
|
-
})
|
|
35
|
+
children: (weekday === null || weekday === void 0 ? void 0 : weekday.end) ? weekday.start ? t("timeInterval", {
|
|
36
|
+
start: DateTime.fromISO(weekday.start).toFormat(TIME_FORMAT),
|
|
37
|
+
end: DateTime.fromISO(weekday.start).toFormat(TIME_FORMAT)
|
|
38
|
+
}) : t("timeFrom", {
|
|
39
|
+
start: DateTime.fromISO(weekday.start).toFormat(TIME_FORMAT)
|
|
40
|
+
}) : null
|
|
37
41
|
})
|
|
38
42
|
]
|
|
39
43
|
}, i);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
2
|
import { Frequency, Weekday } from "rrule";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
5
4
|
import { SupportedFrequency } from "./utils";
|
|
6
5
|
export interface RecurringDatePickerInputProps {
|
|
7
6
|
disabled?: boolean;
|
|
@@ -11,7 +10,6 @@ export interface RecurringDatePickerInputProps {
|
|
|
11
10
|
initialFrequency?: Frequency;
|
|
12
11
|
setInitialStartDateAfterSelect?: boolean;
|
|
13
12
|
minDate?: string;
|
|
14
|
-
workHours: WorkHour[] | undefined;
|
|
15
13
|
}
|
|
16
14
|
export interface RecurringDatePickerInputValues {
|
|
17
15
|
rrule?: string;
|
|
@@ -26,6 +24,6 @@ export interface RecurringDatePickerInputValues {
|
|
|
26
24
|
count?: number;
|
|
27
25
|
withOutEndDate?: boolean;
|
|
28
26
|
}
|
|
29
|
-
export declare function RecurringDatePickerInput({ disabled, onChange, onDelete, defaultValues, initialFrequency, setInitialStartDateAfterSelect, children, minDate,
|
|
27
|
+
export declare function RecurringDatePickerInput({ disabled, onChange, onDelete, defaultValues, initialFrequency, setInitialStartDateAfterSelect, children, minDate, }: PropsWithChildren<RecurringDatePickerInputProps>): import("react/jsx-runtime").JSX.Element;
|
|
30
28
|
export declare const getDateTimeObject: (date: string, time: string) => DateTime | string;
|
|
31
29
|
//# sourceMappingURL=RecurringDatePickerInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecurringDatePickerInput.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/RecurringDatePickerInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RecurringDatePickerInput.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/RecurringDatePickerInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAC;AAY3C,OAAO,EAAyB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIpE,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACxD,QAAQ,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,8BAA8B;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CAAC,EACvC,QAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,gBAAkC,EAClC,8BAAsC,EACtC,QAAQ,EACR,OAAO,GACR,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,2CA0LlD;AAmGD,eAAO,MAAM,iBAAiB,SACtB,MAAM,QACN,MAAM,KACX,QAAQ,GAAG,MAiBb,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { useForm, FormProvider } from 'react-hook-form';
|
|
|
11
11
|
import { Form } from 'react-bootstrap';
|
|
12
12
|
import RecurrenceIntervalAndFrequencyInput from './RecurrenceIntervalAndFrequencyInput.js';
|
|
13
13
|
import RecurrenceWeekdaysInput from './RecurrenceWeekdaysInput.js';
|
|
14
|
-
import {
|
|
14
|
+
import { parseAndValidateRRule } from './utils.js';
|
|
15
15
|
import { ConfirmModal } from '../modals/confirmation/ConfirmModal.js';
|
|
16
16
|
import { DeleteFieldButton } from '../product-set/elements/DeleteFieldButton.js';
|
|
17
17
|
|
|
@@ -133,7 +133,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
133
133
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
134
134
|
}
|
|
135
135
|
function RecurringDatePickerInput(param) {
|
|
136
|
-
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, onChange = param.onChange, onDelete = param.onDelete, defaultValues = param.defaultValues, _param_initialFrequency = param.initialFrequency, initialFrequency = _param_initialFrequency === void 0 ? Frequency.DAILY : _param_initialFrequency, _param_setInitialStartDateAfterSelect = param.setInitialStartDateAfterSelect, setInitialStartDateAfterSelect = _param_setInitialStartDateAfterSelect === void 0 ? false : _param_setInitialStartDateAfterSelect, children = param.children, minDate = param.minDate
|
|
136
|
+
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, onChange = param.onChange, onDelete = param.onDelete, defaultValues = param.defaultValues, _param_initialFrequency = param.initialFrequency, initialFrequency = _param_initialFrequency === void 0 ? Frequency.DAILY : _param_initialFrequency, _param_setInitialStartDateAfterSelect = param.setInitialStartDateAfterSelect, setInitialStartDateAfterSelect = _param_setInitialStartDateAfterSelect === void 0 ? false : _param_setInitialStartDateAfterSelect, children = param.children, minDate = param.minDate;
|
|
137
137
|
var t = useTranslation([
|
|
138
138
|
"Design"
|
|
139
139
|
]).t;
|
|
@@ -163,7 +163,6 @@ function RecurringDatePickerInput(param) {
|
|
|
163
163
|
endTime: endTime,
|
|
164
164
|
byWeekDay: byWeekDay
|
|
165
165
|
});
|
|
166
|
-
var validator = useWorkHoursValidation(byWeekDay, workHours);
|
|
167
166
|
var onSubmit = function(nextState) {
|
|
168
167
|
var end = getDateTimeObject(endDate, endTime || "23:59:59");
|
|
169
168
|
// Sometimes ge get there an object of Weekday
|
|
@@ -242,9 +241,7 @@ function RecurringDatePickerInput(param) {
|
|
|
242
241
|
}),
|
|
243
242
|
/*#__PURE__*/ jsx(RecurrenceIntervalAndFrequencyInput, {
|
|
244
243
|
disabled: disabled,
|
|
245
|
-
minDate: minDate
|
|
246
|
-
startTimeRules: validator,
|
|
247
|
-
endTimeRules: validator
|
|
244
|
+
minDate: minDate
|
|
248
245
|
}),
|
|
249
246
|
children,
|
|
250
247
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
2
|
-
import { Validate } from "react-hook-form";
|
|
3
1
|
import { Frequency, Weekday } from "rrule";
|
|
4
2
|
export declare const getWeekdayForFrequency: ({ date, frequency, }: {
|
|
5
3
|
date: string;
|
|
@@ -17,7 +15,4 @@ export declare const parseAndValidateRRule: ({ rrule, date, }: {
|
|
|
17
15
|
rrule: string;
|
|
18
16
|
date: string;
|
|
19
17
|
}) => ParsedRRuleOptions;
|
|
20
|
-
export declare const useWorkHoursValidation: (byWeekDay: Weekday[], workHours: WorkHour[] | undefined) => {
|
|
21
|
-
validate?: Validate<string>;
|
|
22
|
-
};
|
|
23
18
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/utils.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/utils.ts"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,sBAAsB,yBAGhC;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;CACtB,KAAG,OAUH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,SAAS,CAAC,KAAK,GACf,SAAS,CAAC,MAAM,GAChB,SAAS,CAAC,OAAO,GACjB,SAAS,CAAC,MAAM,CAAC;AAErB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,qBAAqB,qBAG/B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,KAoEM,kBACN,CAAC"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fromFormat } from '@licklist/plugins/dist/utils/dateTime';
|
|
3
|
-
import { Interval, DateTime } from 'luxon';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
5
2
|
import RRule, { Frequency, Weekday } from 'rrule';
|
|
6
3
|
|
|
7
4
|
var getWeekdayForFrequency = function(param) {
|
|
8
5
|
var date = param.date, frequency = param.frequency;
|
|
9
6
|
var parsedDate = DateTime.fromISO(date);
|
|
10
|
-
return new Weekday(parsedDate.weekday - 1,
|
|
11
|
-
frequency !== Frequency.MONTHLY ? undefined : parsedDate.day + 7 > parsedDate.daysInMonth ? -1 : Math.floor(parsedDate.day / 7) + 1);
|
|
7
|
+
return new Weekday(parsedDate.weekday - 1, frequency !== Frequency.MONTHLY ? undefined : parsedDate.day + 7 > parsedDate.daysInMonth ? -1 : Math.floor(parsedDate.day / 7) + 1);
|
|
12
8
|
};
|
|
13
9
|
var parseAndValidateRRule = function(param) {
|
|
14
10
|
var rrule = param.rrule, date = param.date;
|
|
@@ -73,73 +69,5 @@ var parseAndValidateRRule = function(param) {
|
|
|
73
69
|
until: options.until
|
|
74
70
|
};
|
|
75
71
|
};
|
|
76
|
-
var useWorkHoursValidation = function() {
|
|
77
|
-
var byWeekDay = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], workHours = arguments.length > 1 ? arguments[1] : void 0;
|
|
78
|
-
var t = useTranslation("Validation").t;
|
|
79
|
-
if (!workHours) return {};
|
|
80
|
-
var fromTimeFormat = fromFormat(TIME_FORMAT);
|
|
81
|
-
var fromTimeFullFormat = fromFormat(TIME_FULL_FORMAT);
|
|
82
|
-
// map every day to array of intervals describing workhours for that day
|
|
83
|
-
var intervalsByDay = workHours.map(function(workhour, index, self) {
|
|
84
|
-
var res = [];
|
|
85
|
-
var startTime = fromTimeFormat(workhour.start);
|
|
86
|
-
var endTime = fromTimeFormat(workhour.end);
|
|
87
|
-
if (endTime > startTime) {
|
|
88
|
-
res.push(Interval.fromDateTimes(startTime, endTime));
|
|
89
|
-
} else {
|
|
90
|
-
// if end is before start, then it means that end is on the next day
|
|
91
|
-
// so count only to the end of current day
|
|
92
|
-
res.push(Interval.fromDateTimes(startTime, startTime.endOf("day")));
|
|
93
|
-
}
|
|
94
|
-
var prevIndex = index === 0 ? self.length - 1 : index - 1;
|
|
95
|
-
var prevStartTime = fromTimeFormat(self[prevIndex].start);
|
|
96
|
-
var prevEndTime = fromTimeFormat(self[prevIndex].end);
|
|
97
|
-
// if prevStartTime > prevEndTime then it means that prevEndTime is on the current day
|
|
98
|
-
// so we need to add interval from start of current day to prevEndTime
|
|
99
|
-
if (prevStartTime > prevEndTime) {
|
|
100
|
-
res.push(Interval.fromDateTimes(prevEndTime.startOf("day"), prevEndTime));
|
|
101
|
-
}
|
|
102
|
-
return res;
|
|
103
|
-
});
|
|
104
|
-
// if length === 0 or length === 7 then all workhours are selected, no need to filter
|
|
105
|
-
if (![
|
|
106
|
-
0,
|
|
107
|
-
7
|
|
108
|
-
].includes(byWeekDay.length)) {
|
|
109
|
-
intervalsByDay = intervalsByDay.filter(function(_, index) {
|
|
110
|
-
return byWeekDay.find(function(param) {
|
|
111
|
-
var weekday = param.weekday;
|
|
112
|
-
return weekday === index;
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
validate: function(_time) {
|
|
118
|
-
// workaround for issue with form values
|
|
119
|
-
// default values and entered values have different formats
|
|
120
|
-
var time = fromTimeFormat(_time).isValid ? fromTimeFormat(_time) : fromTimeFullFormat(_time);
|
|
121
|
-
var notFittingIntervalsByDay = intervalsByDay.reduce(function(acc, intervalsByDay) {
|
|
122
|
-
if (!intervalsByDay.some(function(interval) {
|
|
123
|
-
return interval.contains(time);
|
|
124
|
-
})) {
|
|
125
|
-
acc.push(intervalsByDay);
|
|
126
|
-
}
|
|
127
|
-
return acc;
|
|
128
|
-
}, []);
|
|
129
|
-
var notFittingIntervals = notFittingIntervalsByDay.flat().filter(function(interval) {
|
|
130
|
-
return !interval.contains(time);
|
|
131
|
-
});
|
|
132
|
-
var attribute = notFittingIntervals.map(function(interval) {
|
|
133
|
-
return interval.toFormat("HH:mm");
|
|
134
|
-
}).join(", ");
|
|
135
|
-
if (notFittingIntervalsByDay.length !== 0) {
|
|
136
|
-
return t("outsideWorkingHours", {
|
|
137
|
-
attribute: attribute
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
72
|
|
|
145
|
-
export { getWeekdayForFrequency, parseAndValidateRRule
|
|
73
|
+
export { getWeekdayForFrequency, parseAndValidateRRule };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;AAO1E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;
|
|
1
|
+
{"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;AAO1E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAIF,eAAO,MAAM,UAAU,oDAKpB,eAAe,4CA2FjB,CAAC"}
|
|
@@ -10,6 +10,8 @@ import { formatDateStringForEvent } from '@licklist/plugins/dist/utils/formatDat
|
|
|
10
10
|
import { getOrderSourceTitle } from '@licklist/plugins/dist/utils/sourceTitle';
|
|
11
11
|
import { FaUser } from 'react-icons/fa';
|
|
12
12
|
|
|
13
|
+
// @TODO integrate when API will be available
|
|
14
|
+
// activity and staff keys
|
|
13
15
|
var ResultCard = function(param) {
|
|
14
16
|
var order = param.order, className = param.className, staffMember = param.staffMember, onCardClick = param.onCardClick;
|
|
15
17
|
var _products_map, _user_userDetail, _user_userDetail1;
|