@licklist/design 0.58.3-dev.8 → 0.58.3
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/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
- 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.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
- 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 +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +2 -2
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +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.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- 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/ProductSetForm.d.ts +2 -5
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/styles/iframe-events/Card.scss +8 -24
- package/dist/styles/iframe-events/PoweredBy.scss +2 -2
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
- package/dist/styles/iframe-page/Page.scss +0 -1
- package/dist/styles/iframe-page/PageBody.scss +11 -32
- package/dist/styles/iframe-page/PageHeader.scss +39 -41
- package/dist/styles/report/ReportRunnerModal.scss +82 -88
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/package.json +3 -3
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +1 -0
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +14 -14
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
- package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -22
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +12 -8
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +3 -5
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -6
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +2 -6
- package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +4 -35
- package/src/sales/booking/results/components/ResultCard.tsx +3 -0
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/iframe-events/Card.scss +8 -24
- package/src/styles/iframe-events/PoweredBy.scss +2 -2
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
- package/src/styles/iframe-page/Page.scss +0 -1
- package/src/styles/iframe-page/PageBody.scss +11 -32
- package/src/styles/iframe-page/PageHeader.scss +39 -41
- package/src/styles/report/ReportRunnerModal.scss +82 -88
- package/src/styles/sales/BookingResults.scss +1 -1
|
@@ -1,101 +1,95 @@
|
|
|
1
1
|
.report-runner-modal {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
.modal-dialog {
|
|
3
|
+
@include media-breakpoint-up(sm) {
|
|
4
|
+
max-width: 45rem;
|
|
5
|
+
}
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
|
|
8
|
+
.modal-content {
|
|
9
|
+
max-width: 45rem;
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
padding: 1.25rem 1.5rem;
|
|
12
|
+
|
|
13
|
+
header {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
margin-bottom: 1rem;
|
|
18
|
+
border-bottom: 2px solid #dcdcdc;
|
|
19
|
+
|
|
20
|
+
h5 {
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
font-size: 1.125rem;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
button {
|
|
27
|
+
padding-top: 0.5rem;
|
|
28
|
+
padding-bottom: 0.5rem;
|
|
29
|
+
font-size: 0.875rem;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
color: #0e8ce2;
|
|
32
|
+
}
|
|
24
33
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
|
|
35
|
+
.data-fields {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
|
|
39
|
+
span {
|
|
40
|
+
position: relative;
|
|
41
|
+
font-size: 0.875rem;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
|
|
44
|
+
&:after {
|
|
45
|
+
content: "|";
|
|
46
|
+
margin: 0 0.25rem;
|
|
47
|
+
color: #dcdcdc;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:last-child:after {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.edit-button {
|
|
57
|
+
padding: 0;
|
|
29
58
|
font-size: 0.875rem;
|
|
30
59
|
font-weight: 600;
|
|
31
60
|
color: #0e8ce2;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-wrap: wrap;
|
|
38
|
-
|
|
39
|
-
span {
|
|
40
|
-
position: relative;
|
|
41
|
-
font-size: 0.875rem;
|
|
42
|
-
font-weight: 500;
|
|
43
|
-
|
|
44
|
-
&:after {
|
|
45
|
-
content: "|";
|
|
46
|
-
margin: 0 0.25rem;
|
|
47
|
-
color: #dcdcdc;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:last-child:after {
|
|
51
|
-
display: none;
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
|
|
63
|
+
&:focus {
|
|
64
|
+
box-shadow: none;
|
|
52
65
|
}
|
|
53
66
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
padding: 0;
|
|
58
|
-
font-size: 0.875rem;
|
|
59
|
-
font-weight: 600;
|
|
60
|
-
color: #0e8ce2;
|
|
61
|
-
text-decoration: underline;
|
|
62
|
-
|
|
63
|
-
&:focus {
|
|
64
|
-
box-shadow: none;
|
|
67
|
+
|
|
68
|
+
input {
|
|
69
|
+
border-radius: 0.5rem;
|
|
65
70
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
input {
|
|
69
|
-
border-radius: 0.5rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
form {
|
|
73
|
-
margin-top: 1.25rem;
|
|
74
|
-
|
|
75
|
-
.period-by {
|
|
76
|
-
display: flex;
|
|
77
|
-
gap: 2rem;
|
|
71
|
+
|
|
72
|
+
form {
|
|
78
73
|
margin-top: 1.25rem;
|
|
74
|
+
|
|
75
|
+
.controls {
|
|
76
|
+
display: flex;
|
|
77
|
+
gap: 2rem;
|
|
78
|
+
align-items: flex-start;
|
|
79
|
+
flex-wrap: wrap;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.form-group {
|
|
83
|
+
flex: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
button[type="submit"] {
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
}
|
|
79
89
|
}
|
|
80
|
-
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
gap: 2rem;
|
|
84
|
-
align-items: flex-start;
|
|
85
|
-
flex-wrap: wrap;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.form-group {
|
|
89
|
-
flex: 1;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
button[type="submit"] {
|
|
93
|
-
white-space: nowrap;
|
|
90
|
+
|
|
91
|
+
.loader {
|
|
92
|
+
height: 10rem;
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
|
-
|
|
97
|
-
.loader {
|
|
98
|
-
height: 10rem;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
95
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.58.3
|
|
3
|
+
"version": "0.58.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@fortawesome/free-brands-svg-icons": "5.15.2",
|
|
54
54
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
55
55
|
"@fortawesome/react-fontawesome": "0.1.9",
|
|
56
|
-
"@licklist/core": "
|
|
56
|
+
"@licklist/core": "^0.20.0",
|
|
57
57
|
"@licklist/eslint-config": "0.3.4",
|
|
58
|
-
"@licklist/plugins": "
|
|
58
|
+
"@licklist/plugins": "^0.26.0",
|
|
59
59
|
"@mdx-js/react": "1.6.22",
|
|
60
60
|
"@popperjs/core": "2.11.8",
|
|
61
61
|
"@react-aria/utils": "3.9.0",
|
|
@@ -2,6 +2,7 @@ import React, { useEffect, useMemo } from "react";
|
|
|
2
2
|
import { Button, Form } from "react-bootstrap";
|
|
3
3
|
import { FormProvider, useForm } from "react-hook-form";
|
|
4
4
|
import { isEqual } from "lodash";
|
|
5
|
+
|
|
5
6
|
import { useParams } from "react-router-dom";
|
|
6
7
|
import { useEventEditProductSetContext } from "@licklist/plugins/dist/context/event/EventEditProductSetContext";
|
|
7
8
|
import { useTranslation } from "react-i18next";
|
|
@@ -29,22 +29,22 @@ export const getDefaultValues = (
|
|
|
29
29
|
steps:
|
|
30
30
|
productSet?.steps?.map(({ productCategories, ...step }) => ({
|
|
31
31
|
...step,
|
|
32
|
-
productCategories:
|
|
33
|
-
|
|
32
|
+
productCategories: productCategories?.map(
|
|
33
|
+
({ products, ...productCategory }) => ({
|
|
34
34
|
...productCategory,
|
|
35
|
-
products:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
subProducts
|
|
39
|
-
...subProducts,
|
|
40
|
-
productCategoryId: undefined,
|
|
41
|
-
zoneId,
|
|
42
|
-
})),
|
|
35
|
+
products: products?.map(({ zoneId, subProducts, ...product }) => ({
|
|
36
|
+
...product,
|
|
37
|
+
subProducts: subProducts?.map(({ zoneId, ...subProducts }) => ({
|
|
38
|
+
...subProducts,
|
|
43
39
|
productCategoryId: undefined,
|
|
44
|
-
zoneId,
|
|
45
|
-
}))
|
|
46
|
-
|
|
40
|
+
zoneId: zoneId as number,
|
|
41
|
+
})),
|
|
42
|
+
productCategoryId: undefined,
|
|
43
|
+
zoneId: zoneId as number,
|
|
44
|
+
})),
|
|
45
|
+
})
|
|
46
|
+
),
|
|
47
47
|
venueMapSetId: step?.venueMapSet ? step?.venueMapSet?.id : null,
|
|
48
|
-
})) ??
|
|
48
|
+
})) ?? undefined,
|
|
49
49
|
menuRecurrences: hasNoRecurrences ? [] : productSet?.menuRecurrences ?? [],
|
|
50
50
|
});
|
|
@@ -29,7 +29,6 @@ interface IframeEventCardProps {
|
|
|
29
29
|
titleId?: string;
|
|
30
30
|
descriptionId?: string;
|
|
31
31
|
imageClassName?: string;
|
|
32
|
-
showMoreInfo?: boolean;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
export function IframeEventCard({
|
|
@@ -47,7 +46,6 @@ export function IframeEventCard({
|
|
|
47
46
|
titleId,
|
|
48
47
|
descriptionId,
|
|
49
48
|
imageClassName,
|
|
50
|
-
showMoreInfo,
|
|
51
49
|
}: IframeEventCardProps) {
|
|
52
50
|
const { formatNumber } = useIntl();
|
|
53
51
|
const { t } = useTranslation("Design");
|
|
@@ -72,7 +70,6 @@ export function IframeEventCard({
|
|
|
72
70
|
)}
|
|
73
71
|
onClick={goToDetails ? onClick : undefined}
|
|
74
72
|
>
|
|
75
|
-
{showMoreInfo && <div className="iframe-event-card__info-icon">i</div>}
|
|
76
73
|
{imageSrc && (
|
|
77
74
|
<Card.Img
|
|
78
75
|
className={imageClassName ?? "card-image"}
|
|
@@ -94,8 +91,12 @@ export function IframeEventCard({
|
|
|
94
91
|
<div className="icon-wrapper">
|
|
95
92
|
<CalendarSvg />
|
|
96
93
|
</div>
|
|
97
|
-
<p className="m-0 list-view-hided">
|
|
98
|
-
|
|
94
|
+
<p className="iframe-event-card__bold m-0 list-view-hided">
|
|
95
|
+
{date}
|
|
96
|
+
</p>
|
|
97
|
+
<p className="iframe-event-card__bold m-0 grid-view-hided">
|
|
98
|
+
{shortDate}
|
|
99
|
+
</p>
|
|
99
100
|
</div>
|
|
100
101
|
</Card.Text>
|
|
101
102
|
|
|
@@ -105,7 +106,7 @@ export function IframeEventCard({
|
|
|
105
106
|
<div className="icon-wrapper">
|
|
106
107
|
<ClockSvg />
|
|
107
108
|
</div>
|
|
108
|
-
<p className="m-0">{type}</p>
|
|
109
|
+
<p className="iframe-event-card__bold m-0">{type}</p>
|
|
109
110
|
</div>
|
|
110
111
|
</Card.Text>
|
|
111
112
|
)}
|
|
@@ -116,7 +117,7 @@ export function IframeEventCard({
|
|
|
116
117
|
<div className="icon-wrapper">
|
|
117
118
|
<TicketSvg />
|
|
118
119
|
</div>
|
|
119
|
-
<p className="m-0">
|
|
120
|
+
<p className="iframe-event-card__bold m-0">
|
|
120
121
|
{t("from")}{" "}
|
|
121
122
|
{formatNumber(cost, { style: "currency", currency: "GBP" })}
|
|
122
123
|
</p>
|
package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx
CHANGED
|
@@ -34,24 +34,7 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
34
34
|
const minusButtonGreyedOut = !value;
|
|
35
35
|
const plusButtonGreyedOut = max !== undefined && value === max;
|
|
36
36
|
|
|
37
|
-
const handleChangeValue = (val: number) => {
|
|
38
|
-
if (max !== undefined && val > max) {
|
|
39
|
-
onChange(max);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (min > 0 && val && val < min) {
|
|
44
|
-
onChange(min);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
onChange(val);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
37
|
const handleArrowUpClick = () => {
|
|
51
|
-
if (min > 0 && (value || 0) < min) {
|
|
52
|
-
onArrowUp(min);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
38
|
if (max !== undefined && (value || 0) < max) {
|
|
56
39
|
onArrowUp(value + 1);
|
|
57
40
|
}
|
|
@@ -61,10 +44,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
61
44
|
};
|
|
62
45
|
|
|
63
46
|
const handleArrowDownClick = () => {
|
|
64
|
-
if (min > 0 && (value || 0) - 1 < min) {
|
|
65
|
-
onArrowDown(0);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
47
|
if (min !== undefined && value > min) {
|
|
69
48
|
onArrowDown(value - 1);
|
|
70
49
|
}
|
|
@@ -89,7 +68,7 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
89
68
|
</button>
|
|
90
69
|
<FormControl
|
|
91
70
|
type="number"
|
|
92
|
-
onChange={(e) =>
|
|
71
|
+
onChange={(e) => onChange(Number(e.target.value))}
|
|
93
72
|
value={value}
|
|
94
73
|
min={min}
|
|
95
74
|
max={max}
|
|
@@ -45,6 +45,10 @@ export const ProductQuantityInput = ({
|
|
|
45
45
|
const { t } = useTranslation("Design");
|
|
46
46
|
|
|
47
47
|
const onChange = (quantity: number | null) => {
|
|
48
|
+
let productQuantity = quantity;
|
|
49
|
+
if (product?.maxAmount && quantity > product?.maxAmount) {
|
|
50
|
+
productQuantity = product?.maxAmount;
|
|
51
|
+
}
|
|
48
52
|
_onChange({
|
|
49
53
|
id: product.id,
|
|
50
54
|
name: product.name,
|
|
@@ -53,7 +57,7 @@ export const ProductQuantityInput = ({
|
|
|
53
57
|
price: product.price,
|
|
54
58
|
productCategoryId: category.id,
|
|
55
59
|
zoneId: category.zone?.id,
|
|
56
|
-
quantity,
|
|
60
|
+
quantity: productQuantity,
|
|
57
61
|
capacity: product?.capacity,
|
|
58
62
|
});
|
|
59
63
|
};
|
|
@@ -88,19 +92,19 @@ export const ProductQuantityInput = ({
|
|
|
88
92
|
<NumberInput
|
|
89
93
|
ref={refCallback}
|
|
90
94
|
onChange={(val) => {
|
|
91
|
-
onChange(val);
|
|
95
|
+
onChange(val || null);
|
|
92
96
|
clearErrors(`${product.id}` as const);
|
|
93
97
|
}}
|
|
94
|
-
onArrowDown={(
|
|
95
|
-
onChange(
|
|
98
|
+
onArrowDown={() => {
|
|
99
|
+
onChange(productInfo?.quantity - 1 || 0);
|
|
96
100
|
clearErrors(`${product.id}` as const);
|
|
97
101
|
}}
|
|
98
|
-
onArrowUp={(
|
|
99
|
-
onChange(
|
|
102
|
+
onArrowUp={() => {
|
|
103
|
+
onChange((productInfo?.quantity ?? 0) + 1);
|
|
100
104
|
clearErrors(`${product.id}` as const);
|
|
101
105
|
}}
|
|
102
|
-
min={
|
|
103
|
-
max={product?.maxAmount ? Number(product
|
|
106
|
+
min={0}
|
|
107
|
+
max={product?.maxAmount ? Number(product?.maxAmount) : undefined}
|
|
104
108
|
placeholder="0"
|
|
105
109
|
disabled={product.isSoldOut}
|
|
106
110
|
value={productInfo?.quantity}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ProductCategory } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
1
2
|
import { Currency } from "@licklist/core/dist/Config";
|
|
2
3
|
import { useIntl } from "react-intl";
|
|
3
4
|
import { useTranslation } from "react-i18next";
|
|
4
5
|
import { OrderItems } from "@licklist/plugins/dist/types/context/Iframe/orderItems";
|
|
5
|
-
import { ProductCategory } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
6
6
|
|
|
7
7
|
interface CategoryError {
|
|
8
8
|
message: string;
|
|
@@ -15,16 +15,14 @@ export const useCategoryVerification = () => {
|
|
|
15
15
|
const { formatNumber } = useIntl();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
|
|
18
|
+
values: OrderItems,
|
|
19
19
|
productCategories?: ProductCategory[],
|
|
20
20
|
isLastPage?: boolean
|
|
21
21
|
): CategoryError | void => {
|
|
22
22
|
let errorMessage: { id?: number; message: string } | void;
|
|
23
|
-
|
|
24
|
-
const productArray = Object.values(orderItems).filter(
|
|
23
|
+
const productArray = Object.values(values).filter(
|
|
25
24
|
(product) => product?.quantity > 0
|
|
26
25
|
);
|
|
27
|
-
|
|
28
26
|
const sumOfMinSpends = productCategories.reduce((acc, productCategory) => {
|
|
29
27
|
const { products } = productCategory;
|
|
30
28
|
const selectedProducts = products.filter((product) =>
|
|
@@ -63,12 +63,7 @@ const processedPaymentSummary = ({
|
|
|
63
63
|
const total = calculateTotalPrice(order, externalPaymentDetail);
|
|
64
64
|
|
|
65
65
|
const totalDiscount = calculateTotalDiscount(order.payments);
|
|
66
|
-
|
|
67
|
-
const totalWithDiscount = order.orderPayments.reduce(
|
|
68
|
-
(acc, payment) => acc + payment.amount + payment.discountAmount,
|
|
69
|
-
0
|
|
70
|
-
);
|
|
71
|
-
|
|
66
|
+
const totalWithDiscount = total - Number(totalDiscount);
|
|
72
67
|
let summaryItems: SummaryItem[] = [
|
|
73
68
|
{
|
|
74
69
|
translateKey: AMOUNT_TOTAL,
|
|
@@ -61,7 +61,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
|
|
|
61
61
|
productGroups?: SelectItem[];
|
|
62
62
|
relyOnPeopleType?: RelyOnPeopleType | null;
|
|
63
63
|
fieldSetId?: number;
|
|
64
|
-
steps
|
|
64
|
+
steps?: Step[];
|
|
65
65
|
emailTemplates?: TemplateItem[];
|
|
66
66
|
smsTemplates?: TemplateItem[];
|
|
67
67
|
}
|
|
@@ -26,18 +26,14 @@ import { checkAvailableTimesErrors, getFilteredTemplates } from "../utils";
|
|
|
26
26
|
export interface WithIsLoading {
|
|
27
27
|
isLoading: boolean;
|
|
28
28
|
}
|
|
29
|
-
export interface WithIdOptional {
|
|
30
|
-
id?: number;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
29
|
export interface WithId {
|
|
34
30
|
id: number;
|
|
35
31
|
}
|
|
36
32
|
export interface ProductSetFormValues
|
|
37
33
|
extends FormValues,
|
|
38
|
-
|
|
34
|
+
WithId,
|
|
39
35
|
ProductSetControlValues {
|
|
40
|
-
steps
|
|
36
|
+
steps?: Step[];
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
export interface ProductSetFormProps
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GenerateReportBody,
|
|
3
|
-
PERIOD_BY_BOOKING_DATE,
|
|
4
|
-
PERIOD_BY_CREATION_DATE,
|
|
5
|
-
PERIOD_BY_TYPES,
|
|
6
|
-
Report,
|
|
7
|
-
ReportPeriodBy,
|
|
8
|
-
ReportType,
|
|
9
|
-
} from "@licklist/core/dist/DataMapper/Report";
|
|
1
|
+
import { Report, ReportType } from "@licklist/core/dist/DataMapper/Report";
|
|
10
2
|
import { capitalize } from "lodash";
|
|
11
3
|
import React from "react";
|
|
12
4
|
import { Button, Form, Modal } from "react-bootstrap";
|
|
@@ -36,11 +28,9 @@ type ReportRunnerModalProps = {
|
|
|
36
28
|
reports?: Report[] | null;
|
|
37
29
|
};
|
|
38
30
|
|
|
39
|
-
type FormValues =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
[PERIOD_BY_CREATION_DATE]: "Design:reportPeriodByCreationDate",
|
|
43
|
-
[PERIOD_BY_BOOKING_DATE]: "Design:reportPeriodByBookingDate",
|
|
31
|
+
type FormValues = {
|
|
32
|
+
dateFrom: string;
|
|
33
|
+
dateTo: string;
|
|
44
34
|
};
|
|
45
35
|
|
|
46
36
|
export const ReportRunnerModal = ({
|
|
@@ -136,27 +126,6 @@ export const ReportRunnerModal = ({
|
|
|
136
126
|
</Button>
|
|
137
127
|
|
|
138
128
|
<form noValidate>
|
|
139
|
-
<div className="period-by">
|
|
140
|
-
{PERIOD_BY_TYPES.map((type) => (
|
|
141
|
-
<div key={type}>
|
|
142
|
-
<Form.Group>
|
|
143
|
-
<Form.Check
|
|
144
|
-
inline
|
|
145
|
-
isInvalid={!!errors.periodBy}
|
|
146
|
-
label={t(labelByPeriodType[type])}
|
|
147
|
-
type="radio"
|
|
148
|
-
id={type}
|
|
149
|
-
value={type}
|
|
150
|
-
{...register("periodBy")}
|
|
151
|
-
/>
|
|
152
|
-
<Form.Control.Feedback type="invalid">
|
|
153
|
-
{errors.periodBy?.message}
|
|
154
|
-
</Form.Control.Feedback>
|
|
155
|
-
</Form.Group>
|
|
156
|
-
</div>
|
|
157
|
-
))}
|
|
158
|
-
</div>
|
|
159
|
-
|
|
160
129
|
<div className="controls">
|
|
161
130
|
<Form.Group controlId="from-input">
|
|
162
131
|
<Form.Label>{t("Design:from")}</Form.Label>
|
|
@@ -12,6 +12,7 @@ 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
|
+
|
|
15
16
|
import Icon from "../../../../static/Icon";
|
|
16
17
|
|
|
17
18
|
export type ResultCardProps = {
|
|
@@ -21,6 +22,8 @@ export type ResultCardProps = {
|
|
|
21
22
|
onCardClick?: (id: number) => void;
|
|
22
23
|
};
|
|
23
24
|
|
|
25
|
+
// @TODO integrate when API will be available
|
|
26
|
+
// activity and staff keys
|
|
24
27
|
export const ResultCard = ({
|
|
25
28
|
order,
|
|
26
29
|
className,
|
|
@@ -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,5 +1,4 @@
|
|
|
1
1
|
@import "../snippet-templates/snippetVariables";
|
|
2
|
-
@import "../themes//bookedit/variables";
|
|
3
2
|
|
|
4
3
|
.iframe-event-card {
|
|
5
4
|
position: relative;
|
|
@@ -19,27 +18,12 @@
|
|
|
19
18
|
background-size: cover;
|
|
20
19
|
background-position: center;
|
|
21
20
|
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
|
|
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;
|
|
26
|
+
padding: 0.5rem 0 0.875rem;
|
|
43
27
|
}
|
|
44
28
|
|
|
45
29
|
&__title {
|
|
@@ -49,7 +33,7 @@
|
|
|
49
33
|
line-height: 1.25rem;
|
|
50
34
|
cursor: pointer;
|
|
51
35
|
margin-bottom: 0.5rem;
|
|
52
|
-
font-size:
|
|
36
|
+
font-size: 1.125rem;
|
|
53
37
|
}
|
|
54
38
|
|
|
55
39
|
&__label {
|
|
@@ -98,8 +82,7 @@
|
|
|
98
82
|
color: $snippet-elements-button-color;
|
|
99
83
|
border: none;
|
|
100
84
|
background-color: $snippet-elements-button-background-color;
|
|
101
|
-
box-shadow: 0 0 0 $input-btn-focus-width
|
|
102
|
-
$snippet-elements-button-background-color;
|
|
85
|
+
box-shadow: 0 0 0 $input-btn-focus-width $snippet-elements-button-background-color;
|
|
103
86
|
}
|
|
104
87
|
|
|
105
88
|
&:disabled {
|
|
@@ -112,14 +95,14 @@
|
|
|
112
95
|
&:focus,
|
|
113
96
|
&.focus {
|
|
114
97
|
&:not(:disabled) {
|
|
115
|
-
opacity:
|
|
98
|
+
opacity: .7;
|
|
116
99
|
}
|
|
117
100
|
}
|
|
118
101
|
|
|
119
102
|
&:active,
|
|
120
103
|
&.active {
|
|
121
104
|
&:not(:disabled) {
|
|
122
|
-
opacity:
|
|
105
|
+
opacity: .8;
|
|
123
106
|
}
|
|
124
107
|
}
|
|
125
108
|
}
|
|
@@ -140,7 +123,7 @@
|
|
|
140
123
|
}
|
|
141
124
|
|
|
142
125
|
.card-text {
|
|
143
|
-
font-size: 0.
|
|
126
|
+
font-size: 0.875rem;
|
|
144
127
|
}
|
|
145
128
|
|
|
146
129
|
&.event-info {
|
|
@@ -219,6 +202,7 @@
|
|
|
219
202
|
|
|
220
203
|
@media (max-width: 576px) {
|
|
221
204
|
&.list-view {
|
|
205
|
+
|
|
222
206
|
.card-image {
|
|
223
207
|
margin-right: 0.5rem;
|
|
224
208
|
}
|