@licklist/design 0.50.0 → 0.50.1-dev.1

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.
Files changed (92) hide show
  1. package/dist/calendar/Calendar.d.ts +3 -0
  2. package/dist/calendar/Calendar.d.ts.map +1 -1
  3. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
  4. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +1 -1
  5. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  6. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  7. package/dist/calendar/utils/index.d.ts +2 -1
  8. package/dist/calendar/utils/index.d.ts.map +1 -1
  9. package/dist/calendar/utils/index.js +1 -1
  10. package/dist/date-time-button/DateTimeButton.d.ts +3 -2
  11. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  12. package/dist/date-time-button/DateTimeButton.js +1 -1
  13. package/dist/events/event-card/EventCard.d.ts +2 -1
  14. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  15. package/dist/events/event-card/EventCard.js +1 -1
  16. package/dist/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
  17. package/dist/iframe/event/event-booking-products/EventBookingProducts.js +1 -1
  18. package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts +2 -2
  19. package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts.map +1 -1
  20. package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.js +1 -1
  21. package/dist/iframe/event/event-card/IframeEventCard.d.ts +2 -1
  22. package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
  23. package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
  24. package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.js +1 -1
  25. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  26. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts +2 -1
  27. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts.map +1 -1
  28. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js +1 -1
  29. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -1
  30. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  31. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  32. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  35. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  36. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +2 -1
  37. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  38. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  39. package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
  40. package/dist/static/date-range-input/DateRangeInput.js +1 -1
  41. package/dist/static/switch/BooleanSwitch.d.ts +3 -1
  42. package/dist/static/switch/BooleanSwitch.d.ts.map +1 -1
  43. package/dist/static/switch/BooleanSwitch.js +1 -1
  44. package/dist/styles/events/EventCard.scss +3 -6
  45. package/dist/styles/resources-blocking/_index.scss +6 -0
  46. package/dist/styles/sales/BookingFilter.scss +21 -1
  47. package/dist/styles/sales/BookingResults.scss +1 -1
  48. package/dist/styles/sales/BookingTabs.scss +63 -5
  49. package/dist/styles/sales/LifeTimeSales.scss +1 -0
  50. package/dist/styles/sales/ManualBooking.scss +62 -3
  51. package/dist/styles/sales/SourceOfSales.scss +3 -0
  52. package/dist/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
  53. package/dist/styles/static/Switch.scss +1 -0
  54. package/dist/styles/static/Tabs.scss +6 -0
  55. package/dist/styles/themes/bookedit/_index.scss +9 -8
  56. package/dist/table/TableHelperComponent.d.ts +2 -1
  57. package/dist/table/TableHelperComponent.d.ts.map +1 -1
  58. package/dist/table/TableHelperComponent.js +1 -1
  59. package/package.json +3 -3
  60. package/src/calendar/Calendar.tsx +5 -0
  61. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +3 -3
  62. package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -2
  63. package/src/calendar/utils/index.ts +15 -6
  64. package/src/date-time-button/DateTimeButton.tsx +16 -3
  65. package/src/events/event-card/EventCard.stories.tsx +1 -0
  66. package/src/events/event-card/EventCard.tsx +8 -1
  67. package/src/iframe/event/event-booking-products/EventBookingProducts.tsx +1 -1
  68. package/src/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.tsx +8 -8
  69. package/src/iframe/event/event-card/IframeEventCard.tsx +3 -1
  70. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +5 -5
  71. package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +2 -2
  72. package/src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx +16 -3
  73. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +2 -2
  74. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +1 -1
  75. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  76. package/src/notification/email-template/control/EmailTemplateControl.tsx +5 -15
  77. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +9 -1
  78. package/src/static/date-range-input/DateRangeInput.tsx +23 -2
  79. package/src/static/switch/BooleanSwitch.tsx +6 -2
  80. package/src/styles/events/EventCard.scss +3 -6
  81. package/src/styles/resources-blocking/_index.scss +6 -0
  82. package/src/styles/sales/BookingFilter.scss +21 -1
  83. package/src/styles/sales/BookingResults.scss +1 -1
  84. package/src/styles/sales/BookingTabs.scss +63 -5
  85. package/src/styles/sales/LifeTimeSales.scss +1 -0
  86. package/src/styles/sales/ManualBooking.scss +62 -3
  87. package/src/styles/sales/SourceOfSales.scss +3 -0
  88. package/src/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
  89. package/src/styles/static/Switch.scss +1 -0
  90. package/src/styles/static/Tabs.scss +6 -0
  91. package/src/styles/themes/bookedit/_index.scss +9 -8
  92. package/src/table/TableHelperComponent.tsx +73 -18
