@eventlook/sdk 1.7.2-beta.0 → 1.7.2

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 (73) hide show
  1. package/.prettierignore +0 -3
  2. package/dist/cjs/{index-DmK9RPSa.js → index-D1KZ-2U1.js} +22463 -22979
  3. package/dist/cjs/index-D1KZ-2U1.js.map +1 -0
  4. package/dist/cjs/index.js +1 -3
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/{index.umd-DUMMTVwU.js → index.umd-C2KzR75H.js} +2 -2
  7. package/dist/cjs/{index.umd-DUMMTVwU.js.map → index.umd-C2KzR75H.js.map} +1 -1
  8. package/dist/cjs/{mui-tel-input.es-Dk9M_v4X.js → mui-tel-input.es-Bjml407E.js} +6 -6
  9. package/dist/{esm/mui-tel-input.es-Cb4Lpqx7.js.map → cjs/mui-tel-input.es-Bjml407E.js.map} +1 -1
  10. package/dist/esm/{index-C0HcmMMr.js → index-DRYwiFvp.js} +24559 -25057
  11. package/dist/esm/index-DRYwiFvp.js.map +1 -0
  12. package/dist/esm/index.js +1 -3
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/esm/{index.umd-BqJOlKvJ.js → index.umd-BXOC8cuK.js} +4 -4
  15. package/dist/esm/{index.umd-BqJOlKvJ.js.map → index.umd-BXOC8cuK.js.map} +1 -1
  16. package/dist/esm/{mui-tel-input.es-Cb4Lpqx7.js → mui-tel-input.es-Bt2rE3An.js} +21 -21
  17. package/dist/{cjs/mui-tel-input.es-Dk9M_v4X.js.map → esm/mui-tel-input.es-Bt2rE3An.js.map} +1 -1
  18. package/dist/types/locales/cs.d.ts +0 -31
  19. package/dist/types/locales/en.d.ts +0 -31
  20. package/dist/types/locales/es.d.ts +0 -31
  21. package/dist/types/locales/pl.d.ts +0 -31
  22. package/dist/types/locales/sk.d.ts +0 -31
  23. package/dist/types/locales/uk.d.ts +0 -31
  24. package/dist/types/utils/data/ticket.d.ts +1 -0
  25. package/dist/types/utils/types/global.type.d.ts +0 -1
  26. package/dist/types/utils/types/order.type.d.ts +0 -2
  27. package/package.json +1 -3
  28. package/src/form/ChildEventCard.tsx +70 -64
  29. package/src/form/PaymentSuccess.tsx +2 -6
  30. package/src/form/TicketForm.tsx +1 -7
  31. package/src/form/tickets/ReleaseWithMerchandise.tsx +7 -6
  32. package/src/form/tickets/TicketSelection.tsx +7 -6
  33. package/src/form/tickets/TicketSelectionMap.tsx +2 -2
  34. package/src/form/tickets/TicketSelectionMobile.tsx +4 -3
  35. package/src/form/tickets/TicketWithMerchandiseSelection.tsx +5 -4
  36. package/src/locales/cs.tsx +0 -37
  37. package/src/locales/en.tsx +0 -35
  38. package/src/locales/es.tsx +0 -36
  39. package/src/locales/pl.tsx +0 -35
  40. package/src/locales/sk.tsx +0 -37
  41. package/src/locales/uk.tsx +0 -35
  42. package/src/utils/data/ticket.ts +10 -0
  43. package/src/utils/types/global.type.ts +0 -1
  44. package/src/utils/types/order.type.ts +0 -2
  45. package/CLAUDE.md +0 -33
  46. package/dist/cjs/index-DmK9RPSa.js.map +0 -1
  47. package/dist/esm/index-C0HcmMMr.js.map +0 -1
  48. package/dist/types/form/paydroid/PaydroidCashlessSection.d.ts +0 -7
  49. package/dist/types/form/paydroid/PaydroidError.d.ts +0 -3
  50. package/dist/types/form/paydroid/PaydroidErrorAccount.d.ts +0 -3
  51. package/dist/types/form/paydroid/PaydroidErrorTicket.d.ts +0 -3
  52. package/dist/types/form/paydroid/PaydroidPage.d.ts +0 -6
  53. package/dist/types/form/paydroid/PaydroidStatusCard.d.ts +0 -10
  54. package/dist/types/form/paydroid/PaydroidSuccess.d.ts +0 -3
  55. package/dist/types/form/paydroid/PaydroidSuccessTopup.d.ts +0 -3
  56. package/dist/types/modules/paydroid.d.ts +0 -4
  57. package/dist/types/utils/data/page.d.ts +0 -7
  58. package/dist/types/utils/page.d.ts +0 -1
  59. package/dist/types/utils/paydroid.d.ts +0 -6
  60. package/dist/types/utils/types/paydroid.d.ts +0 -23
  61. package/src/form/paydroid/PaydroidCashlessSection.tsx +0 -311
  62. package/src/form/paydroid/PaydroidError.tsx +0 -26
  63. package/src/form/paydroid/PaydroidErrorAccount.tsx +0 -26
  64. package/src/form/paydroid/PaydroidErrorTicket.tsx +0 -26
  65. package/src/form/paydroid/PaydroidPage.tsx +0 -22
  66. package/src/form/paydroid/PaydroidStatusCard.tsx +0 -91
  67. package/src/form/paydroid/PaydroidSuccess.tsx +0 -26
  68. package/src/form/paydroid/PaydroidSuccessTopup.tsx +0 -26
  69. package/src/modules/paydroid.ts +0 -33
  70. package/src/utils/data/page.ts +0 -7
  71. package/src/utils/page.ts +0 -4
  72. package/src/utils/paydroid.ts +0 -35
  73. package/src/utils/types/paydroid.ts +0 -26
