@licklist/design 0.56.0 → 0.58.0-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.
Files changed (83) hide show
  1. package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
  2. package/dist/auth/Login/LoginComponent.js +1 -1
  3. package/dist/calendar/Calendar.d.ts +3 -8
  4. package/dist/calendar/Calendar.d.ts.map +1 -1
  5. package/dist/calendar/Calendar.js +1 -1
  6. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +2 -2
  7. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
  8. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
  9. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
  10. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  11. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  12. package/dist/calendar/utils/index.d.ts +0 -2
  13. package/dist/calendar/utils/index.d.ts.map +1 -1
  14. package/dist/calendar/utils/index.js +1 -1
  15. package/dist/date-time-button/DateTimeButton.d.ts +3 -3
  16. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  17. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  18. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  19. package/dist/events/edit-event-modal/hooks/index.d.ts +3 -0
  20. package/dist/events/edit-event-modal/hooks/index.d.ts.map +1 -0
  21. package/dist/events/edit-event-modal/hooks/useFormattedDuration.d.ts +2 -0
  22. package/dist/events/edit-event-modal/hooks/useFormattedDuration.d.ts.map +1 -0
  23. package/dist/events/edit-event-modal/hooks/useFormattedDuration.js +1 -0
  24. package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts +11 -0
  25. package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts.map +1 -0
  26. package/dist/events/edit-event-modal/hooks/useValidationOptions.js +1 -0
  27. package/dist/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
  28. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  29. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  30. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  31. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  34. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  35. package/dist/sales/booking/results/components/ResultCard.d.ts.map +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/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  40. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  41. package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
  42. package/dist/static/date-range-input/DateRangeInput.js +1 -1
  43. package/dist/styles/resources-blocking/_index.scss +6 -0
  44. package/dist/styles/sales/BookingFilter.scss +24 -2
  45. package/dist/styles/sales/BookingResults.scss +1 -1
  46. package/dist/styles/sales/BookingTabs.scss +63 -5
  47. package/dist/styles/sales/LifeTimeSales.scss +1 -0
  48. package/dist/styles/sales/ManualBooking.scss +62 -3
  49. package/dist/styles/sales/SourceOfSales.scss +3 -0
  50. package/dist/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
  51. package/dist/styles/static/Tabs.scss +6 -0
  52. package/dist/styles/themes/bookedit/_index.scss +9 -8
  53. package/dist/styles/themes/bookedit/_variables.scss +2 -0
  54. package/package.json +5 -1
  55. package/src/auth/Login/LoginComponent.tsx +9 -1
  56. package/src/calendar/Calendar.tsx +9 -16
  57. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +8 -5
  58. package/src/calendar/components/CalendarDates/CalendarDates.tsx +12 -13
  59. package/src/calendar/utils/index.ts +0 -19
  60. package/src/date-time-button/DateTimeButton.tsx +3 -3
  61. package/src/events/edit-event-modal/IntervalInput.tsx +8 -80
  62. package/src/events/edit-event-modal/hooks/index.ts +2 -0
  63. package/src/events/edit-event-modal/hooks/useFormattedDuration.tsx +40 -0
  64. package/src/events/edit-event-modal/hooks/useValidationOptions.tsx +36 -0
  65. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +5 -2
  66. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -1
  67. package/src/notification/email-template/control/EmailTemplateControl.tsx +5 -15
  68. package/src/sales/booking/results/components/ResultCard.tsx +0 -3
  69. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +9 -1
  70. package/src/snippet/snippet-template/preview/Preview.tsx +3 -0
  71. package/src/static/date-range-input/DateRangeInput.tsx +23 -2
  72. package/src/static/switch/BooleanSwitch.tsx +1 -1
  73. package/src/styles/resources-blocking/_index.scss +6 -0
  74. package/src/styles/sales/BookingFilter.scss +24 -2
  75. package/src/styles/sales/BookingResults.scss +1 -1
  76. package/src/styles/sales/BookingTabs.scss +63 -5
  77. package/src/styles/sales/LifeTimeSales.scss +1 -0
  78. package/src/styles/sales/ManualBooking.scss +62 -3
  79. package/src/styles/sales/SourceOfSales.scss +3 -0
  80. package/src/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
  81. package/src/styles/static/Tabs.scss +6 -0
  82. package/src/styles/themes/bookedit/_index.scss +9 -8
  83. package/src/styles/themes/bookedit/_variables.scss +2 -0
