@licklist/design 0.58.5 → 0.58.6-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +2 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/index.js +1 -1
- package/dist/product-set/card/ProductSetCard.d.ts +2 -1
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +1 -1
- package/dist/product-set/control/DateInput.d.ts +17 -0
- package/dist/product-set/control/DateInput.d.ts.map +1 -0
- package/dist/product-set/control/DateInput.js +1 -0
- package/dist/product-set/control/ProductSetControl.d.ts +2 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts +11 -0
- package/dist/product-set/control/ProductSetRecurrenceOverridesControl.d.ts.map +1 -0
- package/dist/product-set/control/ProductSetRecurrenceOverridesControl.js +1 -0
- package/dist/product-set/control/TutorialGifCard.d.ts +2 -1
- package/dist/product-set/control/TutorialGifCard.d.ts.map +1 -1
- package/dist/product-set/control/TutorialGifCard.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts +2 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +7 -2
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +2 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/form/StepsControl.d.ts +2 -1
- package/dist/product-set/form/StepsControl.d.ts.map +1 -1
- package/dist/product-set/form/StepsControl.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts +2 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts +2 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.js +1 -1
- package/dist/product-set/item/CreateProductSetItem.d.ts +2 -1
- package/dist/product-set/item/CreateProductSetItem.d.ts.map +1 -1
- package/dist/product-set/item/CreateProductSetItem.js +1 -1
- package/dist/product-set/product/ProductControl.d.ts +2 -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/fixed-duration-fields/FixedDurationOptions.d.ts +4 -2
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.js +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts +1 -0
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +2 -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/recurring-date-picker-input/DatePickerInput.d.ts +19 -0
- package/dist/recurring-date-picker-input/DatePickerInput.d.ts.map +1 -0
- package/dist/recurring-date-picker-input/DatePickerInput.js +1 -0
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts +15 -0
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -0
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.js +1 -0
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +2 -0
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sortable-list/SortableList.d.ts +2 -1
- package/dist/sortable-list/SortableList.d.ts.map +1 -1
- package/dist/sortable-list/SortableList.js +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts +3 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +1 -1
- package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
- package/dist/static/manual-date-picker/constants/index.d.ts +4 -1
- package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/constants/index.js +1 -1
- package/dist/static/manual-date-picker/utils/index.d.ts +4 -0
- package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/utils/index.js +1 -1
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +10 -0
- package/dist/styles/iframe-events/Card.scss +24 -8
- package/dist/styles/iframe-events/PoweredBy.scss +2 -2
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +0 -2
- package/dist/styles/iframe-page/Page.scss +1 -0
- package/dist/styles/iframe-page/PageBody.scss +32 -11
- package/dist/styles/iframe-page/PageHeader.scss +41 -39
- package/dist/styles/product-set/EditVenueMapSetModal.scss +1 -1
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/package.json +3 -3
- package/src/calendar/Calendar.stories.tsx +9 -2
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +1 -0
- package/src/iframe/event/event-card/IframeEventCard.tsx +7 -8
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +3 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/product-set/card/ProductSetCard.tsx +10 -1
- package/src/product-set/control/DateInput.tsx +309 -0
- package/src/product-set/control/ProductSetControl.tsx +46 -24
- package/src/product-set/control/ProductSetRecurrenceOverridesControl.tsx +63 -0
- package/src/product-set/control/TutorialGifCard.tsx +11 -3
- package/src/product-set/form/ProductCategoriesControl.tsx +12 -1
- package/src/product-set/form/ProductSetForm.tsx +10 -1
- package/src/product-set/form/ProductsControl.tsx +10 -0
- package/src/product-set/form/StepsControl.tsx +8 -2
- package/src/product-set/form/SubProductsControl.tsx +3 -0
- package/src/product-set/hooks/useSortableTreeFunctions.ts +6 -0
- package/src/product-set/item/CreateProductSetItem.tsx +3 -0
- package/src/product-set/product/ProductControl.tsx +23 -12
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +8 -2
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +4 -3
- package/src/product-set/product-category/ProductCategoryControl.tsx +12 -8
- package/src/recurring-date-picker-input/DatePickerInput.tsx +93 -0
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +136 -0
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +4 -1
- package/src/sales/booking/results/BookingResults.stories.tsx +3 -2
- package/src/sales/booking/results/components/ResultCard.tsx +2 -5
- package/src/sortable-list/SortableList.tsx +3 -0
- package/src/sortable-tree/SortableTreeItem.tsx +6 -0
- package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
- package/src/static/manual-date-picker/constants/index.ts +6 -2
- package/src/static/manual-date-picker/utils/index.ts +11 -0
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +10 -0
- package/src/styles/iframe-events/Card.scss +24 -8
- package/src/styles/iframe-events/PoweredBy.scss +2 -2
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +0 -2
- package/src/styles/iframe-page/Page.scss +1 -0
- package/src/styles/iframe-page/PageBody.scss +32 -11
- package/src/styles/iframe-page/PageHeader.scss +41 -39
- package/src/styles/product-set/EditVenueMapSetModal.scss +1 -1
- package/src/styles/sales/BookingResults.scss +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import { DateTime } from "luxon";
|
|
3
|
+
import { Col, Form, Row } from "react-bootstrap";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import { RegisterOptions, useFormContext } from "react-hook-form";
|
|
6
|
+
import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
|
|
7
|
+
|
|
8
|
+
interface RecurrenceIntervalAndFrequencyInputProps {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
minDate?: string;
|
|
11
|
+
startDateLabel?: string;
|
|
12
|
+
startTimeLabel?: string;
|
|
13
|
+
endDateLabel?: string;
|
|
14
|
+
endTimeLabel?: string;
|
|
15
|
+
startTimeRules?: Pick<
|
|
16
|
+
RegisterOptions,
|
|
17
|
+
"max" | "min" | "validate" | "required" | "pattern"
|
|
18
|
+
>;
|
|
19
|
+
endTimeRules?: Pick<
|
|
20
|
+
RegisterOptions,
|
|
21
|
+
"max" | "min" | "validate" | "required" | "pattern"
|
|
22
|
+
>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function RecurrenceAndFrequencyInput({
|
|
26
|
+
disabled = false,
|
|
27
|
+
minDate,
|
|
28
|
+
startDateLabel,
|
|
29
|
+
startTimeLabel,
|
|
30
|
+
endTimeLabel,
|
|
31
|
+
startTimeRules,
|
|
32
|
+
endTimeRules,
|
|
33
|
+
}: RecurrenceIntervalAndFrequencyInputProps) {
|
|
34
|
+
const { t } = useTranslation(["Design", "Notification", "App"]);
|
|
35
|
+
|
|
36
|
+
const {
|
|
37
|
+
getValues,
|
|
38
|
+
formState: { errors },
|
|
39
|
+
register,
|
|
40
|
+
trigger,
|
|
41
|
+
} = useFormContext<RecurringDatePickerInputValues>();
|
|
42
|
+
|
|
43
|
+
const startDate = getValues("startDate");
|
|
44
|
+
const startTime = getValues("startTime");
|
|
45
|
+
const endTime = getValues("endTime");
|
|
46
|
+
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (!startTime || !endTime) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
trigger("endTime");
|
|
52
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
|
+
}, [startTime]);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<>
|
|
57
|
+
<Row>
|
|
58
|
+
<Col xs={12} sm={6}>
|
|
59
|
+
<Form.Group>
|
|
60
|
+
<Form.Label>{startDateLabel ?? t("Design:fromDate")}</Form.Label>
|
|
61
|
+
<Form.Control
|
|
62
|
+
type="date"
|
|
63
|
+
{...register("startDate", { required: true })}
|
|
64
|
+
defaultValue={startDate}
|
|
65
|
+
className={startDate && "date-input-with-value"}
|
|
66
|
+
disabled={disabled}
|
|
67
|
+
min={minDate}
|
|
68
|
+
isInvalid={Boolean(errors.startDate)}
|
|
69
|
+
/>
|
|
70
|
+
<Form.Control.Feedback type="invalid">
|
|
71
|
+
{errors.startDate?.message}
|
|
72
|
+
</Form.Control.Feedback>
|
|
73
|
+
</Form.Group>
|
|
74
|
+
</Col>
|
|
75
|
+
</Row>
|
|
76
|
+
|
|
77
|
+
<Row>
|
|
78
|
+
<Col xs={12} sm={6}>
|
|
79
|
+
<Form.Group>
|
|
80
|
+
<Form.Label>
|
|
81
|
+
{startTimeLabel ?? t("Design:availableFrom")}
|
|
82
|
+
</Form.Label>
|
|
83
|
+
<Form.Control
|
|
84
|
+
type="time"
|
|
85
|
+
{...register("startTime", { required: false, ...startTimeRules })}
|
|
86
|
+
placeholder="hh:mm"
|
|
87
|
+
defaultValue={startTime}
|
|
88
|
+
disabled={disabled}
|
|
89
|
+
isInvalid={Boolean(errors.startTime)}
|
|
90
|
+
/>
|
|
91
|
+
<Form.Control.Feedback type="invalid">
|
|
92
|
+
{errors.startTime?.message}
|
|
93
|
+
</Form.Control.Feedback>
|
|
94
|
+
</Form.Group>
|
|
95
|
+
</Col>
|
|
96
|
+
|
|
97
|
+
<Col xs={12} sm={6}>
|
|
98
|
+
<Form.Group>
|
|
99
|
+
<Form.Label>{endTimeLabel ?? t("Design:availableTo")}</Form.Label>
|
|
100
|
+
<Form.Control
|
|
101
|
+
type="time"
|
|
102
|
+
{...register("endTime", {
|
|
103
|
+
required: false,
|
|
104
|
+
validate: (time) => {
|
|
105
|
+
if (!startTime || !time) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
const currentStartTime = DateTime.fromISO(startTime);
|
|
109
|
+
const currentEndTime = DateTime.fromISO(time);
|
|
110
|
+
|
|
111
|
+
return currentEndTime?.diff(currentStartTime, ["minutes"])
|
|
112
|
+
?.minutes >= 0
|
|
113
|
+
? true
|
|
114
|
+
: `${t(`Validation:fieldLaterDate`, {
|
|
115
|
+
attribute: t("Design:endTimeSmall"),
|
|
116
|
+
min: t("Design:startTimeSmall"),
|
|
117
|
+
})}`;
|
|
118
|
+
},
|
|
119
|
+
...endTimeRules,
|
|
120
|
+
})}
|
|
121
|
+
placeholder="hh:mm"
|
|
122
|
+
defaultValue={endTime}
|
|
123
|
+
disabled={disabled}
|
|
124
|
+
isInvalid={Boolean(errors.endTime)}
|
|
125
|
+
/>
|
|
126
|
+
<Form.Control.Feedback type="invalid">
|
|
127
|
+
{errors.endTime?.message}
|
|
128
|
+
</Form.Control.Feedback>
|
|
129
|
+
</Form.Group>
|
|
130
|
+
</Col>
|
|
131
|
+
</Row>
|
|
132
|
+
</>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export default RecurrenceAndFrequencyInput;
|
|
@@ -336,7 +336,10 @@ const useFormattedDuration = ({
|
|
|
336
336
|
}, [start, end, byWeekDay, formatList, formatNumber]);
|
|
337
337
|
};
|
|
338
338
|
|
|
339
|
-
const getDateTimeObject = (
|
|
339
|
+
export const getDateTimeObject = (
|
|
340
|
+
date: string,
|
|
341
|
+
time: string
|
|
342
|
+
): DateTime | string => {
|
|
340
343
|
const dateTime = DateTime.fromFormat(`${date} ${time}`, DATE_TIME_FORMAT);
|
|
341
344
|
|
|
342
345
|
if (dateTime.isValid) {
|
|
@@ -3,11 +3,12 @@ import { Meta } from "@storybook/react";
|
|
|
3
3
|
import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
|
|
4
4
|
import { User } from "@licklist/core/dist/DataMapper/User/UserDataMapper";
|
|
5
5
|
import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
6
|
-
import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
|
|
7
6
|
import {
|
|
7
|
+
Order,
|
|
8
8
|
ORDER_SOURCE_IFRAME,
|
|
9
9
|
ORDER_SOURCE_MANUAL,
|
|
10
|
-
} from "@licklist/core/
|
|
10
|
+
} from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
|
|
11
|
+
|
|
11
12
|
import { BookingResults } from "./BookingResults";
|
|
12
13
|
|
|
13
14
|
export default {
|
|
@@ -12,7 +12,6 @@ import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
|
12
12
|
import * as Config from "@licklist/core/dist/Config";
|
|
13
13
|
import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
|
|
14
14
|
import { getOrderSourceTitle } from "@licklist/plugins/dist/utils/sourceTitle";
|
|
15
|
-
|
|
16
15
|
import Icon from "../../../../static/Icon";
|
|
17
16
|
|
|
18
17
|
export type ResultCardProps = {
|
|
@@ -22,8 +21,6 @@ export type ResultCardProps = {
|
|
|
22
21
|
onCardClick?: (id: number) => void;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
// @TODO integrate when API will be available
|
|
26
|
-
// activity and staff keys
|
|
27
24
|
export const ResultCard = ({
|
|
28
25
|
order,
|
|
29
26
|
className,
|
|
@@ -41,10 +38,10 @@ export const ResultCard = ({
|
|
|
41
38
|
startDate,
|
|
42
39
|
products,
|
|
43
40
|
source,
|
|
44
|
-
totalAmount,
|
|
45
41
|
event,
|
|
46
42
|
menu,
|
|
47
43
|
remainingToPay,
|
|
44
|
+
paidAmount,
|
|
48
45
|
} = order;
|
|
49
46
|
|
|
50
47
|
const productList = products.map((product) => product.name)?.join(", ") || "";
|
|
@@ -108,7 +105,7 @@ export const ResultCard = ({
|
|
|
108
105
|
)}
|
|
109
106
|
<p>
|
|
110
107
|
{t("paidAmount")}:{" "}
|
|
111
|
-
{formatNumber(
|
|
108
|
+
{formatNumber(paidAmount, {
|
|
112
109
|
style: "currency",
|
|
113
110
|
currency: Config.Currency.GBP,
|
|
114
111
|
})}
|
|
@@ -33,6 +33,7 @@ type SortableListProps<T> = {
|
|
|
33
33
|
renderItemContent: (args: RenderItemContentArgs<T>) => ReactNode;
|
|
34
34
|
setItems?: Dispatch<SetStateAction<SortableItem<T>[]>>;
|
|
35
35
|
isExpandNewItem?: boolean;
|
|
36
|
+
isOverrides?: boolean;
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export const SORTABLE_ID_KEY = "_sortableId";
|
|
@@ -44,6 +45,7 @@ export function SortableList<T>({
|
|
|
44
45
|
renderItemContent,
|
|
45
46
|
setItems,
|
|
46
47
|
isExpandNewItem = false,
|
|
48
|
+
isOverrides = false,
|
|
47
49
|
}: SortableListProps<T>) {
|
|
48
50
|
const [sortedItems, setSortedItems] = useState(items);
|
|
49
51
|
|
|
@@ -97,6 +99,7 @@ export function SortableList<T>({
|
|
|
97
99
|
);
|
|
98
100
|
|
|
99
101
|
function handleDragEnd(event) {
|
|
102
|
+
if (isOverrides) return;
|
|
100
103
|
const { active, over } = event;
|
|
101
104
|
|
|
102
105
|
if (active.id !== over.id) {
|
|
@@ -52,6 +52,8 @@ export interface SortableTreeItemProps {
|
|
|
52
52
|
className: string;
|
|
53
53
|
};
|
|
54
54
|
setIsExpanded?: () => void;
|
|
55
|
+
isOverride?: boolean;
|
|
56
|
+
isProduct?: boolean;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export function SortableTreeItem({
|
|
@@ -78,6 +80,8 @@ export function SortableTreeItem({
|
|
|
78
80
|
edit,
|
|
79
81
|
secondaryBadge,
|
|
80
82
|
setIsExpanded,
|
|
83
|
+
isOverride,
|
|
84
|
+
isProduct = false,
|
|
81
85
|
}: SortableTreeItemProps) {
|
|
82
86
|
const [expanded, setExpanded] = useState(isExpanded);
|
|
83
87
|
const [isModalVisible, setIsModalVisible] = useState(isNewAdded);
|
|
@@ -98,6 +102,7 @@ export function SortableTreeItem({
|
|
|
98
102
|
transform: dragTransform,
|
|
99
103
|
} = useDraggable({
|
|
100
104
|
id,
|
|
105
|
+
disabled: isOverride,
|
|
101
106
|
});
|
|
102
107
|
|
|
103
108
|
const onHandleExpand = useCallback(
|
|
@@ -145,6 +150,7 @@ export function SortableTreeItem({
|
|
|
145
150
|
};
|
|
146
151
|
|
|
147
152
|
const onEdit = (e) => {
|
|
153
|
+
if (isOverride && !isProduct) return;
|
|
148
154
|
e.stopPropagation();
|
|
149
155
|
if (edit && !isModalVisible) edit();
|
|
150
156
|
setIsModalVisible(true);
|
|
@@ -61,9 +61,9 @@ export const ManualDatePicker = ({
|
|
|
61
61
|
disabled={isDisabled}
|
|
62
62
|
>
|
|
63
63
|
<option value="">{t("Design:monthShort")}</option>
|
|
64
|
-
{MONTHS_ARRAY.map((
|
|
65
|
-
<option key={key} value={
|
|
66
|
-
{key}
|
|
64
|
+
{MONTHS_ARRAY.map((object) => (
|
|
65
|
+
<option key={object.key} value={object.value}>
|
|
66
|
+
{object.key}
|
|
67
67
|
</option>
|
|
68
68
|
))}
|
|
69
69
|
</Form.Control>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
generateDatesArray,
|
|
3
|
+
generateMonthsOptionsArray,
|
|
4
|
+
generateYearsArray,
|
|
5
|
+
} from "../utils";
|
|
2
6
|
|
|
3
7
|
export const DAYS_ARRAY = generateDatesArray(1, 31, 1);
|
|
4
|
-
export const MONTHS_ARRAY =
|
|
8
|
+
export const MONTHS_ARRAY = generateMonthsOptionsArray();
|
|
5
9
|
export const YEARS_ARRAY = generateYearsArray();
|
|
@@ -4,6 +4,17 @@ export const generateDatesArray = (start: number, end: number, step: number) =>
|
|
|
4
4
|
(_, index) => 1 + index * step
|
|
5
5
|
);
|
|
6
6
|
|
|
7
|
+
export const generateMonthsOptionsArray = () =>
|
|
8
|
+
Array.from({ length: 12 }, (_, index) => {
|
|
9
|
+
const value = index + 1;
|
|
10
|
+
let key = String(value);
|
|
11
|
+
if (value < 10) {
|
|
12
|
+
key = `0${key}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return { key, value };
|
|
16
|
+
});
|
|
17
|
+
|
|
7
18
|
export const generateYearsArray = () => {
|
|
8
19
|
const currentYear = new Date().getFullYear();
|
|
9
20
|
const ageBackYear = currentYear - 100;
|
|
@@ -23,7 +23,7 @@ export function BooleanSwitch({
|
|
|
23
23
|
const { t } = useTranslation("Design");
|
|
24
24
|
|
|
25
25
|
const options: SelectItem[] = [
|
|
26
|
-
{ id: 1, value: firstValueTitle ??
|
|
26
|
+
{ id: 1, value: firstValueTitle ?? t("yes") },
|
|
27
27
|
{ id: 0, value: secondValueTitle ?? t("no") },
|
|
28
28
|
];
|
|
29
29
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import "../snippet-templates/snippetVariables";
|
|
2
|
+
@import "../themes//bookedit/variables";
|
|
2
3
|
|
|
3
4
|
.iframe-event-card {
|
|
4
5
|
position: relative;
|
|
@@ -18,12 +19,27 @@
|
|
|
18
19
|
background-size: cover;
|
|
19
20
|
background-position: center;
|
|
20
21
|
cursor: pointer;
|
|
21
|
-
border: 1px solid transparent;
|
|
22
22
|
border-radius: 0.5rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.card-body {
|
|
26
|
-
padding: 0.5rem 0 0.875rem;
|
|
26
|
+
padding: 0.5rem 0 0.875rem 0;
|
|
27
|
+
|
|
28
|
+
@include media-breakpoint-down(sm) {
|
|
29
|
+
padding: 1rem 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__info-icon {
|
|
34
|
+
position: absolute;
|
|
35
|
+
right: 1rem;
|
|
36
|
+
top: 1rem;
|
|
37
|
+
background-color: "#ffffff";
|
|
38
|
+
border-radius: 1.5rem;
|
|
39
|
+
padding: 0 0.5rem;
|
|
40
|
+
font-size: 0.75rem;
|
|
41
|
+
font-weight: $white;
|
|
42
|
+
border: 1px solid $black;
|
|
27
43
|
}
|
|
28
44
|
|
|
29
45
|
&__title {
|
|
@@ -33,7 +49,7 @@
|
|
|
33
49
|
line-height: 1.25rem;
|
|
34
50
|
cursor: pointer;
|
|
35
51
|
margin-bottom: 0.5rem;
|
|
36
|
-
font-size:
|
|
52
|
+
font-size: 0.95rem;
|
|
37
53
|
}
|
|
38
54
|
|
|
39
55
|
&__label {
|
|
@@ -82,7 +98,8 @@
|
|
|
82
98
|
color: $snippet-elements-button-color;
|
|
83
99
|
border: none;
|
|
84
100
|
background-color: $snippet-elements-button-background-color;
|
|
85
|
-
box-shadow: 0 0 0 $input-btn-focus-width
|
|
101
|
+
box-shadow: 0 0 0 $input-btn-focus-width
|
|
102
|
+
$snippet-elements-button-background-color;
|
|
86
103
|
}
|
|
87
104
|
|
|
88
105
|
&:disabled {
|
|
@@ -95,14 +112,14 @@
|
|
|
95
112
|
&:focus,
|
|
96
113
|
&.focus {
|
|
97
114
|
&:not(:disabled) {
|
|
98
|
-
opacity: .7;
|
|
115
|
+
opacity: 0.7;
|
|
99
116
|
}
|
|
100
117
|
}
|
|
101
118
|
|
|
102
119
|
&:active,
|
|
103
120
|
&.active {
|
|
104
121
|
&:not(:disabled) {
|
|
105
|
-
opacity: .8;
|
|
122
|
+
opacity: 0.8;
|
|
106
123
|
}
|
|
107
124
|
}
|
|
108
125
|
}
|
|
@@ -123,7 +140,7 @@
|
|
|
123
140
|
}
|
|
124
141
|
|
|
125
142
|
.card-text {
|
|
126
|
-
font-size: 0.
|
|
143
|
+
font-size: 0.82rem;
|
|
127
144
|
}
|
|
128
145
|
|
|
129
146
|
&.event-info {
|
|
@@ -202,7 +219,6 @@
|
|
|
202
219
|
|
|
203
220
|
@media (max-width: 576px) {
|
|
204
221
|
&.list-view {
|
|
205
|
-
|
|
206
222
|
.card-image {
|
|
207
223
|
margin-right: 0.5rem;
|
|
208
224
|
}
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
.left-block {
|
|
13
13
|
flex: 1;
|
|
14
14
|
align-items: stretch;
|
|
15
|
-
border-radius: 0.5rem;
|
|
16
|
-
border-bottom-left-radius: 0;
|
|
17
|
-
border-bottom-right-radius: 0;
|
|
18
15
|
padding: 1rem;
|
|
19
16
|
background-color: $snippet-page-body-left-block-background-color;
|
|
20
17
|
border: 0;
|
|
@@ -33,7 +30,6 @@
|
|
|
33
30
|
display: flex;
|
|
34
31
|
align-items: flex-start;
|
|
35
32
|
justify-content: space-between;
|
|
36
|
-
|
|
37
33
|
.title {
|
|
38
34
|
color: $snippet-elements-body-color;
|
|
39
35
|
margin: 0;
|
|
@@ -64,7 +60,7 @@
|
|
|
64
60
|
overflow-x: hidden;
|
|
65
61
|
scrollbar-width: thin;
|
|
66
62
|
.iframe-event-card {
|
|
67
|
-
border-bottom:
|
|
63
|
+
border-bottom: 1px solid $separator-color;
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
@include media-breakpoint-down(sm) {
|
|
@@ -81,8 +77,6 @@
|
|
|
81
77
|
}
|
|
82
78
|
|
|
83
79
|
.right-block {
|
|
84
|
-
margin-left: 1rem;
|
|
85
|
-
border-radius: 0.5rem;
|
|
86
80
|
height: calc(100% - 1rem);
|
|
87
81
|
max-width: 17.5rem;
|
|
88
82
|
min-width: 17.5rem;
|
|
@@ -115,7 +109,7 @@
|
|
|
115
109
|
}
|
|
116
110
|
|
|
117
111
|
.collapse {
|
|
118
|
-
max-height: calc(100vh -
|
|
112
|
+
max-height: calc(100vh - 15rem);
|
|
119
113
|
transition: none 0s ease 0s;
|
|
120
114
|
|
|
121
115
|
&.show {
|
|
@@ -125,7 +119,7 @@
|
|
|
125
119
|
}
|
|
126
120
|
|
|
127
121
|
@include media-breakpoint-down(sm) {
|
|
128
|
-
max-height:
|
|
122
|
+
max-height: 100%;
|
|
129
123
|
}
|
|
130
124
|
}
|
|
131
125
|
.collapse-with-people-input {
|
|
@@ -151,8 +145,14 @@
|
|
|
151
145
|
}
|
|
152
146
|
|
|
153
147
|
.iframe-event-card {
|
|
154
|
-
|
|
155
|
-
|
|
148
|
+
border: none;
|
|
149
|
+
|
|
150
|
+
.card-image {
|
|
151
|
+
border-radius: 0;
|
|
152
|
+
}
|
|
153
|
+
.card-body {
|
|
154
|
+
padding-left: 1rem;
|
|
155
|
+
}
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
.price {
|
|
@@ -262,3 +262,24 @@
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
+
|
|
266
|
+
.event-list-page-body {
|
|
267
|
+
overflow: auto;
|
|
268
|
+
.left-block {
|
|
269
|
+
.navigation {
|
|
270
|
+
font-size: 1.125rem;
|
|
271
|
+
font-weight: 500;
|
|
272
|
+
padding-bottom: 2.625rem;
|
|
273
|
+
display: flex;
|
|
274
|
+
align-items: flex-start;
|
|
275
|
+
justify-content: space-between;
|
|
276
|
+
margin-top: 0.125rem;
|
|
277
|
+
|
|
278
|
+
.title {
|
|
279
|
+
position: absolute;
|
|
280
|
+
color: $snippet-elements-body-color;
|
|
281
|
+
margin: 0;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
@@ -20,55 +20,57 @@ $base-height: 2.5rem;
|
|
|
20
20
|
transition: $color-transition;
|
|
21
21
|
border: 0;
|
|
22
22
|
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
.iframe-page {
|
|
27
|
+
.button-wrapper {
|
|
28
|
+
background-color: $snippet-page-header-steps-close-button-background-color;
|
|
29
|
+
height: $base-height;
|
|
30
|
+
width: $base-height;
|
|
31
|
+
border-radius: $base-height;
|
|
32
|
+
transition: $color-transition;
|
|
33
|
+
|
|
34
|
+
.close-button {
|
|
35
|
+
font-size: 1.25rem;
|
|
27
36
|
width: $base-height;
|
|
28
|
-
|
|
37
|
+
height: $base-height;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
color: $snippet-page-header-steps-close-button-border-color;
|
|
29
42
|
transition: $color-transition;
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
width: $base-height;
|
|
34
|
-
height: $base-height;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
color: $snippet-page-header-steps-close-button-border-color;
|
|
39
|
-
transition: $color-transition;
|
|
40
|
-
|
|
41
|
-
&:hover {
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
}
|
|
44
|
+
&:hover {
|
|
45
|
+
cursor: pointer;
|
|
44
46
|
}
|
|
47
|
+
}
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
&.close-button {
|
|
50
|
+
margin-left: 1rem;
|
|
51
|
+
}
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
.back-button {
|
|
54
|
+
font-size: 2rem;
|
|
55
|
+
width: $base-height;
|
|
56
|
+
height: $base-height;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
font-weight: lighter;
|
|
61
|
+
color: $snippet-page-header-steps-close-button-border-color;
|
|
62
|
+
transition: $color-transition;
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
+
&:hover {
|
|
65
|
+
cursor: pointer;
|
|
64
66
|
}
|
|
67
|
+
}
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
69
|
+
&.back-button {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
margin-right: 1rem;
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
}
|