@@ -62,7 +62,6 @@ declare const cs: {
62
62
  primary_ticket_number_hint: string;
63
63
  primary_ticket_dialog_title: string;
64
64
  primary_ticket_dialog_input_label: string;
65
- amount: string;
66
65
  };
67
66
  validation: {
68
67
  required: string;
@@ -168,36 +167,6 @@ declare const cs: {
168
167
  button: string;
169
168
  products: string;
170
169
  };
171
- paydroid: {
172
- label: string;
173
- heading: string;
174
- heading_cta: string;
175
- subtitle: string;
176
- amount_label: string;
177
- amount_placeholder: string;
178
- promo: string;
179
- terms_prefix: string;
180
- terms_conditions: string;
181
- terms_middle: string;
182
- terms_privacy: string;
183
- terms: string;
184
- skip: string;
185
- submit: string;
186
- success_title: string;
187
- success_subtitle: string;
188
- topup_success_title: string;
189
- topup_success_subtitle: string;
190
- error_title: string;
191
- error_subtitle: string;
192
- error_account_title: string;
193
- error_account_subtitle: string;
194
- error_account_button: string;
195
- error_ticket_title: string;
196
- error_ticket_subtitle: string;
197
- faq_button: string;
198
- retry_button: string;
199
- missing_api_key: string;
200
- };
201
170
  unpaid: string;
202
171
  unpaid_description: string;
203
172
  };
@@ -62,7 +62,6 @@ declare const en: {
62
62
  primary_ticket_number_hint: string;
63
63
  primary_ticket_dialog_title: string;
64
64
  primary_ticket_dialog_input_label: string;
65
- amount: string;
66
65
  };
67
66
  validation: {
68
67
  required: string;
@@ -168,36 +167,6 @@ declare const en: {
168
167
  button: string;
169
168
  products: string;
170
169
  };
171
- paydroid: {
172
- label: string;
173
- heading: string;
174
- heading_cta: string;
175
- subtitle: string;
176
- amount_label: string;
177
- amount_placeholder: string;
178
- promo: string;
179
- terms_prefix: string;
180
- terms_conditions: string;
181
- terms_middle: string;
182
- terms_privacy: string;
183
- terms: string;
184
- skip: string;
185
- submit: string;
186
- success_title: string;
187
- success_subtitle: string;
188
- topup_success_title: string;
189
- topup_success_subtitle: string;
190
- error_title: string;
191
- error_subtitle: string;
192
- error_account_title: string;
193
- error_account_subtitle: string;
194
- error_account_button: string;
195
- error_ticket_title: string;
196
- error_ticket_subtitle: string;
197
- faq_button: string;
198
- retry_button: string;
199
- missing_api_key: string;
200
- };
201
170
  unpaid: string;
202
171
  unpaid_description: string;
203
172
  };