@@ -2,25 +2,25 @@ import React, { useMemo } from "react";
2
2
  import { DateTime } from "luxon";
3
3
  import { DateTimeButton, Variant } from "../../../date-time-button";
4
4
  import { CalendarWeekdays } from "../CalendarWeekdays";
5
- import { isDateDisabled } from "../../utils";
6
5
  import { CalendarProps } from "../../Calendar";
7
6
 
8
- export type CalendarDatesProps = Omit<
7
+ export type CalendarDatesProps = Pick<
9
8
  CalendarProps,
10
- "currentDate" | "setCurrentDate" | "initialDate"
9
+ | "isLoading"
10
+ | "calendarDates"
11
+ | "selectedDate"
12
+ | "setSelectedDate"
13
+ | "fromPrice"
14
+ | "getDateTimeButtonProps"
11
15
  >;
12
16
 
13
17
  export const CalendarDates = ({
14
- disabledDates = [],
15
18
  isLoading = false,
16
19
  calendarDates,
17
20
  selectedDate,
18
21
  setSelectedDate,
19
22
  fromPrice,
20
- getAvailability,
21
- includeAvailability,
22
- shouldCalculateResources,
23
- availableTimes,
23
+ getDateTimeButtonProps,
24
24
  }: CalendarDatesProps) => {
25
25
  const fillCalendarDates = useMemo(() => {
26
26
  let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
@@ -46,8 +46,9 @@ export const CalendarDates = ({
46
46
  {fillCalendarDates.map((date: DateTime | null) => {
47
47
  if (date === null) return <div />;
48
48
 
49
- const isDisabled =
50
- isLoading || isDateDisabled(date, disabledDates, availableTimes);
49
+ const props = getDateTimeButtonProps(date);
50
+
51
+ const isDisabled = isLoading || props.isDisabled;
51
52
 
52
53
  return (
53
54
  <DateTimeButton
@@ -59,10 +60,8 @@ export const CalendarDates = ({
59
60
  date={date}
60
61
  onSelect={() => setSelectedDate(date)}
61
62
  price={fromPrice}
62
- resources={getAvailability?.(date)}
63
- showResources={includeAvailability}
64
63
  variant={Variant.month}
65
- shouldCalculateResources={shouldCalculateResources}
64
+ {...props}
66
65
  />
67
66
  );
68
67
  })}
@@ -1,23 +1,4 @@
1
1
  import { DateTime, Interval } from "luxon";
2
- import isEqual from "lodash/isEqual";
3
- import { DATE_FORMAT } from "@licklist/core/dist/Config";
4
- import { AvailableTimes } from "../Calendar";
5
-
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())
13
- );
14
-
15
- const noAvailableTimes = availableTimes
16
- ? !availableTimes?.[date.toFormat(DATE_FORMAT)]
17
- : false;
18
-
19
- return disabledByDates || noAvailableTimes;
20
- };
21
2
 
22
3
  export const getMonthCalendarDates = (initialDate: DateTime): DateTime[] => {
23
4
  const startOfMonth = initialDate.startOf("month");
@@ -14,12 +14,12 @@ export enum Variant {
14
14
 
15
15
  export type DateTimeButtonProps = {
16
16
  date: DateTime;
17
- isSelected?: boolean;
18
- isDisabled?: boolean;
17
+ isSelected: boolean;
18
+ isDisabled: boolean;
19
19
  isSoldOut?: boolean;
20
20
  onSelect: (date: DateTime) => void;
21
21
  price?: string | number | ReactElement | null;
22
- resources: ZoneResourcesAvailability | null | undefined;
22
+ resources?: ZoneResourcesAvailability | null;
23
23
  showResources?: boolean;
24
24
  shouldCalculateResources?: boolean;
25
25
  variant: Variant;
@@ -1,9 +1,8 @@
1
- import React, { useMemo, useState, useRef, useEffect } from "react";
2
- import { DateTime, Interval } from "luxon";
1
+ import React, { useState, useRef, useEffect } from "react";
2
+ import { DateTime } from "luxon";
3
3
  import { Col, Form } from "react-bootstrap";
4
- import { Controller, RegisterOptions, useFormContext } from "react-hook-form";
4
+ import { Controller, useFormContext, useWatch } from "react-hook-form";
5
5
  import { useTranslation } from "react-i18next";
6
- import { useIntl } from "react-intl";
7
6
 
8
7
  import { useId } from "@react-aria/utils";
9
8
  import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
@@ -11,6 +10,7 @@ import HTMLInputDateElement from "../../types/static/HTMLInputDateElement";
11
10
  import { RecurrenceInput } from "../../recurrence-input";
12
11
  import { WarningMessage } from "../../static";
13
12
  import { ProductSetFormValues } from "../../product-set/form";
13
+ import { useFormattedDuration, useValidationOptions } from "./hooks";
14
14
 
15
15
  interface IntervalInputProps {
16
16
  editedProductSet?: ProductSetFormValues;
@@ -35,7 +35,6 @@ export function IntervalInput({
35
35
  const {
36
36
  register,
37
37
  formState: { errors },
38
- watch,
39
38
  control,
40
39
  trigger,
41
40
  setValue,
@@ -44,9 +43,9 @@ export function IntervalInput({
44
43
  const formattedDuration = useFormattedDuration();
45
44
  const validationOptions = useValidationOptions();
46
45
 
47
- const rrule = watch("rrule");
48
- const start = watch("start");
49
- const end = watch("end");
46
+ const rrule = useWatch({ control, name: "rrule" });
47
+ const start = useWatch({ control, name: "start" });
48
+ const end = useWatch({ control, name: "end" });
50
49
  const [recurrent, setRecurrent] = useState(Boolean(rrule));
51
50
  const [isOverriden, setIsOverriden] = useState(false);
52
51
  const recurrentId = useId();
@@ -123,6 +122,7 @@ export function IntervalInput({
123
122
  onChangeEndDate(nextEndtDate)
124
123
  }
125
124
  min={start}
125
+ required
126
126
  isInvalid={Boolean(errors.end)}
127
127
  onClick={() => endDateInput?.current?.showPicker()}
128
128
  ref={endDateInput}
@@ -180,75 +180,3 @@ export function IntervalInput({
180
180
  </>
181
181
  );
182
182
  }
183
-
184
- const useFormattedDuration = () => {
185
- const { watch } = useFormContext<IntervalInputValues>();
186
- const start = watch("start");
187
- const end = watch("end");
188
- const { formatList, formatNumber } = useIntl();
189
-
190
- return useMemo(() => {
191
- const interval = Interval.fromDateTimes(
192
- DateTime.fromISO(start),
193
- DateTime.fromISO(end)
194
- ).toDuration(["days", "hours", "minutes"]);
195
-
196
- if (!interval.isValid) return undefined;
197
-
198
- const formatUnit = (value: number, unit: string) =>
199
- formatNumber(value, { style: "unit", unit, unitDisplay: "long" });
200
-
201
- const units = (
202
- [
203
- [interval.days, "day"],
204
- [interval.hours, "hour"],
205
- [interval.minutes, "minute"],
206
- ] as Parameters<typeof formatUnit>[]
207
- ).filter(([value]) => value);
208
-
209
- return formatList(
210
- units.map((args) => formatUnit(...args)),
211
- { style: "long", type: "unit" }
212
- );
213
- // eslint-disable-next-line react-hooks/exhaustive-deps
214
- }, [start, end]);
215
- };
216
-
217
- const useValidationOptions = () => {
218
- const { watch } = useFormContext();
219
- const { t } = useTranslation(["Design", "Validation"]);
220
- const start = watch("start");
221
- const end = watch("end");
222
-
223
- return {
224
- start: useMemo<RegisterOptions>(
225
- () => ({
226
- required: t("Validation:fieldRequired", {
227
- attribute: t("start"),
228
- }) as string,
229
- // TODO: uncomment when event splitting is implemented
230
- // and extract into plugins
231
- validate: (value) =>
232
- DateTime.fromISO(value).diffNow().toMillis() > 0 ||
233
- (t("Validation:fieldValidEventStart") as string),
234
- }),
235
- // eslint-disable-next-line react-hooks/exhaustive-deps
236
- []
237
- ),
238
-
239
- end: useMemo<RegisterOptions>(
240
- () => ({
241
- // TODO: uncomment when event splitting is implemented
242
- // and extract into plugins
243
- validate: (value) =>
244
- // endAt not required
245
- value
246
- ? DateTime.fromISO(value).diff(DateTime.fromISO(start)).toMillis() >
247
- 0 || (t("Validation:fieldValidEventEnd") as string)
248
- : true,
249
- }),
250
- // eslint-disable-next-line react-hooks/exhaustive-deps
251
- [start, end]
252
- ),
253
- };
254
- };
@@ -0,0 +1,2 @@
1
+ export * from "./useFormattedDuration";
2
+ export * from "./useValidationOptions";
@@ -0,0 +1,40 @@
1
+ import { useMemo } from "react";
2
+ import { useFormContext, useWatch } from "react-hook-form";
3
+ import { useIntl } from "react-intl";
4
+ import { DateTime, Interval } from "luxon";
5
+ import { IntervalInputValues } from "../IntervalInput";
6
+
7
+ export const useFormattedDuration = () => {
8
+ const { control } = useFormContext<IntervalInputValues>();
9
+ const start = useWatch({ control, name: "start" });
10
+ const end = useWatch({ control, name: "end" });
11
+ const { formatList, formatNumber } = useIntl();
12
+
13
+ const duration = useMemo(() => {
14
+ const interval = Interval.fromDateTimes(
15
+ DateTime.fromISO(start),
16
+ DateTime.fromISO(end)
17
+ ).toDuration(["days", "hours", "minutes"]);
18
+
19
+ if (!interval.isValid) return undefined;
20
+
21
+ const formatUnit = (value: number, unit: string) =>
22
+ formatNumber(value, { style: "unit", unit, unitDisplay: "long" });
23
+
24
+ const units = (
25
+ [
26
+ [interval.days, "day"],
27
+ [interval.hours, "hour"],
28
+ [interval.minutes, "minute"],
29
+ ] as Parameters<typeof formatUnit>[]
30
+ ).filter(([value]) => value);
31
+
32
+ return formatList(
33
+ units.map((args) => formatUnit(...args)),
34
+ { style: "long", type: "unit" }
35
+ );
36
+ // eslint-disable-next-line react-hooks/exhaustive-deps
37
+ }, [start, end]);
38
+
39
+ return duration;
40
+ };
@@ -0,0 +1,36 @@
1
+ import { DateTime } from "luxon";
2
+ import { useFormContext, useWatch } from "react-hook-form";
3
+ import { useTranslation } from "react-i18next";
4
+
5
+ export const useValidationOptions = () => {
6
+ const { control } = useFormContext();
7
+ const { t } = useTranslation(["Design", "Validation"]);
8
+ const start = useWatch({ control, name: "start" });
9
+
10
+ return {
11
+ start: {
12
+ required: t("Validation:fieldRequired", {
13
+ attribute: t("start"),
14
+ }) as string,
15
+ // TODO: uncomment when event splitting is implemented
16
+ // and extract into plugins
17
+ validate: (value) =>
18
+ DateTime.fromISO(value).diffNow().toMillis() > 0 ||
19
+ (t("Validation:fieldValidEventStart") as string),
20
+ },
21
+
22
+ end: {
23
+ required: t("Validation:fieldRequired", {
24
+ attribute: t("end"),
25
+ }) as string,
26
+ // TODO: uncomment when event splitting is implemented
27
+ // and extract into plugins
28
+ validate: (value) =>
29
+ // endAt not required
30
+ value
31
+ ? DateTime.fromISO(value).diff(DateTime.fromISO(start)).toMillis() >
32
+ 0 || (t("Validation:fieldValidEventEnd") as string)
33
+ : true,
34
+ },
35
+ };
36
+ };
@@ -32,6 +32,9 @@ export const CategoryProduct = ({
32
32
  const { t } = useTranslation(["Design", "Validation"]);
33
33
  const { control, clearErrors, setError } = useFormContext();
34
34
 
35
+ const hasDeposits =
36
+ category.allowDeposits && product?.deposit < product.price;
37
+
35
38
  const productQuantityError = useMemo(() => {
36
39
  if (!productsWithErrors) {
37
40
  return undefined;
@@ -155,7 +158,7 @@ export const CategoryProduct = ({
155
158
  invalid={invalid}
156
159
  />
157
160
  </div>
158
- {category.allowDeposits && !category?.remainderExpireAfter && (
161
+ {hasDeposits && !category?.remainderExpireAfter && (
159
162
  <div className="mt-4">
160
163
  {t("Design:payNowAndUponArrival", {
161
164
  deposit: formatNumber(product?.deposit, {
@@ -170,7 +173,7 @@ export const CategoryProduct = ({
170
173
  </div>
171
174
  )}
172
175
 
173
- {category.allowDeposits && category?.remainderExpireAfter > 0 && (
176
+ {hasDeposits && category?.remainderExpireAfter > 0 && (
174
177
  <div className="mt-4">
175
178
  {t("Design:payNowAndReminderDays", {
176
179
  deposit: formatNumber(product?.deposit, {
@@ -53,7 +53,7 @@ export const ProductQuantityInput = ({
53
53
  id: product.id,
54
54
  name: product.name,
55
55
  deposit: product?.deposit,
56
- hasDeposit: category.allowDeposits,
56
+ hasDeposit: category.allowDeposits && product?.deposit < product.price,
57
57
  price: product.price,
58
58
  productCategoryId: category.id,
59
59
  zoneId: category.zone?.id,
@@ -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}`)}
@@ -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 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>
@@ -208,6 +208,9 @@ export function Preview({
208
208
  selectedDate={selectedDate}
209
209
  setSelectedDate={setSelectedDate}
210
210
  calendarDates={calendarDates}
211
+ getDateTimeButtonProps={() => ({
212
+ isDisabled: false,
213
+ })}
211
214
  />
212
215
  </SettingButton>
213
216
  </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">
@@ -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 ?? t("yes") },
26
+ { id: 1, value: firstValueTitle ?? t("yes") },
27
27
  { id: 0, value: secondValueTitle ?? t("no") },
28
28
  ];
29
29
 
@@ -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 {
@@ -175,8 +188,12 @@
175
188
  }
176
189
  }
177
190
 
178
- @include media-breakpoint-between(md, lg) {
179
- flex-wrap: nowrap;
191
+ @include media-breakpoint-down(xl) {
192
+ flex-wrap: wrap;
193
+
194
+ .apply-container {
195
+ margin-left: 4rem;
196
+ }
180
197
 
181
198
  .date-container {
182
199
  width: auto;
@@ -230,6 +247,11 @@
230
247
  transform: rotate(45deg);
231
248
  }
232
249
  }
250
+
251
+ @include media-breakpoint-down(sm) {
252
+ flex-direction: column;
253
+ justify-content: flex-start;
254
+ }
233
255
  }
234
256
  }
235
257
  }
@@ -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);