@licklist/design 0.58.1 → 0.58.3-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/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +1 -1
- 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/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.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/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.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 +1 -1
- 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/sales/manual-booking/summary/ManualBookingSummary.d.ts +2 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
- package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
- package/dist/static/date-range-input/DateRangeInput.js +1 -1
- package/dist/styles/report/ReportRunnerModal.scss +88 -82
- package/dist/styles/resources-blocking/_index.scss +6 -0
- package/dist/styles/sales/BookingFilter.scss +24 -2
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/BookingTabs.scss +63 -5
- package/dist/styles/sales/LifeTimeSales.scss +1 -0
- package/dist/styles/sales/ManualBooking.scss +62 -3
- package/dist/styles/sales/SourceOfSales.scss +3 -0
- package/dist/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
- package/dist/styles/static/Tabs.scss +6 -0
- package/dist/styles/themes/bookedit/_index.scss +9 -8
- package/dist/styles/themes/bookedit/_variables.scss +2 -0
- package/package.json +3 -3
- package/src/auth/Login/LoginComponent.tsx +9 -1
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +0 -1
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +14 -14
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +5 -3
- package/src/notification/email-template/control/EmailTemplateControl.tsx +5 -15
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +1 -1
- package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +35 -4
- package/src/sales/booking/results/components/ResultCard.tsx +0 -3
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +9 -1
- package/src/static/date-range-input/DateRangeInput.tsx +23 -2
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/report/ReportRunnerModal.scss +88 -82
- package/src/styles/resources-blocking/_index.scss +6 -0
- package/src/styles/sales/BookingFilter.scss +24 -2
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/BookingTabs.scss +63 -5
- package/src/styles/sales/LifeTimeSales.scss +1 -0
- package/src/styles/sales/ManualBooking.scss +62 -3
- package/src/styles/sales/SourceOfSales.scss +3 -0
- package/src/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
- package/src/styles/static/Tabs.scss +6 -0
- package/src/styles/themes/bookedit/_index.scss +9 -8
- package/src/styles/themes/bookedit/_variables.scss +2 -0
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
.booking-tabs-pane {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
|
+
justify-content: space-between;
|
|
4
5
|
align-items: center;
|
|
5
6
|
height: 2.75rem;
|
|
6
7
|
background-color: $white;
|
|
7
8
|
|
|
8
9
|
.booking-tabs {
|
|
9
10
|
svg {
|
|
10
|
-
g
|
|
11
|
-
fill: $white;
|
|
11
|
+
g>rect:first-child {
|
|
12
|
+
fill: $white;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
|
|
15
16
|
.active {
|
|
16
17
|
svg {
|
|
17
|
-
g
|
|
18
|
-
fill: $blue;
|
|
18
|
+
g>rect:first-child {
|
|
19
|
+
fill: $blue;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
@include media-breakpoint-down(sm) {
|
|
25
|
+
width: 4rem;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.content {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
width: 85%;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
|
|
35
|
+
@include media-breakpoint-down(sm) {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
align-items: start;
|
|
39
|
+
height: 4rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.booking {
|
|
43
|
+
@include media-breakpoint-down(sm) {
|
|
44
|
+
height: 13rem;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
22
47
|
}
|
|
23
48
|
|
|
24
49
|
.separator {
|
|
@@ -29,6 +54,12 @@
|
|
|
29
54
|
.children {
|
|
30
55
|
flex: 1;
|
|
31
56
|
margin-left: 1rem;
|
|
57
|
+
|
|
58
|
+
@include media-breakpoint-down(sm) {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: start;
|
|
62
|
+
}
|
|
32
63
|
}
|
|
33
64
|
|
|
34
65
|
.buttons {
|
|
@@ -61,6 +92,33 @@
|
|
|
61
92
|
border-radius: 0.625rem;
|
|
62
93
|
margin-right: 0.5rem;
|
|
63
94
|
}
|
|
95
|
+
@include media-breakpoint-down(sm) {
|
|
96
|
+
width: 12.5rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@include media-breakpoint-down(sm) {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
align-items: start;
|
|
105
|
+
gap: .5rem;
|
|
106
|
+
margin-top: .5rem;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@include media-breakpoint-down(sm) {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: start;
|
|
114
|
+
gap: 1rem;
|
|
115
|
+
margin-top: 1rem;
|
|
116
|
+
height: 100%;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.booking {
|
|
120
|
+
@include media-breakpoint-down(sm) {
|
|
121
|
+
height: 13rem;
|
|
64
122
|
}
|
|
65
123
|
}
|
|
66
124
|
}
|
|
@@ -361,10 +361,11 @@
|
|
|
361
361
|
width: inherit;
|
|
362
362
|
|
|
363
363
|
@include media-breakpoint-down(sm) {
|
|
364
|
-
|
|
365
|
-
padding-top: 2rem;
|
|
364
|
+
display: none;
|
|
366
365
|
}
|
|
367
366
|
|
|
367
|
+
|
|
368
|
+
|
|
368
369
|
.form-control {
|
|
369
370
|
margin-bottom: 1.5rem;
|
|
370
371
|
}
|
|
@@ -411,6 +412,64 @@
|
|
|
411
412
|
}
|
|
412
413
|
}
|
|
413
414
|
|
|
415
|
+
.manual-booking-summary-mobile {
|
|
416
|
+
display: none;
|
|
417
|
+
|
|
418
|
+
@include media-breakpoint-down(sm) {
|
|
419
|
+
display: block;
|
|
420
|
+
padding: 0 1.5rem;
|
|
421
|
+
padding-top: 2rem;
|
|
422
|
+
height: max-content;
|
|
423
|
+
margin-bottom: 1.5rem;
|
|
424
|
+
width: inherit;
|
|
425
|
+
|
|
426
|
+
.form-control {
|
|
427
|
+
margin-bottom: .5rem;
|
|
428
|
+
}
|
|
429
|
+
.receipt-title {
|
|
430
|
+
font-size: 1.125rem;
|
|
431
|
+
font-weight: 600;
|
|
432
|
+
padding-bottom: 0.4rem;
|
|
433
|
+
margin-bottom: 1rem;
|
|
434
|
+
border-bottom: 2px solid $gray-400;
|
|
435
|
+
}
|
|
436
|
+
.event-name {
|
|
437
|
+
font-size: 0.94rem;
|
|
438
|
+
font-weight: 600;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.border-summary-item {
|
|
442
|
+
padding-bottom: 0.9rem;
|
|
443
|
+
margin-bottom: 1%;
|
|
444
|
+
border-bottom: 2px solid $gray-100;
|
|
445
|
+
flex-wrap: wrap;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.total-container {
|
|
449
|
+
display: flex;
|
|
450
|
+
justify-content: space-between;
|
|
451
|
+
font-size: 1rem;
|
|
452
|
+
font-weight: 600;
|
|
453
|
+
|
|
454
|
+
@include media-breakpoint-down(lg) {
|
|
455
|
+
flex-wrap: wrap;
|
|
456
|
+
}
|
|
457
|
+
.total-amount {
|
|
458
|
+
padding-left: 1rem;
|
|
459
|
+
@include media-breakpoint-down(lg) {
|
|
460
|
+
padding-left: 0;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.summary-item-container {
|
|
466
|
+
.border-summary-item:nth-last-child(2) {
|
|
467
|
+
border-bottom: 2px solid $gray-400;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
414
473
|
.menu-list-manual-booking {
|
|
415
474
|
display: flex;
|
|
416
475
|
align-items: center;
|
|
@@ -437,4 +496,4 @@
|
|
|
437
496
|
color: $blue;
|
|
438
497
|
}
|
|
439
498
|
}
|
|
440
|
-
}
|
|
499
|
+
}
|
|
@@ -28,12 +28,13 @@ $snippet-template-card-button-transition: $product-set-card-transition !default;
|
|
|
28
28
|
border: 1px solid #ccc;
|
|
29
29
|
border-radius: $border-radius;
|
|
30
30
|
height: 10rem;
|
|
31
|
-
width: 15rem;
|
|
31
|
+
min-width: 15rem;
|
|
32
32
|
padding: 1rem;
|
|
33
33
|
|
|
34
34
|
@include media-breakpoint-down(sm) {
|
|
35
35
|
height: 100%;
|
|
36
36
|
max-height: 10rem;
|
|
37
|
+
width: 100%;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
p {
|
|
@@ -109,4 +110,4 @@ $snippet-template-card-button-transition: $product-set-card-transition !default;
|
|
|
109
110
|
&:hover {
|
|
110
111
|
border: 2px solid $blue;
|
|
111
112
|
}
|
|
112
|
-
}
|
|
113
|
+
}
|
|
@@ -11,6 +11,12 @@ $tab-nav-link-active-border-bottom: 1px solid $tab-nav-link-active-color !defaul
|
|
|
11
11
|
margin-left: -1.25rem;
|
|
12
12
|
border-bottom: 1px solid $nav-tabs-border-color;
|
|
13
13
|
|
|
14
|
+
@include media-breakpoint-down(sm) {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
.nav-link {
|
|
15
21
|
color: $tab-nav-link-color;
|
|
16
22
|
background-color: transparent;
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
color: gray("600");
|
|
99
99
|
|
|
100
100
|
&.sortable {
|
|
101
|
-
&::before,
|
|
101
|
+
&::before,
|
|
102
|
+
&::after {
|
|
102
103
|
opacity: 1;
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -132,20 +133,20 @@
|
|
|
132
133
|
width: 2.5rem;
|
|
133
134
|
height: 2.5rem;
|
|
134
135
|
background-color: transparent;
|
|
135
|
-
|
|
136
|
+
|
|
136
137
|
svg {
|
|
137
138
|
margin-bottom: 2.5px;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
&:hover {
|
|
141
142
|
cursor: pointer;
|
|
142
|
-
border-radius: .5rem;
|
|
143
|
+
border-radius: 0.5rem;
|
|
143
144
|
background-color: lighten($primary, 40);
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
.page-item {
|
|
148
|
-
margin-left: .4rem;
|
|
149
|
+
margin-left: 0.4rem;
|
|
149
150
|
min-width: 15px;
|
|
150
151
|
width: 2.5rem;
|
|
151
152
|
height: 2.5rem;
|
|
@@ -153,7 +154,7 @@
|
|
|
153
154
|
.page-link {
|
|
154
155
|
border: 0;
|
|
155
156
|
padding: 0;
|
|
156
|
-
border-radius: .5rem;
|
|
157
|
+
border-radius: 0.5rem;
|
|
157
158
|
height: 100%;
|
|
158
159
|
display: flex;
|
|
159
160
|
align-items: center;
|
|
@@ -162,13 +163,13 @@
|
|
|
162
163
|
color: $black;
|
|
163
164
|
font-weight: 600;
|
|
164
165
|
font-size: 0.875rem;
|
|
165
|
-
|
|
166
|
+
|
|
166
167
|
&:hover {
|
|
167
|
-
border-radius: .5rem;
|
|
168
|
+
border-radius: 0.5rem;
|
|
168
169
|
background-color: lighten($primary, 40);
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
|
-
|
|
172
|
+
|
|
172
173
|
&.active {
|
|
173
174
|
.page-link {
|
|
174
175
|
border: 2px solid $primary;
|
|
@@ -197,6 +197,7 @@ $grid-breakpoints: (
|
|
|
197
197
|
md: 768px,
|
|
198
198
|
lg: 992px,
|
|
199
199
|
xl: 1200px,
|
|
200
|
+
xxl: 1500px,
|
|
200
201
|
) !default;
|
|
201
202
|
|
|
202
203
|
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
|
|
@@ -211,6 +212,7 @@ $container-max-widths: (
|
|
|
211
212
|
md: 720px,
|
|
212
213
|
lg: 960px,
|
|
213
214
|
xl: 1140px,
|
|
215
|
+
xxl: 1500px,
|
|
214
216
|
) !default;
|
|
215
217
|
|
|
216
218
|
@include _assert-ascending($container-max-widths, "$container-max-widths");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.3-dev.0",
|
|
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.22.1-dev.3 < 0.22.1",
|
|
57
57
|
"@licklist/eslint-config": "0.3.4",
|
|
58
|
-
"@licklist/plugins": "
|
|
58
|
+
"@licklist/plugins": ">=0.27.1-dev.0 < 0.27.1",
|
|
59
59
|
"@mdx-js/react": "1.6.22",
|
|
60
60
|
"@popperjs/core": "2.11.8",
|
|
61
61
|
"@react-aria/utils": "3.9.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useState } from "react";
|
|
1
|
+
import React, { useContext, useEffect, useState } from "react";
|
|
2
2
|
import Row from "react-bootstrap/Row";
|
|
3
3
|
import Col from "react-bootstrap/Col";
|
|
4
4
|
import { Trans, useTranslation } from "react-i18next";
|
|
@@ -90,6 +90,14 @@ const LoginComponent = ({
|
|
|
90
90
|
RouteService.redirectTo("/");
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (!user.profile || !auth.secrets) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
RouteService.redirectTo("/");
|
|
99
|
+
}, [user.profile, auth.secrets]);
|
|
100
|
+
|
|
93
101
|
return (
|
|
94
102
|
<Router>
|
|
95
103
|
<Row className="justify-content-center">
|
|
@@ -2,7 +2,6 @@ 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
|
-
|
|
6
5
|
import { useParams } from "react-router-dom";
|
|
7
6
|
import { useEventEditProductSetContext } from "@licklist/plugins/dist/context/event/EventEditProductSetContext";
|
|
8
7
|
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
|
-
({ products, ...productCategory }) => ({
|
|
32
|
+
productCategories:
|
|
33
|
+
productCategories?.map(({ products, ...productCategory }) => ({
|
|
34
34
|
...productCategory,
|
|
35
|
-
products:
|
|
36
|
-
...product
|
|
37
|
-
|
|
38
|
-
...subProducts
|
|
35
|
+
products:
|
|
36
|
+
products?.map(({ zoneId, subProducts, ...product }) => ({
|
|
37
|
+
...product,
|
|
38
|
+
subProducts: subProducts?.map(({ zoneId, ...subProducts }) => ({
|
|
39
|
+
...subProducts,
|
|
40
|
+
productCategoryId: undefined,
|
|
41
|
+
zoneId,
|
|
42
|
+
})),
|
|
39
43
|
productCategoryId: undefined,
|
|
40
|
-
zoneId
|
|
41
|
-
})),
|
|
42
|
-
|
|
43
|
-
zoneId: zoneId as number,
|
|
44
|
-
})),
|
|
45
|
-
})
|
|
46
|
-
),
|
|
44
|
+
zoneId,
|
|
45
|
+
})) ?? [],
|
|
46
|
+
})) ?? [],
|
|
47
47
|
venueMapSetId: step?.venueMapSet ? step?.venueMapSet?.id : null,
|
|
48
|
-
})) ??
|
|
48
|
+
})) ?? [],
|
|
49
49
|
menuRecurrences: hasNoRecurrences ? [] : productSet?.menuRecurrences ?? [],
|
|
50
50
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ProductCategory } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
2
1
|
import { Currency } from "@licklist/core/dist/Config";
|
|
3
2
|
import { useIntl } from "react-intl";
|
|
4
3
|
import { useTranslation } from "react-i18next";
|
|
5
4
|
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,14 +15,16 @@ export const useCategoryVerification = () => {
|
|
|
15
15
|
const { formatNumber } = useIntl();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
|
|
18
|
+
orderItems: OrderItems,
|
|
19
19
|
productCategories?: ProductCategory[],
|
|
20
20
|
isLastPage?: boolean
|
|
21
21
|
): CategoryError | void => {
|
|
22
22
|
let errorMessage: { id?: number; message: string } | void;
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
const productArray = Object.values(orderItems).filter(
|
|
24
25
|
(product) => product?.quantity > 0
|
|
25
26
|
);
|
|
27
|
+
|
|
26
28
|
const sumOfMinSpends = productCategories.reduce((acc, productCategory) => {
|
|
27
29
|
const { products } = productCategory;
|
|
28
30
|
const selectedProducts = products.filter((product) =>
|
|
@@ -201,15 +201,7 @@ export const EmailTemplateControl = React.forwardRef(
|
|
|
201
201
|
return (
|
|
202
202
|
<>
|
|
203
203
|
<Row>
|
|
204
|
-
<Form.Group
|
|
205
|
-
as={Col}
|
|
206
|
-
controlId="type"
|
|
207
|
-
xs
|
|
208
|
-
sm={12}
|
|
209
|
-
md={8}
|
|
210
|
-
lg={10}
|
|
211
|
-
xl={12}
|
|
212
|
-
>
|
|
204
|
+
<Form.Group as={Col} controlId="type" sm={12}>
|
|
213
205
|
<Form.Label>{t("type")}</Form.Label>
|
|
214
206
|
<Form.Control
|
|
215
207
|
as="select"
|
|
@@ -372,9 +364,7 @@ export const EmailTemplateControl = React.forwardRef(
|
|
|
372
364
|
if (option.type === OPTION_TYPE.checkbox) {
|
|
373
365
|
return (
|
|
374
366
|
<Form.Check
|
|
375
|
-
{...register(
|
|
376
|
-
`templateOptionValues.${option?.id}.value` as any
|
|
377
|
-
)}
|
|
367
|
+
{...register(`templateOptionValues.${option?.id}.value`)}
|
|
378
368
|
type="checkbox"
|
|
379
369
|
label={t(`Design:${option.name}`)}
|
|
380
370
|
id={option.name + option.id}
|
|
@@ -397,7 +387,7 @@ export const EmailTemplateControl = React.forwardRef(
|
|
|
397
387
|
onChange={() => {
|
|
398
388
|
setIsIncludePDF(!isIncludePDF);
|
|
399
389
|
setValue(
|
|
400
|
-
`templateOptionValues.${option.id}.value
|
|
390
|
+
`templateOptionValues.${option.id}.value`,
|
|
401
391
|
""
|
|
402
392
|
);
|
|
403
393
|
}}
|
|
@@ -413,7 +403,7 @@ export const EmailTemplateControl = React.forwardRef(
|
|
|
413
403
|
<Form.Control
|
|
414
404
|
as="select"
|
|
415
405
|
{...register(
|
|
416
|
-
`templateOptionValues.${option.id}.value`
|
|
406
|
+
`templateOptionValues.${option.id}.value`
|
|
417
407
|
)}
|
|
418
408
|
defaultValue={option.selectedValue || ""}
|
|
419
409
|
>
|
|
@@ -442,7 +432,7 @@ export const EmailTemplateControl = React.forwardRef(
|
|
|
442
432
|
</Form.Label>
|
|
443
433
|
<Form.Control
|
|
444
434
|
{...register(
|
|
445
|
-
`templateOptionValues.${option?.id}.value`
|
|
435
|
+
`templateOptionValues.${option?.id}.value`
|
|
446
436
|
)}
|
|
447
437
|
type="number"
|
|
448
438
|
placeholder={t(`Design:${option.name}`)}
|
|
@@ -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
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
2
10
|
import { capitalize } from "lodash";
|
|
3
11
|
import React from "react";
|
|
4
12
|
import { Button, Form, Modal } from "react-bootstrap";
|
|
@@ -28,9 +36,11 @@ type ReportRunnerModalProps = {
|
|
|
28
36
|
reports?: Report[] | null;
|
|
29
37
|
};
|
|
30
38
|
|
|
31
|
-
type FormValues =
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
type FormValues = Pick<GenerateReportBody, "dateFrom" | "dateTo" | "periodBy">;
|
|
40
|
+
|
|
41
|
+
const labelByPeriodType: Record<ReportPeriodBy, string> = {
|
|
42
|
+
[PERIOD_BY_CREATION_DATE]: "Design:reportPeriodByCreationDate",
|
|
43
|
+
[PERIOD_BY_BOOKING_DATE]: "Design:reportPeriodByBookingDate",
|
|
34
44
|
};
|
|
35
45
|
|
|
36
46
|
export const ReportRunnerModal = ({
|
|
@@ -126,6 +136,27 @@ export const ReportRunnerModal = ({
|
|
|
126
136
|
</Button>
|
|
127
137
|
|
|
128
138
|
<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
|
+
|
|
129
160
|
<div className="controls">
|
|
130
161
|
<Form.Group controlId="from-input">
|
|
131
162
|
<Form.Label>{t("Design:from")}</Form.Label>
|
|
@@ -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,
|
|
@@ -24,6 +24,7 @@ export interface ManualBookingSummaryProps {
|
|
|
24
24
|
isFeeFetching: boolean;
|
|
25
25
|
orderDate: string;
|
|
26
26
|
relyOnPeopleType?: RelyOnPeopleType | null;
|
|
27
|
+
isMobileView?: boolean;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export const ManualBookingSummary = ({
|
|
@@ -35,6 +36,7 @@ export const ManualBookingSummary = ({
|
|
|
35
36
|
orderDate,
|
|
36
37
|
relyOnPeopleType,
|
|
37
38
|
hasBookingCategory,
|
|
39
|
+
isMobileView,
|
|
38
40
|
}: ManualBookingSummaryProps) => {
|
|
39
41
|
const { t } = useTranslation(["Design", "Sale"]);
|
|
40
42
|
const { formatNumber } = useIntl();
|
|
@@ -44,7 +46,13 @@ export const ManualBookingSummary = ({
|
|
|
44
46
|
const date = currentDate.toFormat(DATE_TIME_MANUAL_BOOKING_FORMAT);
|
|
45
47
|
const time = currentDate.toFormat(TIME_FORMAT);
|
|
46
48
|
return (
|
|
47
|
-
<div
|
|
49
|
+
<div
|
|
50
|
+
className={
|
|
51
|
+
isMobileView
|
|
52
|
+
? "manual-booking-summary-mobile"
|
|
53
|
+
: "manual-booking-summary"
|
|
54
|
+
}
|
|
55
|
+
>
|
|
48
56
|
<div className="receipt-title">{t("Sale:receipt")}</div>
|
|
49
57
|
<div className="event-name border-summary-item">{eventName}</div>
|
|
50
58
|
<div className="border-summary-item">{date}</div>
|
|
@@ -11,10 +11,13 @@ import {
|
|
|
11
11
|
rangeDatesToStringDates,
|
|
12
12
|
stringDatesToInputValue,
|
|
13
13
|
} from "./utils";
|
|
14
|
+
import { MOBILE_WIDTH } from "../../iframe/order-process/components/BookingSummary/types";
|
|
14
15
|
|
|
15
16
|
import "react-date-range/dist/styles.css";
|
|
16
17
|
import "react-date-range/dist/theme/default.css";
|
|
17
18
|
|
|
19
|
+
type DateRangeDirection = "vertical" | "horizontal";
|
|
20
|
+
|
|
18
21
|
type DateRangeInputProps = {
|
|
19
22
|
placeholder: string;
|
|
20
23
|
startDate?: string;
|
|
@@ -33,7 +36,7 @@ export const DateRangeInput = ({
|
|
|
33
36
|
disabled,
|
|
34
37
|
}: DateRangeInputProps) => {
|
|
35
38
|
const { t } = useTranslation("Design");
|
|
36
|
-
|
|
39
|
+
const [direction, setDirection] = useState<DateRangeDirection>("horizontal");
|
|
37
40
|
const [state, setState] = useState<Range[]>([
|
|
38
41
|
{
|
|
39
42
|
startDate: new Date(),
|
|
@@ -82,6 +85,24 @@ export const DateRangeInput = ({
|
|
|
82
85
|
}
|
|
83
86
|
}, [startDate, endDate]);
|
|
84
87
|
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
const resizeBodyInMobile = () => {
|
|
90
|
+
if (window.innerWidth > MOBILE_WIDTH) {
|
|
91
|
+
setDirection("horizontal");
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
setDirection("vertical");
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
resizeBodyInMobile();
|
|
99
|
+
window.addEventListener("resize", resizeBodyInMobile);
|
|
100
|
+
|
|
101
|
+
return () => {
|
|
102
|
+
window.removeEventListener("resize", resizeBodyInMobile);
|
|
103
|
+
};
|
|
104
|
+
}, []);
|
|
105
|
+
|
|
85
106
|
return (
|
|
86
107
|
<div>
|
|
87
108
|
<OverlayTrigger
|
|
@@ -94,7 +115,7 @@ export const DateRangeInput = ({
|
|
|
94
115
|
moveRangeOnFirstSelection={false}
|
|
95
116
|
ranges={state}
|
|
96
117
|
months={months}
|
|
97
|
-
direction=
|
|
118
|
+
direction={direction}
|
|
98
119
|
/>
|
|
99
120
|
<div className="mt-3 d-flex justify-content-end">
|
|
100
121
|
<Button onClick={onReset} variant="link">
|
|
@@ -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
|
|