@licklist/design 0.58.6-dev.11 → 0.58.6-dev.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/dist/assets/iframe/calendar.svg +2 -2
- package/dist/assets/iframe/calendar.svg.js +1 -1
- package/dist/assets/iframe/ticket.svg +2 -2
- package/dist/assets/iframe/ticket.svg.js +1 -1
- package/dist/calendar/Calendar.d.ts +1 -1
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/Calendar.js +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
- package/dist/iframe/event/event-venue-map/IframeEventVenueMap.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +2 -2
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +2 -4
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +2 -4
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -4
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.js +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
- package/dist/iframe/payment/order-items-table/OrderItemsTable.js +1 -1
- package/dist/iframe/payment/payment-form/PaymentForm.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentTimer.js +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +1 -1
- package/dist/product-set/form/VenueMapsControl.js +1 -1
- package/dist/product-set/product/ProductControl.d.ts +0 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/constants.d.ts +0 -1
- package/dist/product-set/product/constants.d.ts.map +1 -1
- package/dist/product-set/product/constants.js +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sales/notes/NotesTableRow.js +1 -1
- package/dist/setting/dashboard/snippets/card/SnippetCard.js +1 -1
- package/dist/snippet/snippet-template/control/PropertyControl.d.ts +1 -3
- package/dist/snippet/snippet-template/control/PropertyControl.d.ts.map +1 -1
- package/dist/snippet/snippet-template/control/PropertyControl.js +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +1 -1
- package/dist/striped-static-table/StripedStaticTable.js +1 -1
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
- package/dist/styles/iframe-page/PageBody.scss +1 -2
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
- package/dist/venue-map-sets/form/components/VenueMapImageControl.js +1 -1
- package/package.json +5 -3
- package/src/assets/iframe/calendar.svg +2 -2
- package/src/assets/iframe/ticket.svg +2 -2
- package/src/calendar/Calendar.stories.tsx +0 -23
- package/src/calendar/Calendar.tsx +5 -5
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +0 -9
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +7 -58
- package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +0 -8
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
- package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +10 -63
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -4
- package/src/iframe/page/components/PageBody/constants.ts +0 -2
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +0 -10
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +6 -546
- package/src/iframe/payment/payment-page/PaymentPage.tsx +29 -38
- package/src/iframe/ryft/RyftPaymentForm.tsx +5 -11
- package/src/product-set/control/DateInput.tsx +14 -17
- package/src/product-set/product/ProductControl.tsx +3 -17
- package/src/product-set/product/constants.ts +0 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +43 -105
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
- package/src/snippet/snippet-template/control/PropertyControl.tsx +2 -6
- package/src/sortable-tree/SortableTreeItem.tsx +4 -6
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
- package/src/styles/iframe-page/PageBody.scss +1 -2
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
- package/dist/iframe/ryft/utils/ryft-form.d.ts +0 -5
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +0 -1
- package/dist/iframe/ryft/utils/ryft-form.js +0 -1
- package/src/iframe/ryft/utils/ryft-form.ts +0 -47
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React, { useEffect,
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { useForm } from "react-hook-form";
|
|
4
|
+
import Form from "react-bootstrap/Form";
|
|
4
5
|
|
|
5
6
|
import Button from "react-bootstrap/Button";
|
|
6
7
|
import { useHistory } from "react-router-dom";
|
|
@@ -13,7 +14,6 @@ import {
|
|
|
13
14
|
AttemptPaymentResponse,
|
|
14
15
|
} from "@licklist/plugins/dist/hooks/Ryft/useRyftPayment";
|
|
15
16
|
import { BlockLoader, ButtonLoader } from "../../static";
|
|
16
|
-
import { injectComponentsInRyftForm } from "./utils/ryft-form";
|
|
17
17
|
|
|
18
18
|
export const ryftErrorMap: Record<string, string> = {
|
|
19
19
|
insufficient_funds: "insufficientFunds",
|
|
@@ -50,7 +50,6 @@ export const RyftPaymentForm = ({
|
|
|
50
50
|
onSubmit,
|
|
51
51
|
}: RyftPaymentFormProps) => {
|
|
52
52
|
const { t } = useTranslation(["Design", "Validation", "Ryft"]);
|
|
53
|
-
const formRef = useRef<HTMLFormElement | null>(null);
|
|
54
53
|
const history = useHistory();
|
|
55
54
|
|
|
56
55
|
const [isValid, setIsValid] = useState(false);
|
|
@@ -118,12 +117,6 @@ export const RyftPaymentForm = ({
|
|
|
118
117
|
}
|
|
119
118
|
};
|
|
120
119
|
|
|
121
|
-
useEffect(
|
|
122
|
-
() => injectComponentsInRyftForm({ t }),
|
|
123
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
124
|
-
[formRef.current?.childNodes?.length]
|
|
125
|
-
);
|
|
126
|
-
|
|
127
120
|
useEffect(() => {
|
|
128
121
|
if (!accountId.data || accountId.isError) return;
|
|
129
122
|
|
|
@@ -182,14 +175,15 @@ export const RyftPaymentForm = ({
|
|
|
182
175
|
|
|
183
176
|
return (
|
|
184
177
|
<>
|
|
178
|
+
<Form.Label>{t("Design:paymentDetails")}</Form.Label>
|
|
179
|
+
{/* For unknown reasons ryft doesn't work with bootstrap form */}
|
|
185
180
|
<form
|
|
186
|
-
ref={formRef}
|
|
187
181
|
id="ryft-pay-form"
|
|
188
182
|
noValidate
|
|
189
183
|
onSubmit={methods.handleSubmit(handleSubmit)}
|
|
190
184
|
className="ryft-payment-form"
|
|
191
185
|
>
|
|
192
|
-
<div className="submit-button-wrapper mt-
|
|
186
|
+
<div className="submit-button-wrapper mt-3 p-1">
|
|
193
187
|
<Button type="submit" disabled={isBtnDisabled || !isValid}>
|
|
194
188
|
{isBtnDisabled && <ButtonLoader />}
|
|
195
189
|
{t("Design:buyNow")}
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
getDateTimeObject,
|
|
25
25
|
} from "../../recurring-date-picker-input/RecurringDatePickerInput";
|
|
26
26
|
import { ProductSetRecurrenceOverridesControl } from "./ProductSetRecurrenceOverridesControl";
|
|
27
|
-
import { MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE } from "../product/constants";
|
|
28
27
|
|
|
29
28
|
export interface DateAndRecurrenceInputValues {
|
|
30
29
|
menuRecurrences?: Partial<ProductSetRecurrence>[];
|
|
@@ -250,22 +249,20 @@ export const DateInput = ({
|
|
|
250
249
|
}
|
|
251
250
|
/>
|
|
252
251
|
))}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
</div>
|
|
268
|
-
)}
|
|
252
|
+
<div
|
|
253
|
+
className="product-set-recurrence-icon-wrapper"
|
|
254
|
+
role="button"
|
|
255
|
+
tabIndex={0}
|
|
256
|
+
onClick={handleOnAdd}
|
|
257
|
+
onKeyDown={handleOnAdd}
|
|
258
|
+
>
|
|
259
|
+
<Icon
|
|
260
|
+
type="plus-circle"
|
|
261
|
+
height="1rem"
|
|
262
|
+
className="product-set-recurrence-icon-add mr-2"
|
|
263
|
+
/>
|
|
264
|
+
{t("addDates")}
|
|
265
|
+
</div>
|
|
269
266
|
|
|
270
267
|
<Form.Control
|
|
271
268
|
type="hidden"
|
|
@@ -7,12 +7,8 @@ import {
|
|
|
7
7
|
QUANTITY_TYPE_LIST_DTO,
|
|
8
8
|
QUANTITY_TYPE_RECHARGING,
|
|
9
9
|
} from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
10
|
-
import {
|
|
11
|
-
ProductType,
|
|
12
|
-
PRODUCT_DEfAULT_COLORS,
|
|
13
|
-
} from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
10
|
+
import { ProductType } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
14
11
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
15
|
-
import clsx from "clsx";
|
|
16
12
|
import {
|
|
17
13
|
FieldNamePrefixPath,
|
|
18
14
|
FormValues,
|
|
@@ -39,7 +35,6 @@ import {
|
|
|
39
35
|
} from "react-hook-form";
|
|
40
36
|
import { useTranslation } from "react-i18next";
|
|
41
37
|
import { useImages } from "@licklist/plugins/dist/hooks/Media/useImages";
|
|
42
|
-
|
|
43
38
|
import {
|
|
44
39
|
Image,
|
|
45
40
|
IMAGE_TYPE_IMAGE,
|
|
@@ -64,13 +59,13 @@ import {
|
|
|
64
59
|
ProductQuantityControl,
|
|
65
60
|
ProductQuantityRechargingControl,
|
|
66
61
|
} from "./quantity";
|
|
67
|
-
import { PropertyControl } from "../../snippet";
|
|
68
62
|
import { TipTapEditor } from "../../tiptap-editor";
|
|
69
63
|
import { IsDeletableEvent } from "../types";
|
|
70
64
|
import { FixedDurationOptions } from "./fixed-duration-fields";
|
|
71
65
|
import { ProductDurationControl } from "./duration";
|
|
72
66
|
import { ProductPriceControl } from "./price";
|
|
73
67
|
import { MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH } from "./constants";
|
|
68
|
+
import clsx from "clsx";
|
|
74
69
|
|
|
75
70
|
// TO DO refactor this file
|
|
76
71
|
// and add correct types
|
|
@@ -104,7 +99,6 @@ export interface ProductControlValues
|
|
|
104
99
|
offset: number;
|
|
105
100
|
serviceTime: number;
|
|
106
101
|
sort: number | null;
|
|
107
|
-
color?: string;
|
|
108
102
|
}
|
|
109
103
|
|
|
110
104
|
export interface ProductControlProps<T>
|
|
@@ -150,7 +144,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
150
144
|
} = useFormContext<T>();
|
|
151
145
|
|
|
152
146
|
const { setLoading } = useContext(ProductSetLoadingContext);
|
|
153
|
-
const { t } = useTranslation(["Design", "Validation"
|
|
147
|
+
const { t } = useTranslation(["Design", "Validation"]);
|
|
154
148
|
const [expanded, setExpanded] = useState(false);
|
|
155
149
|
const [initialImages, setInitialImages] = useState<Image[] | null>(null);
|
|
156
150
|
// @TODO: After checking "isUnlimited" checkbox need to reset field totalQuantity
|
|
@@ -395,14 +389,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
395
389
|
)}
|
|
396
390
|
</Form.Control.Feedback>
|
|
397
391
|
</Form.Group>
|
|
398
|
-
|
|
399
|
-
<PropertyControl<T>
|
|
400
|
-
item={`${fieldNamePrefix}.color` as Path<T>}
|
|
401
|
-
label={t("ProductSet:selectColor")}
|
|
402
|
-
isDisabled={isOverrides}
|
|
403
|
-
isRequired={false}
|
|
404
|
-
defaultColors={PRODUCT_DEfAULT_COLORS}
|
|
405
|
-
/>
|
|
406
392
|
</Col>
|
|
407
393
|
</Row>
|
|
408
394
|
|
|
@@ -26,7 +26,6 @@ export interface ProductCategoryControlValues extends FormValues {
|
|
|
26
26
|
name: string;
|
|
27
27
|
minSubItems: number | null;
|
|
28
28
|
maxSubItems: number | null;
|
|
29
|
-
overallQuantity?: number | null;
|
|
30
29
|
quantityType: QuantityType;
|
|
31
30
|
type: CategoryType;
|
|
32
31
|
isTimeRelated: boolean;
|
|
@@ -103,7 +102,6 @@ export function ProductCategoryControl({
|
|
|
103
102
|
const collectUserInfoId = useId();
|
|
104
103
|
const hasTicketId = useId();
|
|
105
104
|
const zoneId = useId();
|
|
106
|
-
const overallCapacityId = useId();
|
|
107
105
|
|
|
108
106
|
const allowDepositsId = useId();
|
|
109
107
|
const remainderExpireAfterId = useId();
|
|
@@ -129,7 +127,7 @@ export function ProductCategoryControl({
|
|
|
129
127
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
130
128
|
}, [maxSubItems, fieldNamePrefix]);
|
|
131
129
|
|
|
132
|
-
const
|
|
130
|
+
const shouldShowZoneSelect =
|
|
133
131
|
category.type === CATEGORY_TYPE_FIXED_DURATION ||
|
|
134
132
|
category.type === CATEGORY_TYPE_GAME;
|
|
135
133
|
|
|
@@ -330,110 +328,50 @@ export function ProductCategoryControl({
|
|
|
330
328
|
</Col>
|
|
331
329
|
</Row>
|
|
332
330
|
|
|
333
|
-
{
|
|
334
|
-
|
|
335
|
-
<
|
|
336
|
-
<
|
|
337
|
-
<Form.
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
`${fieldNamePrefix}.overallQuantity`,
|
|
348
|
-
currentOverallCapacity + 1,
|
|
349
|
-
{ shouldValidate: true }
|
|
350
|
-
);
|
|
351
|
-
}}
|
|
352
|
-
>
|
|
353
|
-
<InputGroup.Text className="py-0 px-3">
|
|
354
|
-
<IncrementIcon />
|
|
355
|
-
</InputGroup.Text>
|
|
356
|
-
</InputGroup.Prepend>
|
|
357
|
-
<Controller
|
|
358
|
-
control={control}
|
|
359
|
-
name={`${fieldNamePrefix}.overallQuantity`}
|
|
360
|
-
render={({ field }) => (
|
|
361
|
-
<Form.Control
|
|
362
|
-
min={0}
|
|
363
|
-
step={1}
|
|
364
|
-
type="number"
|
|
365
|
-
disabled={isOverride}
|
|
366
|
-
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
367
|
-
`${fieldNamePrefix}.overallQuantity`,
|
|
368
|
-
errors
|
|
369
|
-
)}
|
|
370
|
-
{...field}
|
|
371
|
-
/>
|
|
372
|
-
)}
|
|
373
|
-
rules={{
|
|
374
|
-
min: {
|
|
375
|
-
value: 0,
|
|
376
|
-
message: t("Validation:fieldMinNumber", {
|
|
377
|
-
attribute: t("overallQuantity"),
|
|
378
|
-
min: 0,
|
|
379
|
-
}) as string,
|
|
380
|
-
},
|
|
381
|
-
}}
|
|
382
|
-
/>
|
|
383
|
-
<Form.Control.Feedback type="invalid">
|
|
384
|
-
{HookFormService.getErrors<ProductSetFormValues>(
|
|
385
|
-
`${fieldNamePrefix}.overallQuantity`,
|
|
331
|
+
{shouldShowZoneSelect && (
|
|
332
|
+
<Row>
|
|
333
|
+
<Col>
|
|
334
|
+
<Form.Group controlId={zoneId}>
|
|
335
|
+
<Form.Label>{t("Design:zone")}</Form.Label>
|
|
336
|
+
<Controller
|
|
337
|
+
control={control}
|
|
338
|
+
name={`${fieldNamePrefix}.zoneId`}
|
|
339
|
+
render={({ field }) => (
|
|
340
|
+
<Form.Control
|
|
341
|
+
as="select"
|
|
342
|
+
disabled={isOverride}
|
|
343
|
+
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
344
|
+
`${fieldNamePrefix}.zoneId`,
|
|
386
345
|
errors
|
|
387
346
|
)}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
</Form.Control>
|
|
417
|
-
)}
|
|
418
|
-
rules={{
|
|
419
|
-
required: {
|
|
420
|
-
value: providerHasBookingManagement,
|
|
421
|
-
message: t("Validation:fieldRequired", {
|
|
422
|
-
attribute: t("zone"),
|
|
423
|
-
}),
|
|
424
|
-
},
|
|
425
|
-
}}
|
|
426
|
-
/>
|
|
427
|
-
<Form.Control.Feedback type="invalid">
|
|
428
|
-
{HookFormService.getErrors<ProductSetFormValues>(
|
|
429
|
-
`${fieldNamePrefix}.zoneId`,
|
|
430
|
-
errors
|
|
431
|
-
)}
|
|
432
|
-
</Form.Control.Feedback>
|
|
433
|
-
</Form.Group>
|
|
434
|
-
</Col>
|
|
435
|
-
</Row>
|
|
436
|
-
</>
|
|
347
|
+
{...field}
|
|
348
|
+
>
|
|
349
|
+
<option value={null}>{t("Design:choose")}</option>
|
|
350
|
+
{zones.map((zone) => (
|
|
351
|
+
<option key={zone.id} value={zone.id}>
|
|
352
|
+
{zone.name}
|
|
353
|
+
</option>
|
|
354
|
+
))}
|
|
355
|
+
</Form.Control>
|
|
356
|
+
)}
|
|
357
|
+
rules={{
|
|
358
|
+
required: {
|
|
359
|
+
value: providerHasBookingManagement,
|
|
360
|
+
message: t("Validation:fieldRequired", {
|
|
361
|
+
attribute: t("zone"),
|
|
362
|
+
}),
|
|
363
|
+
},
|
|
364
|
+
}}
|
|
365
|
+
/>
|
|
366
|
+
<Form.Control.Feedback type="invalid">
|
|
367
|
+
{HookFormService.getErrors<ProductSetFormValues>(
|
|
368
|
+
`${fieldNamePrefix}.zoneId`,
|
|
369
|
+
errors
|
|
370
|
+
)}
|
|
371
|
+
</Form.Control.Feedback>
|
|
372
|
+
</Form.Group>
|
|
373
|
+
</Col>
|
|
374
|
+
</Row>
|
|
437
375
|
)}
|
|
438
376
|
</Col>
|
|
439
377
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { DateTime } from "luxon";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Col, Row } 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 { WorkingHoursInputValues } from ".";
|
|
6
8
|
import { useWeekdays } from "./utils";
|
|
7
9
|
|
|
@@ -23,10 +25,22 @@ export function WorkingHoursInputDescription() {
|
|
|
23
25
|
<Row key={i}>
|
|
24
26
|
<Col xs="auto">{weekdays[i]}:</Col>
|
|
25
27
|
<Col>
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
{weekday?.end
|
|
29
|
+
? weekday.start
|
|
30
|
+
? t("timeInterval", {
|
|
31
|
+
start: DateTime.fromISO(weekday.start).toFormat(
|
|
32
|
+
TIME_FORMAT
|
|
33
|
+
),
|
|
34
|
+
end: DateTime.fromISO(weekday.start).toFormat(
|
|
35
|
+
TIME_FORMAT
|
|
36
|
+
),
|
|
37
|
+
})
|
|
38
|
+
: t("timeFrom", {
|
|
39
|
+
start: DateTime.fromISO(weekday.start).toFormat(
|
|
40
|
+
TIME_FORMAT
|
|
41
|
+
),
|
|
42
|
+
})
|
|
43
|
+
: null}
|
|
30
44
|
</Col>
|
|
31
45
|
</Row>
|
|
32
46
|
);
|
|
@@ -24,16 +24,12 @@ export interface PropertyControlProps<T> {
|
|
|
24
24
|
item: Path<T>;
|
|
25
25
|
label: string;
|
|
26
26
|
isDisabled?: boolean;
|
|
27
|
-
defaultColors?: Array<string>;
|
|
28
|
-
isRequired?: boolean;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
export function PropertyControl<T>({
|
|
32
30
|
item,
|
|
33
31
|
label,
|
|
34
32
|
isDisabled = false,
|
|
35
|
-
defaultColors,
|
|
36
|
-
isRequired = true,
|
|
37
33
|
}: PropertyControlProps<T>) {
|
|
38
34
|
const { t } = useTranslation(["Validation"]);
|
|
39
35
|
|
|
@@ -66,7 +62,7 @@ export function PropertyControl<T>({
|
|
|
66
62
|
<Form.Control
|
|
67
63
|
{...register(item, {
|
|
68
64
|
required: {
|
|
69
|
-
value:
|
|
65
|
+
value: true,
|
|
70
66
|
message: t("Validation:fieldRequired", {
|
|
71
67
|
attribute: label,
|
|
72
68
|
}),
|
|
@@ -99,7 +95,7 @@ export function PropertyControl<T>({
|
|
|
99
95
|
setValue(item, color.hex);
|
|
100
96
|
toggleIsActive();
|
|
101
97
|
}}
|
|
102
|
-
colors={
|
|
98
|
+
colors={DEFAULT_COLORS}
|
|
103
99
|
/>
|
|
104
100
|
</div>
|
|
105
101
|
)}
|
|
@@ -125,8 +125,6 @@ export function SortableTreeItem({
|
|
|
125
125
|
[position, setIsExpanded]
|
|
126
126
|
);
|
|
127
127
|
|
|
128
|
-
const isVisibleDeleteButton = Boolean(onDelete) && !isOverride;
|
|
129
|
-
|
|
130
128
|
const onButtonMouseDown = useCallback((event) => {
|
|
131
129
|
setPosition({ pageX: event.pageX, pageY: event.pageY });
|
|
132
130
|
}, []);
|
|
@@ -348,8 +346,8 @@ export function SortableTreeItem({
|
|
|
348
346
|
>
|
|
349
347
|
{t("saveAndAdd")}
|
|
350
348
|
</Button>
|
|
351
|
-
|
|
352
|
-
|
|
349
|
+
<div className="d-flex justify-content-end mt-4 delete-btn">
|
|
350
|
+
{Boolean(onDelete) && (
|
|
353
351
|
<ConfirmModal>
|
|
354
352
|
{(confirm) => (
|
|
355
353
|
<DeleteFieldButton
|
|
@@ -357,8 +355,8 @@ export function SortableTreeItem({
|
|
|
357
355
|
/>
|
|
358
356
|
)}
|
|
359
357
|
</ConfirmModal>
|
|
360
|
-
|
|
361
|
-
|
|
358
|
+
)}
|
|
359
|
+
</div>
|
|
362
360
|
</div>
|
|
363
361
|
</Modal.Body>
|
|
364
362
|
</Modal>
|
|
@@ -46,8 +46,9 @@
|
|
|
46
46
|
color: $snippet-page-header-steps-body-color;
|
|
47
47
|
transition: $color-transition;
|
|
48
48
|
margin-left: 0.5rem;
|
|
49
|
+
width: 6rem;
|
|
49
50
|
word-break: break-word;
|
|
50
|
-
font-size: 0.
|
|
51
|
+
font-size: 0.75rem;
|
|
51
52
|
|
|
52
53
|
@include media-breakpoint-down(sm) {
|
|
53
54
|
display: none;
|
|
@@ -61,31 +62,6 @@
|
|
|
61
62
|
font-weight: 400;
|
|
62
63
|
font-size: 0.875rem;
|
|
63
64
|
|
|
64
|
-
.payment-page-toggle {
|
|
65
|
-
p {
|
|
66
|
-
font-size: 1rem;
|
|
67
|
-
font-weight: 600;
|
|
68
|
-
}
|
|
69
|
-
.price {
|
|
70
|
-
font-weight: 700;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.payment-metadata {
|
|
75
|
-
font-weight: 500;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.total {
|
|
79
|
-
display: flex;
|
|
80
|
-
justify-content: space-between;
|
|
81
|
-
align-items: center;
|
|
82
|
-
|
|
83
|
-
div {
|
|
84
|
-
font-size: 1rem;
|
|
85
|
-
font-weight: 700;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
65
|
b {
|
|
90
66
|
display: block;
|
|
91
67
|
font-size: 1rem;
|
|
@@ -137,15 +113,6 @@
|
|
|
137
113
|
|
|
138
114
|
.cart-items {
|
|
139
115
|
font-weight: 400;
|
|
140
|
-
margin-bottom: 1.4rem;
|
|
141
|
-
border-bottom: 2px solid $separator-color;
|
|
142
|
-
|
|
143
|
-
.people {
|
|
144
|
-
margin-bottom: 0;
|
|
145
|
-
p {
|
|
146
|
-
margin-bottom: 0;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
116
|
|
|
150
117
|
.empty-cart {
|
|
151
118
|
margin: 1rem 0;
|
|
@@ -158,11 +125,8 @@
|
|
|
158
125
|
}
|
|
159
126
|
|
|
160
127
|
.products-by-menu-step {
|
|
161
|
-
margin-top: 1.4rem;
|
|
162
|
-
font-size: 0.875rem;
|
|
163
128
|
.title {
|
|
164
|
-
font-
|
|
165
|
-
font-weight: 600;
|
|
129
|
+
font-weight: 500;
|
|
166
130
|
}
|
|
167
131
|
|
|
168
132
|
.categories {
|
|
@@ -172,8 +136,8 @@
|
|
|
172
136
|
}
|
|
173
137
|
|
|
174
138
|
.products {
|
|
175
|
-
margin-top:
|
|
176
|
-
|
|
139
|
+
margin-top: 0.5rem;
|
|
140
|
+
|
|
177
141
|
.product {
|
|
178
142
|
margin: 0.5rem 0;
|
|
179
143
|
|
|
@@ -184,15 +148,6 @@
|
|
|
184
148
|
margin-bottom: 0.5rem;
|
|
185
149
|
}
|
|
186
150
|
}
|
|
187
|
-
|
|
188
|
-
.name {
|
|
189
|
-
font-weight: 600;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.price {
|
|
193
|
-
font-weight: 400;
|
|
194
|
-
font-size: 0.875rem;
|
|
195
|
-
}
|
|
196
151
|
}
|
|
197
152
|
|
|
198
153
|
&:not(:last-child) {
|
|
@@ -213,12 +168,6 @@
|
|
|
213
168
|
margin: 0 0 0.5rem;
|
|
214
169
|
|
|
215
170
|
.title {
|
|
216
|
-
font-size: 1rem;
|
|
217
|
-
font-weight: 600;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.metadata {
|
|
221
|
-
font-size: 0.95rem;
|
|
222
171
|
font-weight: 600;
|
|
223
172
|
}
|
|
224
173
|
}
|
|
@@ -232,7 +181,19 @@
|
|
|
232
181
|
}
|
|
233
182
|
|
|
234
183
|
hr {
|
|
235
|
-
margin
|
|
184
|
+
margin: 0;
|
|
185
|
+
border-width: 2px;
|
|
186
|
+
border-color: $separator-color;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.products {
|
|
190
|
+
font-size: 0.75rem;
|
|
191
|
+
|
|
192
|
+
.product {
|
|
193
|
+
.name {
|
|
194
|
+
font-weight: 500;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
236
197
|
}
|
|
237
198
|
}
|
|
238
199
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// TODO when all iframe pages will be ready, think how we can combine it all in page-body style
|
|
2
1
|
.page-body {
|
|
3
2
|
display: flex;
|
|
4
3
|
background-color: transparent;
|
|
@@ -78,7 +77,7 @@
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
.right-block {
|
|
81
|
-
height: 100
|
|
80
|
+
height: calc(100% - 1rem);
|
|
82
81
|
max-width: 17.5rem;
|
|
83
82
|
min-width: 17.5rem;
|
|
84
83
|
width: 100%;
|