@@ -62,7 +62,6 @@ declare const es: {
62
62
  primary_ticket_number_hint: string;
63
63
  primary_ticket_dialog_title: string;
64
64
  primary_ticket_dialog_input_label: string;
65
- amount: string;
66
65
  };
67
66
  validation: {
68
67
  required: string;
@@ -168,36 +167,6 @@ declare const es: {
168
167
  button: string;
169
168
  products: string;
170
169
  };
171
- paydroid: {
172
- label: string;
173
- heading: string;
174
- heading_cta: string;
175
- subtitle: string;
176
- amount_label: string;
177
- amount_placeholder: string;
178
- promo: string;
179
- terms_prefix: string;
180
- terms_conditions: string;
181
- terms_middle: string;
182
- terms_privacy: string;
183
- terms: string;
184
- skip: string;
185
- submit: string;
186
- success_title: string;
187
- success_subtitle: string;
188
- topup_success_title: string;
189
- topup_success_subtitle: string;
190
- error_title: string;
191
- error_subtitle: string;
192
- error_account_title: string;
193
- error_account_subtitle: string;
194
- error_account_button: string;
195
- error_ticket_title: string;
196
- error_ticket_subtitle: string;
197
- faq_button: string;
198
- retry_button: string;
199
- missing_api_key: string;
200
- };
201
170
  unpaid: string;
202
171
  unpaid_description: string;
203
172
  };
@@ -62,7 +62,6 @@ declare const pl: {
62
62
  primary_ticket_number_hint: string;
63
63
  primary_ticket_dialog_title: string;
64
64
  primary_ticket_dialog_input_label: string;
65
- amount: string;
66
65
  };
67
66
  validation: {
68
67
  required: string;
@@ -168,36 +167,6 @@ declare const pl: {
168
167
  button: string;
169
168
  products: string;
170
169
  };
171
- paydroid: {
172
- label: string;
173
- heading: string;
174
- heading_cta: string;
175
- subtitle: string;
176
- amount_label: string;
177
- amount_placeholder: string;
178
- promo: string;
179
- terms_prefix: string;
180
- terms_conditions: string;
181
- terms_middle: string;
182
- terms_privacy: string;
183
- terms: string;
184
- skip: string;
185
- submit: string;
186
- success_title: string;
187
- success_subtitle: string;
188
- topup_success_title: string;
189
- topup_success_subtitle: string;
190
- error_title: string;
191
- error_subtitle: string;
192
- error_account_title: string;
193
- error_account_subtitle: string;
194
- error_account_button: string;
195
- error_ticket_title: string;
196
- error_ticket_subtitle: string;
197
- faq_button: string;
198
- retry_button: string;
199
- missing_api_key: string;
200
- };
201
170
  unpaid: string;
202
171
  unpaid_description: string;
203
172
  };
@@ -62,7 +62,6 @@ declare const sk: {
62
62
  primary_ticket_number_hint: string;
63
63
  primary_ticket_dialog_title: string;
64
64
  primary_ticket_dialog_input_label: string;
65
- amount: string;
66
65
  };