@@ -1,13 +1,22 @@
1
1
  import { DateTime, Interval } from "luxon";
2
2
  import isEqual from "lodash/isEqual";
3
+ import { DATE_FORMAT } from "@licklist/core/dist/Config";
4
+ import { AvailableTimes } from "../Calendar";
3
5
 
4
- export const isSelectedDateDisabled = (
5
- selectedDate: DateTime,
6
- disabledDates: DateTime[] = []
7
- ) => {
8
- return !!disabledDates.find((disabledDate) =>
9
- isEqual(disabledDate.toObject(), selectedDate.toObject())
6
+ export const isDateDisabled = (
7
+ date: DateTime,
8
+ disabledDates: DateTime[] = [],
9
+ availableTimes?: AvailableTimes
10
+ ): boolean => {
11
+ const disabledByDates = !!disabledDates.find((disabledDate) =>
12
+ isEqual(disabledDate.toObject(), date.toObject())
10
13
  );
14
+
15
+ const noAvailableTimes = availableTimes
16
+ ? !availableTimes?.[date.toFormat(DATE_FORMAT)]
17
+ : false;
18
+
19
+ return disabledByDates || noAvailableTimes;
11
20
  };
12
21
 
13
22
  export const getMonthCalendarDates = (initialDate: DateTime): DateTime[] => {
@@ -2,6 +2,7 @@ import React, { ReactElement } from "react";
2
2
  import clsx from "clsx";
3
3
  import { DateTime } from "luxon";
4
4
  import { ZoneResourcesAvailability } from "@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper";
5
+ import { has } from "lodash";
5
6
  import { AvailabilityIndicator } from "../availability-indicator";
6
7
  import { DateContent } from "./DateContent";
7
8
 
@@ -18,8 +19,9 @@ export type DateTimeButtonProps = {
18
19
  isSoldOut?: boolean;
19
20
  onSelect: (date: DateTime) => void;
20
21
  price?: string | number | ReactElement | null;
21
- resources?: ZoneResourcesAvailability | null;
22
+ resources: ZoneResourcesAvailability | null | undefined;
22
23
  showResources?: boolean;
24
+ shouldCalculateResources?: boolean;
23
25
  variant: Variant;
24
26
  };
25
27
 
@@ -32,17 +34,28 @@ export const DateTimeButton = ({
32
34
  price,
33
35
  resources,
34
36
  showResources,
37
+ shouldCalculateResources = true,
35
38
  variant = Variant.week,
36
39
  }: DateTimeButtonProps) => {
37
40
  const isSoldOut =
38
41
  _isSoldOut ||
39
- (resources && resources.bookedResources >= resources.totalResources);
42
+ // only consider resources if shouldCalculateResources is true
43
+ (shouldCalculateResources &&
44
+ resources &&
45
+ resources.bookedResources >= resources.totalResources);
40
46
 
41
47
  const isTimeVariant = variant === Variant.time;
42
48
 
43
49
  const isTimeInPast = isTimeVariant && isDateInPast(date);
44
50
 
45
- const isDisabled = _isDisabled || isSoldOut || isTimeInPast;
51
+ const noResources =
52
+ shouldCalculateResources &&
53
+ // only consider resources if shouldCalculateResources is true
54
+ (!resources ||
55
+ !has(resources, "bookedResources") ||
56
+ !has(resources, "totalResources"));
57
+
58
+ const isDisabled = _isDisabled || isSoldOut || isTimeInPast || noResources;
46
59
 
47
60
  return (
48
61
  <button
@@ -33,6 +33,7 @@ export const Default: Story<EventCardProps> = () => {
33
33
  RuPaul's Drag Race UK to VINYL Cambridge! So get excited because
34
34
  the...`}
35
35
  date="2023-08-31T09:35:00.000+03:00"
36
+ productSetName="New product set"
36
37
  imageUrl={showImage ? `https://source.unsplash.com/random` : null}
37
38
  hasPermission={hasPermission}
38
39
  onPreview={() => undefined}
@@ -30,6 +30,7 @@ export interface EventCardProps extends HasPermissionProp {
30
30
  onStatistic: () => void;
31
31
  titleId?: string;
32
32
  descriptionId?: string;
33
+ productSetName?: string;
33
34
  }
34
35
 
35
36
  export function EventCard({
@@ -43,6 +44,7 @@ export function EventCard({
43
44
  onCopy,
44
45
  onRemove,
45
46
  hasPermission = true,
47
+ productSetName,
46
48
  onStatistic,
47
49
  eventStatistic,
48
50
  titleId,
@@ -123,7 +125,12 @@ export function EventCard({
123
125
  ))}
124
126
  </div>
125
127
  </Card.Body>
126
- <Card.Footer>
128
+ <Card.Footer className="flex-column">
129
+ {productSetName && (
130
+ <div className="pl-3 text-truncate">
131
+ {t("Design:productSet")}: {productSetName}
132
+ </div>
133
+ )}
127
134
  <div className="d-flex w-100 justify-content-between">
128
135
  <div className="d-flex">
129
136
  <button
@@ -27,7 +27,7 @@ export function EventBookingProducts({
27
27
  <AccordionItem
28
28
  key={productsCategory.id}
29
29
  eventKey={`${productsCategory.id}`}
30
- productsCategoryId={productsCategory.id}
30
+ productCategoryId={productsCategory.id}
31
31
  name={productsCategory.name}
32
32
  products={productsCategory.products}
33
33
  order={order}
@@ -24,7 +24,7 @@ interface AccordionItemProps {
24
24
  products: Product[];
25
25
  setOrder: SetOrderFn;
26
26
  order: Record<number, OrderItem>;
27
- productsCategoryId: number;
27
+ productCategoryId: number;
28
28
  }
29
29
 
30
30
  function CustomToggle({
@@ -60,7 +60,7 @@ export function AccordionItem({
60
60
  order,
61
61
  setOrder,
62
62
  products,
63
- productsCategoryId,
63
+ productCategoryId,
64
64
  }: AccordionItemProps) {
65
65
  return (
66
66
  <Card className="event-booking-products__card">
@@ -71,7 +71,7 @@ export function AccordionItem({
71
71
  <ProductItem
72
72
  key={product.id}
73
73
  id={product.id}
74
- productsCategoryId={productsCategoryId}
74
+ productCategoryId={productCategoryId}
75
75
  price={product.price}
76
76
  name={product.name}
77
77
  description={product.description}
@@ -92,7 +92,7 @@ interface ProductItemProps {
92
92
  description: string;
93
93
  order: OrderItems;
94
94
  setOrder: SetOrderFn;
95
- productsCategoryId: number;
95
+ productCategoryId: OrderItem["productCategoryId"];
96
96
  }
97
97
 
98
98
  function ProductItem({
@@ -102,7 +102,7 @@ function ProductItem({
102
102
  description,
103
103
  order,
104
104
  setOrder,
105
- productsCategoryId,
105
+ productCategoryId,
106
106
  }: ProductItemProps) {
107
107
  const { formatNumber } = useIntl();
108
108
 
@@ -120,7 +120,7 @@ function ProductItem({
120
120
  quantity: val,
121
121
  name,
122
122
  price,
123
- productsCategoryId,
123
+ productCategoryId,
124
124
  },
125
125
  }));
126
126
  }}
@@ -132,7 +132,7 @@ function ProductItem({
132
132
  quantity: prev[id]?.quantity - 1 || 0,
133
133
  name,
134
134
  price,
135
- productsCategoryId,
135
+ productCategoryId,
136
136
  },
137
137
  }))
138
138
  }
@@ -144,7 +144,7 @@ function ProductItem({
144
144
  quantity: prev[id]?.quantity + 1 || 1,
145
145
  name,
146
146
  price,
147
- productsCategoryId,
147
+ productCategoryId,
148
148
  },
149
149
  }))
150
150
  }
@@ -28,6 +28,7 @@ interface IframeEventCardProps {
28
28
  shortDate: string;
29
29
  titleId?: string;
30
30
  descriptionId?: string;
31
+ imageClassName?: string;
31
32
  }
32
33
 
33
34
  export function IframeEventCard({
@@ -44,6 +45,7 @@ export function IframeEventCard({
44
45
  shortDate,
45
46
  titleId,
46
47
  descriptionId,
48
+ imageClassName,
47
49
  }: IframeEventCardProps) {
48
50
  const { formatNumber } = useIntl();
49
51
  const { t } = useTranslation("Design");
@@ -70,7 +72,7 @@ export function IframeEventCard({
70
72
  >
71
73
  {imageSrc && (
72
74
  <Card.Img
73
- className="card-image"
75
+ className={imageClassName ?? "card-image"}
74
76
  variant="top"
75
77
  as="div"
76
78
  style={{ backgroundImage: `url("${imageSrc}")` }}
@@ -147,35 +147,35 @@ export function Default() {
147
147
  quantity: 1,
148
148
  name: "cat 1 prod 1",
149
149
  price: 0,
150
- productsCategoryId: 1,
150
+ productCategoryId: 1,
151
151
  },
152
152
  "21": {
153
153
  id: 21,
154
154
  quantity: 2,
155
155
  name: "cat 2 prod 1",
156
156
  price: 1,
157
- productsCategoryId: 2,
157
+ productCategoryId: 2,
158
158
  },
159
159
  "31": {
160
160
  id: 31,
161
161
  quantity: 4,
162
162
  name: "cat 3 prod 1",
163
163
  price: 1,
164
- productsCategoryId: 3,
164
+ productCategoryId: 3,
165
165
  },
166
166
  "32": {
167
167
  id: 32,
168
168
  quantity: 4,
169
169
  name: "cat 3 prod 2",
170
170
  price: 1,
171
- productsCategoryId: 3,
171
+ productCategoryId: 3,
172
172
  },
173
173
  "41": {
174
174
  id: 41,
175
175
  quantity: 4,
176
176
  name: "cat 4 prod 1",
177
177
  price: 1,
178
- productsCategoryId: 4,
178
+ productCategoryId: 4,
179
179
  },
180
180
  }}
181
181
  totalWithDiscount={5}
@@ -13,7 +13,7 @@ const doesStepHaveItems = (orderItems: OrderItems, step: MenuStep): boolean => {
13
13
  const categoriesIds = step.productCategories.map((category) => category.id);
14
14
 
15
15
  const stepItems = values(orderItems).filter((item) =>
16
- categoriesIds.includes(item.productsCategoryId)
16
+ categoriesIds.includes(item.productCategoryId)
17
17
  );
18
18
 
19
19
  return stepItems.length > 0;
@@ -23,7 +23,7 @@ const getOrderItemsForCategory = (
23
23
  orderItems: OrderItems,
24
24
  categoryId: number
25
25
  ): OrderItem[] =>
26
- values(orderItems).filter((item) => item.productsCategoryId === categoryId);
26
+ values(orderItems).filter((item) => item.productCategoryId === categoryId);
27
27
 
28
28
  export type ProductsByMenuStepsProps = {
29
29
  orderItems: OrderItems;
@@ -1,6 +1,7 @@
1
1
  import React, { ReactNode, PropsWithChildren } from "react";
2
2
  import { useTranslation } from "react-i18next";
3
3
  import Button from "react-bootstrap/Button";
4
+ import { Spinner } from "react-bootstrap";
4
5
  import { STEP_FORM_ID } from "../../constants";
5
6
 
6
7
  type ButtonPropsWithoutOnClick = {
@@ -18,29 +19,41 @@ type FooterProps = Partial<
18
19
  disabled?: boolean;
19
20
  buttonLabel?: ReactNode;
20
21
  showButton?: boolean;
22
+ isLoading: boolean;
21
23
  } & (ButtonPropsWithoutOnClick | ButtonPropsWithOnClick)
22
24
  >;
23
25
 
24
26
  export type BookingSummaryFooterProps = PropsWithChildren<FooterProps>;
25
27
 
26
28
  export const BookingSummaryFooter = ({
27
- disabled = false,
29
+ disabled: _disabled = false,
28
30
  onClick,
29
31
  buttonLabel,
30
32
  form = STEP_FORM_ID,
31
33
  children,
32
34
  showButton = true,
35
+ isLoading = false,
33
36
  }: BookingSummaryFooterProps) => {
34
37
  const { t } = useTranslation("Design");
35
38
 
36
39
  const buttonProps = onClick ? { onClick } : { type: "submit", form };
37
40
 
41
+ const disabled = _disabled || isLoading;
42
+
38
43
  return (
39
44
  <div className="d-flex flex-column">
40
45
  {children}
41
46
  {showButton && (
42
- <Button className="m-0 mt-3" disabled={disabled} {...buttonProps}>
43
- {buttonLabel ?? t("continue")}
47
+ <Button
48
+ className="m-0 d-flex align-items-center justify-content-center mt-3"
49
+ disabled={disabled}
50
+ {...buttonProps}
51
+ >
52
+ {isLoading ? (
53
+ <Spinner animation="border" size="sm" role="status" />
54
+ ) : (
55
+ buttonLabel ?? t("continue")
56
+ )}
44
57
  </Button>
45
58
  )}
46
59
  </div>
@@ -14,7 +14,7 @@ interface FormOrderItem {
14
14
  id: number;
15
15
  name: string;
16
16
  price: number;
17
- productsCategoryId: number;
17
+ productCategoryId: number;
18
18
  zoneId?: Zone["id"];
19
19
  deposit?: number | null;
20
20
  quantity: number;
@@ -50,7 +50,7 @@ export const ProductQuantityInput = ({
50
50
  name: product.name,
51
51
  deposit,
52
52
  price: product.price,
53
- productsCategoryId: category.id,
53
+ productCategoryId: category.id,
54
54
  zoneId: category.zone?.id,
55
55
  quantity,
56
56
  capacity: product?.capacity,
@@ -47,7 +47,7 @@ export const useCategoryVerification = () => {
47
47
  if (!minSubItems && !maxSubItems) return;
48
48
 
49
49
  const categoryProductsQuantity = productArray.filter(
50
- (product) => product?.productsCategoryId === id
50
+ (product) => product?.productCategoryId === id
51
51
  ).length;
52
52
 
53
53
  if (minSubItems && categoryProductsQuantity < minSubItems) {
@@ -33,7 +33,7 @@ Default.args = {
33
33
  id: 348,
34
34
  quantity: 1,
35
35
  price: 3,
36
- productsCategoryId: 216,
36
+ productCategoryId: 216,
37
37
  name: "test",
38
38
  },
39
39
  numberOfPeople: 1,
@@ -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` as any,
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` as any
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` as any
435
+ `templateOptionValues.${option?.id}.value`
446
436
  )}
447
437
  type="number"
448
438
  placeholder={t(`Design:${option.name}`)}
@@ -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 className="manual-booking-summary">
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="horizontal"
118
+ direction={direction}
98
119
  />
99
120
  <div className="mt-3 d-flex justify-content-end">
100
121
  <Button onClick={onReset} variant="link">
@@ -8,6 +8,8 @@ export interface BooleanSwitchProps {
8
8
  value?: boolean;
9
9
  disabled?: boolean;
10
10
  onChange: (value: boolean) => void;
11
+ firstValueTitle?: string;
12
+ secondValueTitle?: string;
11
13
  }
12
14
 
13
15
  export function BooleanSwitch({
@@ -15,12 +17,14 @@ export function BooleanSwitch({
15
17
  value,
16
18
  disabled,
17
19
  onChange,
20
+ firstValueTitle,
21
+ secondValueTitle,
18
22
  }: BooleanSwitchProps) {
19
23
  const { t } = useTranslation("Design");
20
24
 
21
25
  const options: SelectItem[] = [
22
- { id: 1, value: t("yes") },
23
- { id: 0, value: t("no") },
26
+ { id: 1, value: firstValueTitle ?? t("yes") },
27
+ { id: 0, value: secondValueTitle ?? t("no") },
24
28
  ];
25
29
 
26
30
  const handleChange = useCallback(
@@ -7,8 +7,6 @@ $event-card-title-font-weight: $font-weight-semibold !default;
7
7
  $event-card-title-font-size: sp(5) !default;
8
8
  $event-card-title-line-height: 4 / 3 !default;
9
9
 
10
- $event-card-footer-height: sp(6) !default;
11
-
12
10
  $event-card-image-container-overflow-top: sp(3) !default;
13
11
  $event-card-image-container-overflow-x: sp(3) !default;
14
12
  $event-card-image-container-aspect-ratio: 1.6 !default;
@@ -34,7 +32,7 @@ $event-card-views-gutter: sp(3) !default;
34
32
  transition: ease-in 0.25s;
35
33
  border-radius: $event-card-border-radius;
36
34
 
37
- >*+* {
35
+ > * + * {
38
36
  margin-top: $event-card-contents-gutter;
39
37
  }
40
38
 
@@ -54,7 +52,7 @@ $event-card-views-gutter: sp(3) !default;
54
52
  min-height: 13.75rem;
55
53
  max-height: 22rem;
56
54
  }
57
- }
55
+ }
58
56
  }
59
57
 
60
58
  .card-title {
@@ -74,7 +72,6 @@ $event-card-views-gutter: sp(3) !default;
74
72
  border: unset;
75
73
  border-radius: unset;
76
74
  padding: 0;
77
- height: $event-card-footer-height;
78
75
 
79
76
  svg {
80
77
  height: 100%;
@@ -175,4 +172,4 @@ $event-card-views-gutter: sp(3) !default;
175
172
  color: #504f4f;
176
173
  width: 1.7rem;
177
174
  }
178
- }
175
+ }
@@ -106,6 +106,12 @@
106
106
  align-items: center;
107
107
  gap: 0.25rem;
108
108
  margin-bottom: 0.5rem;
109
+
110
+ @include media-breakpoint-down(sm) {
111
+ justify-content: center;
112
+ flex-wrap: wrap;
113
+ }
114
+
109
115
  }
110
116
 
111
117
  .text-input.form-group {
@@ -157,6 +157,19 @@
157
157
  margin-bottom: 0;
158
158
  }
159
159
  }
160
+
161
+ .apply-container{
162
+ display: flex;
163
+ justify-content: space-around;
164
+ column-gap: 2rem;
165
+ margin-left: 3rem;
166
+
167
+ @include media-breakpoint-down(sm) {
168
+ flex-direction: row;
169
+ margin-left: 0rem;
170
+ column-gap: 1rem;
171
+ }
172
+ }
160
173
  }
161
174
 
162
175
  .additional-filter-container {
@@ -164,10 +177,12 @@
164
177
 
165
178
  @include media-breakpoint-down(md) {
166
179
  flex-wrap: wrap;
180
+
167
181
  .date-container {
168
182
  width: 100%;
169
183
  flex: 1;
170
184
  }
185
+
171
186
  .btn-primary {
172
187
  margin-top: 1rem;
173
188
  }
@@ -228,6 +243,11 @@
228
243
  transform: rotate(45deg);
229
244
  }
230
245
  }
246
+
247
+ @include media-breakpoint-down(sm) {
248
+ flex-direction: column;
249
+ justify-content: flex-start;
250
+ }
231
251
  }
232
252
  }
233
- }
253
+ }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14.25rem;
8
+ height: 14rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);