67
66
  validation: {
68
67
  required: string;
@@ -168,36 +167,6 @@ declare const sk: {
168
167
  button: string;
169
168
  products: string;
170
169
  };
171
- paydroid: {
172
- label: string;
173
- heading: string;
174
- heading_cta: string;
175
- subtitle: string;
176
- amount_label: string;
177
- amount_placeholder: string;
178
- promo: string;
179
- terms_prefix: string;
180
- terms_conditions: string;
181
- terms_middle: string;
182
- terms_privacy: string;
183
- terms: string;
184
- skip: string;
185
- submit: string;
186
- success_title: string;
187
- success_subtitle: string;
188
- topup_success_title: string;
189
- topup_success_subtitle: string;
190
- error_title: string;
191
- error_subtitle: string;
192
- error_account_title: string;
193
- error_account_subtitle: string;
194
- error_account_button: string;
195
- error_ticket_title: string;
196
- error_ticket_subtitle: string;
197
- faq_button: string;
198
- retry_button: string;
199
- missing_api_key: string;
200
- };
201
170
  unpaid: string;
202
171
  unpaid_description: string;
203
172
  };
@@ -62,7 +62,6 @@ declare const uk: {
62
62
  primary_ticket_number_hint: string;
63
63
  primary_ticket_dialog_title: string;
64
64
  primary_ticket_dialog_input_label: string;
65
- amount: string;
66
65
  };
67
66
  validation: {
68
67
  required: string;
@@ -168,36 +167,6 @@ declare const uk: {
168
167
  button: string;
169
168
  products: string;
170
169
  };
171
- paydroid: {
172
- label: string;
173
- heading: string;
174
- heading_cta: string;
175
- subtitle: string;
176
- amount_label: string;
177
- amount_placeholder: string;
178
- promo: string;
179
- terms_prefix: string;
180
- terms_conditions: string;
181
- terms_middle: string;
182
- terms_privacy: string;
183
- terms: string;
184
- skip: string;
185
- submit: string;
186
- success_title: string;
187
- success_subtitle: string;
188
- topup_success_title: string;
189
- topup_success_subtitle: string;
190
- error_title: string;
191
- error_subtitle: string;
192
- error_account_title: string;
193
- error_account_subtitle: string;
194
- error_account_button: string;
195
- error_ticket_title: string;
196
- error_ticket_subtitle: string;
197
- faq_button: string;
198
- retry_button: string;
199
- missing_api_key: string;
200
- };
201
170
  unpaid: string;
202
171
  unpaid_description: string;
203
172
  };
@@ -1 +1,2 @@
1
1
  export declare const MAX_TICKETS_PER_ORDER = 10;
2
+ export declare const getMaxTicketsPerOrder: (eventId?: number) => number;
@@ -34,7 +34,6 @@ export interface IGlobalContextOptions {
34
34
  termsAndConditionsCompanies?: string[];
35
35
  autoscrollAfterViewChange?: boolean;
36
36
  hasGopayId?: boolean;
37
- paydroidApiKey?: string;
38
37
  }
39
38
  export interface IBase {
40
39
  id: number;
@@ -36,11 +36,9 @@ export interface IOrderPaid {
36
36
  orderNumber: number;
37
37
  tickets: IPaidTicket[];
38
38
  products: IPaidProduct[];
39
- customer: ICustomer;
40
39
  extraFee: number;
41
40
  currency: Currencies;
42
41
  promoCodes: IPromoCode[] | null;
43
- paydroidEventId: string | null;
44
42
  }
45
43
  export interface IAllowedPaymentMethod {
46
44
  enabledPaymentInstruments: IPaymentInstrument[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventlook/sdk",
3
- "version": "1.7.2-beta.0",
3
+ "version": "1.7.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -31,7 +31,6 @@
31
31
  "peerDependencies": {
32
32
  "@emotion/react": "^11.14.0",
33
33
  "@emotion/styled": "^11.14.1",
34
- "@mui/lab": "^7.0.0",
35
34
  "@mui/material": "^7.0.0",
36
35
  "@mui/x-date-pickers": "^8.0.0",
37
36
  "motion": "^12.12.1",
@@ -45,7 +44,6 @@
45
44
  "@hookform/resolvers": "^5.2.2",
46
45
  "@iconify/icons-carbon": "^1.2.20",
47
46
  "@iconify/react": "^6.0.2",
48
- "@mui/lab": "^7.0.0",
49
47
  "@mui/material": "^7.3.8",
50
48
  "@mui/system": "^7.3.9",
51
49
  "@mui/x-date-pickers": "^8.27.2",
@@ -40,31 +40,34 @@ const ChildEventCard: React.FC<Props> = ({ event }) => {
40
40
  return (
41
41
  <>
42
42
  <Card sx={{ p: 2 }}>
43
- <Grid container spacing={6} alignItems="stretch">
44
- {/* LEFT SIDE: Image + Button */}
45
- <Grid size={{ xs: 12, md: 6 }} sx={{ display: 'flex', flexDirection: 'column' }}>
46
- <Image src={event.image.url} alt={event.name} ratio="16/9" borderRadius={2} />
47
- <Button
48
- variant="contained"
49
- onClick={() => setOpenVariantDialog(true)}
50
- fullWidth
51
- startIcon={
52
- eventNotEmpty ? <Iconify icon="eva:edit-fill" /> : <Iconify icon="eva:plus-fill" />
53
- }
54
- sx={{ mt: 2 }}
55
- >
56
- {eventNotEmpty ? t('change') : t('add')}
57
- </Button>
58
- </Grid>
59
-
60
- {/* RIGHT SIDE: Info block with bottom aligned date + organizer */}
61
- <Grid
62
- size={{ xs: 12, md: 6 }}
63
- sx={{ display: 'flex', flexDirection: 'column', justifyContent: 'space-between' }}
64
- >
65
- <Stack spacing={2}>
66
- <Typography variant="h6">{event.name}</Typography>
43
+ <Stack spacing={2}>
44
+ <Typography variant="h6">{event.name}</Typography>
45
+ <Grid container spacing={6} alignItems="stretch">
46
+ {/* LEFT SIDE: Image + Button */}
47
+ <Grid size={{ xs: 12, md: 6 }} sx={{ display: 'flex', flexDirection: 'column' }}>
48
+ <Image src={event.image.url} alt={event.name} ratio="16/9" borderRadius={2} />
49
+ <Button
50
+ variant="contained"
51
+ onClick={() => setOpenVariantDialog(true)}
52
+ fullWidth
53
+ startIcon={
54
+ eventNotEmpty ? (
55
+ <Iconify icon="eva:edit-fill" />
56
+ ) : (
57
+ <Iconify icon="eva:plus-fill" />
58
+ )
59
+ }
60
+ sx={{ mt: 2 }}
61
+ >
62
+ {eventNotEmpty ? t('change') : t('add')}
63
+ </Button>
64
+ </Grid>
67
65
 
66
+ {/* RIGHT SIDE: Info block with bottom aligned date + organizer */}
67
+ <Grid
68
+ size={{ xs: 12, md: 6 }}
69
+ sx={{ display: 'flex', flexDirection: 'column', justifyContent: 'space-between' }}
70
+ >
68
71
  <TextIconLabel
69
72
  icon={
70
73
  <Iconify
@@ -75,48 +78,51 @@ const ChildEventCard: React.FC<Props> = ({ event }) => {
75
78
  value={<Box>{getPlaceAsString(event.place)}</Box>}
76
79
  sx={{ typography: 'body3', color: 'text.secondary', alignItems: 'flex-start' }}
77
80
  />
78
- </Stack>
79
81
 
80
- {/* Bottom: Date & Organizer */}
81
- <Stack
82
- direction={{ xs: 'column', sm: 'row', md: 'column', lg: 'row' }}
83
- spacing={2}
84
- p={2}
85
- divider={
86
- <Divider
87
- orientation={xs || md ? 'horizontal' : 'vertical'}
88
- flexItem
89
- sx={{ borderStyle: 'dashed' }}
90
- />
91
- }
92
- sx={{
93
- backgroundColor: (theme) => theme.palette.grey.A100,
94
- borderRadius: 1,
95
- }}
96
- >
97
- <Box width={{ sm: '50%', md: '100%', lg: '50%' }}>
98
- <TextIconLabel
99
- icon={<Iconify icon={calendarIcon} sx={{ minWidth: 20, height: 20, mr: 1 }} />}
100
- value={t('form.labels.start_date')}
101
- sx={{ color: 'text.secondary' }}
102
- />
103
- <Typography variant="body2" fontWeight={700}>
104
- {dayjs(event.startDate).format('DD.MM.YYYY HH:mm')}
105
- </Typography>
106
- </Box>
107
- <Box width={{ sm: '50%', md: '100%', lg: '50%' }}>
108
- <TextIconLabel
109
- icon={<Iconify icon={userIcon} sx={{ minWidth: 20, height: 20, mr: 1 }} />}
110
- value={t('form.labels.organizer')}
111
- sx={{ color: 'text.secondary' }}
112
- />
113
- <Typography variant="body2" fontWeight={700}>
114
- {event.company.displayName}
115
- </Typography>
116
- </Box>
117
- </Stack>
82
+ {/* Bottom: Date & Organizer */}
83
+ <Stack
84
+ direction={{ xs: 'column', sm: 'row', md: 'column', lg: 'row' }}
85
+ spacing={2}
86
+ p={2}
87
+ divider={
88
+ <Divider
89
+ orientation={xs || md ? 'horizontal' : 'vertical'}
90
+ flexItem
91
+ sx={{ borderStyle: 'dashed' }}
92
+ />
93
+ }
94
+ sx={{
95
+ backgroundColor: (theme) =>
96
+ theme.palette.mode === 'light'
97
+ ? theme.palette.grey[100]
98
+ : theme.palette.grey[900],
99
+ borderRadius: 1,
100
+ }}
101
+ >
102
+ <Box width={{ sm: '50%', md: '100%', lg: '50%' }}>
103
+ <TextIconLabel
104
+ icon={<Iconify icon={calendarIcon} sx={{ minWidth: 20, height: 20, mr: 1 }} />}
105
+ value={t('form.labels.start_date')}
106
+ sx={{ color: 'text.secondary' }}
107
+ />
108
+ <Typography variant="body2" fontWeight={700}>
109
+ {dayjs(event.startDate).format('DD.MM.YYYY HH:mm')}
110
+ </Typography>
111
+ </Box>
112
+ <Box width={{ sm: '50%', md: '100%', lg: '50%' }}>
113
+ <TextIconLabel
114
+ icon={<Iconify icon={userIcon} sx={{ minWidth: 20, height: 20, mr: 1 }} />}
115
+ value={t('form.labels.organizer')}
116
+ sx={{ color: 'text.secondary' }}
117
+ />
118
+ <Typography variant="body2" fontWeight={700}>
119
+ {event.company.displayName}
120
+ </Typography>
121
+ </Box>
122
+ </Stack>
123
+ </Grid>
118
124
  </Grid>
119
- </Grid>
125
+ </Stack>
120
126
  </Card>
121
127
 
122
128
  <ChildEventDialog
@@ -1,6 +1,5 @@
1
1
  import { Iconify, Image, MotionContainer, varBounce } from '@components';
2
2
  import { Box, Button, Card, Grid, LinearProgress, Link, Typography } from '@mui/material';
3
- import PaydroidCashlessSection from '@form/paydroid/PaydroidCashlessSection';
4
3
  import React, { Dispatch, SetStateAction, useEffect, useState } from 'react';
5
4
  import { getSearchParamsInObject } from '@utils/url';
6
5
  import { postOrderPaid } from '@modules/order';
@@ -18,7 +17,6 @@ import useGlobal from '@hooks/useGlobal';
18
17
  import { Trans } from '@components/Trans';
19
18
  import { getGtmPurchasePaid, gtmPurchasePaid, mapUserToUserData } from '@utils/gtm';
20
19
  import { IPixels } from '@utils/types/gtm.type';
21
- import { IOrderPaid } from '@utils/types/order.type';
22
20
 
23
21
  interface Props {
24
22
  setIsPaying: Dispatch<SetStateAction<boolean>>;
@@ -33,7 +31,6 @@ const PaymentSuccess: React.FC<Props> = ({ setIsPaying, isIframe, pixels }) => {
33
31
  const errorState = 'ERROR';
34
32
  const [tickets, setTickets] = useState<IPaidTicket[]>([]);
35
33
  const [products, setProducts] = useState<IPaidProduct[]>([]);
36
- const [data, setData] = useState<IOrderPaid | null>(null);
37
34
  const [state, setState] = useState<string>(defaultState);
38
35
  const [title, setTitle] = useState<string>(t('event.tickets.payment_success.loading'));
39
36
  const [description, setDescription] = useState<string | null>(null);
@@ -53,12 +50,12 @@ const PaymentSuccess: React.FC<Props> = ({ setIsPaying, isIframe, pixels }) => {
53
50
  const { data } = await postOrderPaid({
54
51
  gopayId: Number(paymentId),
55
52
  });
56
- const { tickets, products } = data;
53
+ const { tickets } = data;
57
54
  setTickets(tickets);
55
+ const { products } = data;
58
56
  setProducts(products);
59
57
  setState(data.state);
60
58
  setGwUrl(data.gwUrl);
61
- setData(data);
62
59
 
63
60
  const items = [
64
61
  ...data.tickets.map((ticket) => ({
@@ -332,7 +329,6 @@ const PaymentSuccess: React.FC<Props> = ({ setIsPaying, isIframe, pixels }) => {
332
329
  </Grid>
333
330
  </>
334
331
  )}
335
- {data?.paydroidEventId && <PaydroidCashlessSection data={data} />}
336
332
  {!isIframe && (
337
333
  <Box textAlign="center">
338
334
  <CustomButton
@@ -61,8 +61,6 @@ import TicketSelectionMap from '@form/tickets/TicketSelectionMap';
61
61
  import PaymentOverviewDrawer from './PaymentOverviewDrawer';
62
62
  import { getPlaceAsString } from '@utils/place';
63
63
  import Services from '@form/services';
64
- import PaydroidPage from './paydroid/PaydroidPage';
65
- import { isPaydroidPage } from '@utils/page';
66
64
 
67
65
  interface Props {
68
66
  event: IEvent;
@@ -104,7 +102,6 @@ const TicketForm: React.FC<Props> = ({
104
102
  const { data: eventProducts, isLoading } = useActiveEventProducts(event.id);
105
103
  const [paymentRedirect, setPaymentRedirect] = useState<string | null>(null);
106
104
  const [hasGopayId, setHasGopayId] = useState<boolean>(hasGopayIdSsr);
107
- const [page, setPage] = useState<string | null>(null);
108
105
  const [isPaying, setIsPaying] = useState<boolean>(false);
109
106
  const [formStep, setFormStep] = useState<number>(1);
110
107
  const [isPaymentOverviewDrawerOpen, setIsPaymentOverviewDrawerOpen] = useState<boolean>(false);
@@ -516,7 +513,6 @@ const TicketForm: React.FC<Props> = ({
516
513
  const paymentId = searchParams.id;
517
514
  const iframeCampaignId = Number(searchParams.iframeCampaignId);
518
515
  setHasGopayId(!!paymentId);
519
- setPage(searchParams.page || null);
520
516
  if (!isNaN(iframeCampaignId)) {
521
517
  methods.setValue('iframeCampaignId', iframeCampaignId);
522
518
  }
@@ -563,9 +559,7 @@ const TicketForm: React.FC<Props> = ({
563
559
 
564
560
  return (
565
561
  <Box id={EVENTLOOK_ORDER_FORM_CONTAINER_ID}>
566
- {isPaydroidPage(page) ? (
567
- <PaydroidPage page={page} />
568
- ) : hasGopayId ? (
562
+ {hasGopayId ? (
569
563
  <PaymentSuccess setIsPaying={setIsPaying} isIframe={isIframe} pixels={pixels} />
570
564
  ) : isPaying ? (
571
565
  <PaymentPending />
@@ -9,7 +9,7 @@ import { useFormContext, useWatch } from 'react-hook-form';
9
9
  import { IEventProductForm } from '@utils/types/product.type';
10
10
  import { fCurrency } from '@utils/formatNumber';
11
11
  import { Currencies } from '@utils/data/currency';
12
- import { MAX_TICKETS_PER_ORDER } from '@utils/data/ticket';
12
+ import { getMaxTicketsPerOrder } from '@utils/data/ticket';
13
13
  import { getSelectedQuantityByVariant } from '@utils/product';
14
14
  import ReleaseExtraFields from '@form/extra-field/ReleaseExtraFields';
15
15
  import ReleaseDescription from '@form/tickets/ReleaseDescription';
@@ -32,6 +32,7 @@ const ReleaseWithMerchandise: React.FC<Props> = ({
32
32
  index,
33
33
  }) => {
34
34
  const { t, lang } = useGlobal();
35
+ const maxTicketsPerOrder = getMaxTicketsPerOrder(eventId);
35
36
  const [openVariantDialog, setOpenVariantDialog] = useState<'add' | 'increase' | null>(null);
36
37
  const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);
37
38
  const [primaryDialogMode, setPrimaryDialogMode] = useState<'add' | 'increase' | null>(null);
@@ -60,7 +61,7 @@ const ReleaseWithMerchandise: React.FC<Props> = ({
60
61
  const getAvailableTicketsForRelease = (release: ITicketFormTicket): number => {
61
62
  const selectedRelease = activeReleases?.find((item) => item.id === release.releaseId);
62
63
  const availableQuantity = selectedRelease ? selectedRelease.availableTickets : 0;
63
- return availableQuantity > MAX_TICKETS_PER_ORDER ? MAX_TICKETS_PER_ORDER : availableQuantity;
64
+ return availableQuantity > maxTicketsPerOrder ? maxTicketsPerOrder : availableQuantity;
64
65
  };
65
66
 
66
67
  const isMaxQuantity = (releaseId: number) => {
@@ -79,8 +80,8 @@ const ReleaseWithMerchandise: React.FC<Props> = ({
79
80
  ? [productsToAdd]
80
81
  : [];
81
82
  const requestedQuantity = normalizedProducts.length ? normalizedProducts.length : 1;
82
- const releaseMaxQuantity = Math.min(release.availableTickets || 0, MAX_TICKETS_PER_ORDER);
83
- const remainingOrderCapacity = Math.max(0, MAX_TICKETS_PER_ORDER - countSelectedTickets());
83
+ const releaseMaxQuantity = Math.min(release.availableTickets || 0, maxTicketsPerOrder);
84
+ const remainingOrderCapacity = Math.max(0, maxTicketsPerOrder - countSelectedTickets());
84
85
  const quantity = Math.min(requestedQuantity, releaseMaxQuantity, remainingOrderCapacity);
85
86
 
86
87
  if (quantity <= 0) {
@@ -123,7 +124,7 @@ const ReleaseWithMerchandise: React.FC<Props> = ({
123
124
  if (addedRelease) {
124
125
  const increment = normalizedProducts.length ? normalizedProducts.length : 1;
125
126
  const maxQuantity = getAvailableTicketsForRelease(addedRelease);
126
- const remainingOrderCapacity = Math.max(0, MAX_TICKETS_PER_ORDER - countSelectedTickets());
127
+ const remainingOrderCapacity = Math.max(0, maxTicketsPerOrder - countSelectedTickets());
127
128
  const availableIncrement = Math.max(
128
129
  0,
129
130
  Math.min(increment, maxQuantity - Number(addedRelease.quantity), remainingOrderCapacity)
@@ -194,7 +195,7 @@ const ReleaseWithMerchandise: React.FC<Props> = ({
194
195
  }, [tickets, release.id, setValue]);
195
196
 
196
197
  const ticketIndex = tickets.findIndex((t) => t.releaseId === release.id);
197
- const remainingOrderCapacity = Math.max(0, MAX_TICKETS_PER_ORDER - countSelectedTickets());
198
+ const remainingOrderCapacity = Math.max(0, maxTicketsPerOrder - countSelectedTickets());
198
199
  const nextRelease = activeReleases?.find(
199
200
  (item) =>
200
201
  item.releaseCategoryName === release.releaseCategoryName && item.order === release.order + 1