@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.
- package/.prettierignore +0 -3
- package/dist/cjs/{index-DmK9RPSa.js → index-D1KZ-2U1.js} +22463 -22979
- package/dist/cjs/index-D1KZ-2U1.js.map +1 -0
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{index.umd-DUMMTVwU.js → index.umd-C2KzR75H.js} +2 -2
- package/dist/cjs/{index.umd-DUMMTVwU.js.map → index.umd-C2KzR75H.js.map} +1 -1
- package/dist/cjs/{mui-tel-input.es-Dk9M_v4X.js → mui-tel-input.es-Bjml407E.js} +6 -6
- package/dist/{esm/mui-tel-input.es-Cb4Lpqx7.js.map → cjs/mui-tel-input.es-Bjml407E.js.map} +1 -1
- package/dist/esm/{index-C0HcmMMr.js → index-DRYwiFvp.js} +24559 -25057
- package/dist/esm/index-DRYwiFvp.js.map +1 -0
- package/dist/esm/index.js +1 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{index.umd-BqJOlKvJ.js → index.umd-BXOC8cuK.js} +4 -4
- package/dist/esm/{index.umd-BqJOlKvJ.js.map → index.umd-BXOC8cuK.js.map} +1 -1
- package/dist/esm/{mui-tel-input.es-Cb4Lpqx7.js → mui-tel-input.es-Bt2rE3An.js} +21 -21
- package/dist/{cjs/mui-tel-input.es-Dk9M_v4X.js.map → esm/mui-tel-input.es-Bt2rE3An.js.map} +1 -1
- package/dist/types/locales/cs.d.ts +0 -31
- package/dist/types/locales/en.d.ts +0 -31
- package/dist/types/locales/es.d.ts +0 -31
- package/dist/types/locales/pl.d.ts +0 -31
- package/dist/types/locales/sk.d.ts +0 -31
- package/dist/types/locales/uk.d.ts +0 -31
- package/dist/types/utils/data/ticket.d.ts +1 -0
- package/dist/types/utils/types/global.type.d.ts +0 -1
- package/dist/types/utils/types/order.type.d.ts +0 -2
- package/package.json +1 -3
- package/src/form/ChildEventCard.tsx +70 -64
- package/src/form/PaymentSuccess.tsx +2 -6
- package/src/form/TicketForm.tsx +1 -7
- package/src/form/tickets/ReleaseWithMerchandise.tsx +7 -6
- package/src/form/tickets/TicketSelection.tsx +7 -6
- package/src/form/tickets/TicketSelectionMap.tsx +2 -2
- package/src/form/tickets/TicketSelectionMobile.tsx +4 -3
- package/src/form/tickets/TicketWithMerchandiseSelection.tsx +5 -4
- package/src/locales/cs.tsx +0 -37
- package/src/locales/en.tsx +0 -35
- package/src/locales/es.tsx +0 -36
- package/src/locales/pl.tsx +0 -35
- package/src/locales/sk.tsx +0 -37
- package/src/locales/uk.tsx +0 -35
- package/src/utils/data/ticket.ts +10 -0
- package/src/utils/types/global.type.ts +0 -1
- package/src/utils/types/order.type.ts +0 -2
- package/CLAUDE.md +0 -33
- package/dist/cjs/index-DmK9RPSa.js.map +0 -1
- package/dist/esm/index-C0HcmMMr.js.map +0 -1
- package/dist/types/form/paydroid/PaydroidCashlessSection.d.ts +0 -7
- package/dist/types/form/paydroid/PaydroidError.d.ts +0 -3
- package/dist/types/form/paydroid/PaydroidErrorAccount.d.ts +0 -3
- package/dist/types/form/paydroid/PaydroidErrorTicket.d.ts +0 -3
- package/dist/types/form/paydroid/PaydroidPage.d.ts +0 -6
- package/dist/types/form/paydroid/PaydroidStatusCard.d.ts +0 -10
- package/dist/types/form/paydroid/PaydroidSuccess.d.ts +0 -3
- package/dist/types/form/paydroid/PaydroidSuccessTopup.d.ts +0 -3
- package/dist/types/modules/paydroid.d.ts +0 -4
- package/dist/types/utils/data/page.d.ts +0 -7
- package/dist/types/utils/page.d.ts +0 -1
- package/dist/types/utils/paydroid.d.ts +0 -6
- package/dist/types/utils/types/paydroid.d.ts +0 -23
- package/src/form/paydroid/PaydroidCashlessSection.tsx +0 -311
- package/src/form/paydroid/PaydroidError.tsx +0 -26
- package/src/form/paydroid/PaydroidErrorAccount.tsx +0 -26
- package/src/form/paydroid/PaydroidErrorTicket.tsx +0 -26
- package/src/form/paydroid/PaydroidPage.tsx +0 -22
- package/src/form/paydroid/PaydroidStatusCard.tsx +0 -91
- package/src/form/paydroid/PaydroidSuccess.tsx +0 -26
- package/src/form/paydroid/PaydroidSuccessTopup.tsx +0 -26
- package/src/modules/paydroid.ts +0 -33
- package/src/utils/data/page.ts +0 -7
- package/src/utils/page.ts +0 -4
- package/src/utils/paydroid.ts +0 -35
- package/src/utils/types/paydroid.ts +0 -26
|
@@ -9,7 +9,7 @@ import { IEvent } from '@utils/types/event.type';
|
|
|
9
9
|
import useResponsive from '@hooks/useResponsive';
|
|
10
10
|
import ReleaseExtraFields from '@form/extra-field/ReleaseExtraFields';
|
|
11
11
|
import { EventType } from '@utils/data/event';
|
|
12
|
-
import {
|
|
12
|
+
import { getMaxTicketsPerOrder } from '@utils/data/ticket';
|
|
13
13
|
import useGlobal from '@hooks/useGlobal';
|
|
14
14
|
import TicketSelectionMobile from './TicketSelectionMobile';
|
|
15
15
|
|
|
@@ -19,6 +19,7 @@ interface Props {
|
|
|
19
19
|
|
|
20
20
|
const TicketSelection: React.FC<Props> = ({ event }) => {
|
|
21
21
|
const { t } = useGlobal();
|
|
22
|
+
const maxTicketsPerOrder = getMaxTicketsPerOrder(event.id);
|
|
22
23
|
const isMobile = useResponsive('down', 'md');
|
|
23
24
|
const { setValue, watch } = useFormContext<ITicketForm>();
|
|
24
25
|
const tickets = useWatch({
|
|
@@ -83,7 +84,7 @@ const TicketSelection: React.FC<Props> = ({ event }) => {
|
|
|
83
84
|
item2.releaseCategoryName === item.releaseCategoryName && item2.order === item.order + 1
|
|
84
85
|
);
|
|
85
86
|
const selected = tickets.find((ticket) => ticket.releaseId === item.id);
|
|
86
|
-
const maxSelectable = Math.min(item.availableTickets || 0,
|
|
87
|
+
const maxSelectable = Math.min(item.availableTickets || 0, maxTicketsPerOrder);
|
|
87
88
|
|
|
88
89
|
return (
|
|
89
90
|
!!nextRelease &&
|
|
@@ -110,8 +111,8 @@ const TicketSelection: React.FC<Props> = ({ event }) => {
|
|
|
110
111
|
const isQuantityDisabled = (value: number, releaseId: number | '') => {
|
|
111
112
|
const releaseSelected = tickets.find((item) => item.releaseId === releaseId);
|
|
112
113
|
return releaseSelected && releaseSelected.quantity
|
|
113
|
-
? countSelectedTickets() + value - releaseSelected.quantity >
|
|
114
|
-
: countSelectedTickets() + value >
|
|
114
|
+
? countSelectedTickets() + value - releaseSelected.quantity > maxTicketsPerOrder
|
|
115
|
+
: countSelectedTickets() + value > maxTicketsPerOrder;
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
const removeTicket = (indexToRemove: number) => {
|
|
@@ -128,7 +129,7 @@ const TicketSelection: React.FC<Props> = ({ event }) => {
|
|
|
128
129
|
tickets.find(
|
|
129
130
|
(ticket) =>
|
|
130
131
|
release.id === ticket.releaseId &&
|
|
131
|
-
Number(ticket.quantity) >= Math.min(release.availableTickets || 0,
|
|
132
|
+
Number(ticket.quantity) >= Math.min(release.availableTickets || 0, maxTicketsPerOrder)
|
|
132
133
|
)
|
|
133
134
|
);
|
|
134
135
|
|
|
@@ -146,7 +147,7 @@ const TicketSelection: React.FC<Props> = ({ event }) => {
|
|
|
146
147
|
const previousTicket = tickets.find((ticket) => ticket.releaseId === previousRelease.id);
|
|
147
148
|
const previousMaxSelectable = Math.min(
|
|
148
149
|
previousRelease.availableTickets || 0,
|
|
149
|
-
|
|
150
|
+
maxTicketsPerOrder
|
|
150
151
|
);
|
|
151
152
|
const shouldUnlock = Number(previousTicket?.quantity || 0) >= previousMaxSelectable;
|
|
152
153
|
|
|
@@ -5,7 +5,7 @@ import { Button } from '@mui/material';
|
|
|
5
5
|
import { iframe, TicketSelection } from '@seat-picker/seat-picker-sdk';
|
|
6
6
|
import { useFormContext } from 'react-hook-form';
|
|
7
7
|
import { ITicketForm, ITicketFormTicket, ITicketLocation } from '@utils/types/ticket.type';
|
|
8
|
-
import {
|
|
8
|
+
import { getMaxTicketsPerOrder } from '@utils/data/ticket';
|
|
9
9
|
import Iconify from '@components/iconify/Iconify';
|
|
10
10
|
|
|
11
11
|
interface Props {
|
|
@@ -44,7 +44,7 @@ const TicketSelectionMap: React.FC<Props> = ({ event }) => {
|
|
|
44
44
|
[] as { quantity: number; seat: ITicketLocation; ticket: any }[]
|
|
45
45
|
);
|
|
46
46
|
|
|
47
|
-
let remainingTicketCapacity =
|
|
47
|
+
let remainingTicketCapacity = getMaxTicketsPerOrder(event.id);
|
|
48
48
|
|
|
49
49
|
for (const groupedSeat of groupedSeatsByZone) {
|
|
50
50
|
if (remainingTicketCapacity <= 0) break;
|
|
@@ -4,7 +4,7 @@ import { fCurrency } from '@utils/formatNumber';
|
|
|
4
4
|
import { IEvent } from '@utils/types/event.type';
|
|
5
5
|
import { IReleaseShort } from '@utils/types/release.type';
|
|
6
6
|
import { ITicketFormTicket } from '@utils/types/ticket.type';
|
|
7
|
-
import {
|
|
7
|
+
import { getMaxTicketsPerOrder } from '@utils/data/ticket';
|
|
8
8
|
import useGlobal from '@hooks/useGlobal';
|
|
9
9
|
import { validatePrimaryTicketNumber } from '@modules/ticket';
|
|
10
10
|
import ReleaseDescription from './ReleaseDescription';
|
|
@@ -33,6 +33,7 @@ const TicketSelectionMobile: React.FC<Props> = ({
|
|
|
33
33
|
getExtraFields,
|
|
34
34
|
}) => {
|
|
35
35
|
const { t, lang } = useGlobal();
|
|
36
|
+
const maxTicketsPerOrder = getMaxTicketsPerOrder(event.id);
|
|
36
37
|
const [expandedReleaseIds, setExpandedReleaseIds] = useState<Record<number, boolean>>({});
|
|
37
38
|
const [pendingPrimaryRelease, setPendingPrimaryRelease] = useState<IReleaseShort | null>(null);
|
|
38
39
|
const theme = useTheme();
|
|
@@ -53,7 +54,7 @@ const TicketSelectionMobile: React.FC<Props> = ({
|
|
|
53
54
|
!release.locked || getReleaseQuantity(release.id) > 0;
|
|
54
55
|
|
|
55
56
|
const incrementRelease = (release: IReleaseShort, primaryTicketNumber?: string) => {
|
|
56
|
-
const maxAvailable = Math.min(release.availableTickets || 0,
|
|
57
|
+
const maxAvailable = Math.min(release.availableTickets || 0, maxTicketsPerOrder);
|
|
57
58
|
const ticketIndex = getTicketIndexByRelease(release.id);
|
|
58
59
|
const currentQuantity = ticketIndex >= 0 ? Number(tickets[ticketIndex]?.quantity || 0) : 0;
|
|
59
60
|
const nextQuantity = Math.min(currentQuantity + 1, maxAvailable);
|
|
@@ -155,7 +156,7 @@ const TicketSelectionMobile: React.FC<Props> = ({
|
|
|
155
156
|
.map((release) => {
|
|
156
157
|
const quantity = getReleaseQuantity(release.id);
|
|
157
158
|
const ticketIndex = getTicketIndexByRelease(release.id);
|
|
158
|
-
const maxAvailable = Math.min(release.availableTickets || 0,
|
|
159
|
+
const maxAvailable = Math.min(release.availableTickets || 0, maxTicketsPerOrder);
|
|
159
160
|
const isLocked = release.locked;
|
|
160
161
|
const nextRelease = activeReleases?.find(
|
|
161
162
|
(item) =>
|
|
@@ -8,7 +8,7 @@ import { IReleaseShort } from '@utils/types/release.type';
|
|
|
8
8
|
import { IEvent } from '@utils/types/event.type';
|
|
9
9
|
import ReleaseWithMerchandise from '@form/tickets/ReleaseWithMerchandise';
|
|
10
10
|
import { EventType } from '@utils/data/event';
|
|
11
|
-
import {
|
|
11
|
+
import { getMaxTicketsPerOrder } from '@utils/data/ticket';
|
|
12
12
|
import useGlobal from '@hooks/useGlobal';
|
|
13
13
|
|
|
14
14
|
interface Props {
|
|
@@ -17,6 +17,7 @@ interface Props {
|
|
|
17
17
|
|
|
18
18
|
const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
|
|
19
19
|
const { t } = useGlobal();
|
|
20
|
+
const maxTicketsPerOrder = getMaxTicketsPerOrder(event.id);
|
|
20
21
|
const { setValue, watch } = useFormContext<ITicketForm>();
|
|
21
22
|
const tickets: ITicketFormTicket[] = useWatch({ name: `tickets.${event.id}`, defaultValue: [] });
|
|
22
23
|
const eventTimeslotId = watch('eventTimeslotId');
|
|
@@ -43,7 +44,7 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
|
|
|
43
44
|
item2.releaseCategoryName === item.releaseCategoryName && item2.order === item.order + 1
|
|
44
45
|
);
|
|
45
46
|
const selected = tickets.find((ticket) => ticket.releaseId === item.id);
|
|
46
|
-
const maxSelectable = Math.min(item.availableTickets || 0,
|
|
47
|
+
const maxSelectable = Math.min(item.availableTickets || 0, maxTicketsPerOrder);
|
|
47
48
|
|
|
48
49
|
return (
|
|
49
50
|
!!nextRelease &&
|
|
@@ -69,7 +70,7 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
|
|
|
69
70
|
tickets.find(
|
|
70
71
|
(ticket) =>
|
|
71
72
|
release.id === ticket.releaseId &&
|
|
72
|
-
Number(ticket.quantity) >= Math.min(release.availableTickets || 0,
|
|
73
|
+
Number(ticket.quantity) >= Math.min(release.availableTickets || 0, maxTicketsPerOrder)
|
|
73
74
|
)
|
|
74
75
|
);
|
|
75
76
|
|
|
@@ -88,7 +89,7 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
|
|
|
88
89
|
const previousTicket = tickets.find((ticket) => ticket.releaseId === previousRelease.id);
|
|
89
90
|
const previousMaxSelectable = Math.min(
|
|
90
91
|
previousRelease.availableTickets || 0,
|
|
91
|
-
|
|
92
|
+
maxTicketsPerOrder
|
|
92
93
|
);
|
|
93
94
|
const shouldUnlock = Number(previousTicket?.quantity || 0) >= previousMaxSelectable;
|
|
94
95
|
|
package/src/locales/cs.tsx
CHANGED
|
@@ -64,7 +64,6 @@ const cs = {
|
|
|
64
64
|
'Tato kategorie je doplňková — zadejte číslo již zakoupené vstupenky.',
|
|
65
65
|
primary_ticket_dialog_title: 'Zadejte číslo primární vstupenky',
|
|
66
66
|
primary_ticket_dialog_input_label: 'Číslo primární vstupenky',
|
|
67
|
-
amount: 'Částka',
|
|
68
67
|
},
|
|
69
68
|
validation: {
|
|
70
69
|
required: 'Toto pole je povinné.',
|
|
@@ -186,42 +185,6 @@ const cs = {
|
|
|
186
185
|
button: 'Stáhnout vstupenku',
|
|
187
186
|
products: 'Vaše produkty',
|
|
188
187
|
},
|
|
189
|
-
paydroid: {
|
|
190
|
-
label: 'Paydroid Cashless',
|
|
191
|
-
heading: 'Vyhněte se frontám!',
|
|
192
|
-
heading_cta: 'Přednabijte si',
|
|
193
|
-
subtitle:
|
|
194
|
-
'Na akci lze platit pouze bezhotovostně pomocí systému Paydroid Cashless. Přednabijte si částku teď a vyhněte se frontám!',
|
|
195
|
-
amount_label: 'Jakou částku chcete přednabít?',
|
|
196
|
-
amount_placeholder: 'Zadejte částku',
|
|
197
|
-
promo: 'Přednabijte si na akci částku vyšší než 1000 Kč a získejte pivo zdarma!',
|
|
198
|
-
terms_prefix: 'Souhlasím s',
|
|
199
|
-
terms_conditions: 'Obchodními podmínkami',
|
|
200
|
-
terms_middle: 'Paydroid Cashless a se',
|
|
201
|
-
terms_privacy: 'Zásadami zpracování osobních údajů',
|
|
202
|
-
terms: 'Souhlas VOP a GDPR Paydroid Cashless',
|
|
203
|
-
skip: 'chci pouze vstupenku v aplikaci',
|
|
204
|
-
submit: 'přednabít',
|
|
205
|
-
success_title: 'Vstupenku jsme přidali k vašemu účtu',
|
|
206
|
-
success_subtitle:
|
|
207
|
-
'Teď už se stačí jen přihlásit do aplikace Paydroid Cashless. A pokud se budete chtít vyhnout frontám, přednabijte si v aplikaci!',
|
|
208
|
-
topup_success_title: 'Děkujeme za přednabitî!',
|
|
209
|
-
topup_success_subtitle:
|
|
210
|
-
'Právě jsme připsali kredit na Váš účet Paydroid Cashless, nyní už se stačí pouze přihlásit v aplikaci.',
|
|
211
|
-
error_title: 'Přednabití se nezdařilo',
|
|
212
|
-
error_subtitle:
|
|
213
|
-
'Nebyli jste nijak zpoplatněni, v případě jakýchkoliv problémů nás prosím kontaktujte.',
|
|
214
|
-
error_account_title: 'Nepodařilo se vytvořit účet',
|
|
215
|
-
error_account_subtitle:
|
|
216
|
-
'Pravděpodobně jste zadali údaje, které se liší se záznamem v naší databázi.',
|
|
217
|
-
error_account_button: 'přihlásit se do aplikace',
|
|
218
|
-
error_ticket_title: 'Přidání vstupenky se nezdařilo',
|
|
219
|
-
error_ticket_subtitle:
|
|
220
|
-
'Omlouváme se, vyzkoušejte to prosím později. V případě jakýchkoliv problémů nás prosím kontaktujte.',
|
|
221
|
-
faq_button: 'nejčastější dotazy',
|
|
222
|
-
retry_button: 'vyzkoušet znovu',
|
|
223
|
-
missing_api_key: 'Paydroid API klíč chybí',
|
|
224
|
-
},
|
|
225
188
|
unpaid: 'Platba neproběhla',
|
|
226
189
|
unpaid_description: 'Zkuste to prosím znovu kliknutím na tlačítko Zaplatit.',
|
|
227
190
|
},
|
package/src/locales/en.tsx
CHANGED
|
@@ -64,7 +64,6 @@ const en = {
|
|
|
64
64
|
'This is an addon category — enter the number of an already-purchased ticket.',
|
|
65
65
|
primary_ticket_dialog_title: 'Enter primary ticket number',
|
|
66
66
|
primary_ticket_dialog_input_label: 'Primary ticket number',
|
|
67
|
-
amount: 'Amount',
|
|
68
67
|
},
|
|
69
68
|
validation: {
|
|
70
69
|
required: 'This field is required.',
|
|
@@ -186,40 +185,6 @@ const en = {
|
|
|
186
185
|
button: 'Download ticket',
|
|
187
186
|
products: 'Your products',
|
|
188
187
|
},
|
|
189
|
-
paydroid: {
|
|
190
|
-
label: 'Paydroid Cashless',
|
|
191
|
-
heading: 'Skip the queues!',
|
|
192
|
-
heading_cta: 'Top up now',
|
|
193
|
-
subtitle:
|
|
194
|
-
'The event accepts only cashless payments via Paydroid Cashless. Top up your balance now and skip the queues!',
|
|
195
|
-
amount_label: 'How much would you like to top up?',
|
|
196
|
-
amount_placeholder: 'Enter amount',
|
|
197
|
-
promo: 'Top up more than 1000 CZK and get a free beer!',
|
|
198
|
-
terms_prefix: 'I agree to the',
|
|
199
|
-
terms_conditions: 'Terms and Conditions',
|
|
200
|
-
terms_middle: 'of Paydroid Cashless and the',
|
|
201
|
-
terms_privacy: 'Privacy Policy',
|
|
202
|
-
terms: 'I agree to the T&C and GDPR of Paydroid Cashless',
|
|
203
|
-
skip: 'I just want the ticket in the app',
|
|
204
|
-
submit: 'top up',
|
|
205
|
-
success_title: 'We added the ticket to your account',
|
|
206
|
-
success_subtitle:
|
|
207
|
-
'Just log in to the Paydroid Cashless app. And if you want to skip the queues, top up in the app!',
|
|
208
|
-
topup_success_title: 'Thank you for topping up!',
|
|
209
|
-
topup_success_subtitle:
|
|
210
|
-
'We have credited your Paydroid Cashless account. Just log in to the app.',
|
|
211
|
-
error_title: 'Top-up failed',
|
|
212
|
-
error_subtitle: 'You have not been charged. Please contact us if you have any issues.',
|
|
213
|
-
error_account_title: 'Failed to create account',
|
|
214
|
-
error_account_subtitle: 'You may have entered details that differ from our records.',
|
|
215
|
-
error_account_button: 'log in to the app',
|
|
216
|
-
error_ticket_title: 'Failed to add ticket',
|
|
217
|
-
error_ticket_subtitle:
|
|
218
|
-
'We are sorry, please try again later. Contact us if the issue persists.',
|
|
219
|
-
faq_button: 'frequently asked questions',
|
|
220
|
-
retry_button: 'try again',
|
|
221
|
-
missing_api_key: 'Paydroid API key is missing',
|
|
222
|
-
},
|
|
223
188
|
unpaid: 'The payment was not successful.',
|
|
224
189
|
unpaid_description: 'Please try again by clicking the Pay button.',
|
|
225
190
|
},
|
package/src/locales/es.tsx
CHANGED
|
@@ -64,7 +64,6 @@ const es = {
|
|
|
64
64
|
'Esta es una categoría complementaria — introduzca el número de una entrada ya comprada.',
|
|
65
65
|
primary_ticket_dialog_title: 'Introduzca el número de la entrada principal',
|
|
66
66
|
primary_ticket_dialog_input_label: 'Número de la entrada principal',
|
|
67
|
-
amount: 'Cantidad',
|
|
68
67
|
},
|
|
69
68
|
validation: {
|
|
70
69
|
required: 'Este campo es obligatorio.',
|
|
@@ -186,41 +185,6 @@ const es = {
|
|
|
186
185
|
button: 'Descargar entrada',
|
|
187
186
|
products: 'Tus productos',
|
|
188
187
|
},
|
|
189
|
-
paydroid: {
|
|
190
|
-
label: 'Paydroid Cashless',
|
|
191
|
-
heading: '¡Evita las colas!',
|
|
192
|
-
heading_cta: 'Recarga ahora',
|
|
193
|
-
subtitle:
|
|
194
|
-
'El evento solo acepta pagos sin efectivo a través de Paydroid Cashless. ¡Recarga tu saldo ahora y evita las colas!',
|
|
195
|
-
amount_label: '¿Cuánto deseas recargar?',
|
|
196
|
-
amount_placeholder: 'Ingresa el monto',
|
|
197
|
-
promo: '¡Recarga más de 1000 CZK y obtén una cerveza gratis!',
|
|
198
|
-
terms_prefix: 'Acepto los',
|
|
199
|
-
terms_conditions: 'Términos y condiciones',
|
|
200
|
-
terms_middle: 'de Paydroid Cashless y la',
|
|
201
|
-
terms_privacy: 'Política de privacidad',
|
|
202
|
-
terms: 'Acepto los T&C y GDPR de Paydroid Cashless',
|
|
203
|
-
skip: 'solo quiero la entrada en la app',
|
|
204
|
-
submit: 'recargar',
|
|
205
|
-
success_title: 'Añadimos la entrada a tu cuenta',
|
|
206
|
-
success_subtitle:
|
|
207
|
-
'Solo inicia sesión en la app Paydroid Cashless. ¡Y si quieres saltarte las colas, recarga en la app!',
|
|
208
|
-
topup_success_title: '¡Gracias por recargar!',
|
|
209
|
-
topup_success_subtitle:
|
|
210
|
-
'Hemos acreditado tu cuenta Paydroid Cashless. Solo inicia sesión en la app.',
|
|
211
|
-
error_title: 'La recarga falló',
|
|
212
|
-
error_subtitle: 'No se te ha cobrado nada. Contáctanos si tienes algún problema.',
|
|
213
|
-
error_account_title: 'No se pudo crear la cuenta',
|
|
214
|
-
error_account_subtitle:
|
|
215
|
-
'Es posible que hayas introducido datos diferentes a los de nuestros registros.',
|
|
216
|
-
error_account_button: 'iniciar sesión en la app',
|
|
217
|
-
error_ticket_title: 'No se pudo añadir la entrada',
|
|
218
|
-
error_ticket_subtitle:
|
|
219
|
-
'Lo sentimos, inténtalo más tarde. Contáctanos si el problema persiste.',
|
|
220
|
-
faq_button: 'preguntas frecuentes',
|
|
221
|
-
retry_button: 'intentar de nuevo',
|
|
222
|
-
missing_api_key: 'Falta la clave API de Paydroid',
|
|
223
|
-
},
|
|
224
188
|
unpaid: 'El pago no se realizó.',
|
|
225
189
|
unpaid_description: 'Por favor, inténtelo de nuevo haciendo clic en el botón Pagar.',
|
|
226
190
|
},
|
package/src/locales/pl.tsx
CHANGED
|
@@ -64,7 +64,6 @@ const pl = {
|
|
|
64
64
|
'To jest kategoria dodatkowa — wprowadź numer już zakupionego biletu.',
|
|
65
65
|
primary_ticket_dialog_title: 'Wprowadź numer biletu głównego',
|
|
66
66
|
primary_ticket_dialog_input_label: 'Numer biletu głównego',
|
|
67
|
-
amount: 'Kwota',
|
|
68
67
|
},
|
|
69
68
|
validation: {
|
|
70
69
|
required: 'To pole jest wymagane.',
|
|
@@ -185,40 +184,6 @@ const pl = {
|
|
|
185
184
|
button: 'Pobierz bilet',
|
|
186
185
|
products: 'Twoje produkty',
|
|
187
186
|
},
|
|
188
|
-
paydroid: {
|
|
189
|
-
label: 'Paydroid Cashless',
|
|
190
|
-
heading: 'Unikaj kolejek!',
|
|
191
|
-
heading_cta: 'Doładuj teraz',
|
|
192
|
-
subtitle:
|
|
193
|
-
'Na imprezie płatności są wyłącznie bezgotówkowe za pomocą systemu Paydroid Cashless. Doładuj konto teraz i unikaj kolejek!',
|
|
194
|
-
amount_label: 'Jaką kwotę chcesz doładować?',
|
|
195
|
-
amount_placeholder: 'Wpisz kwotę',
|
|
196
|
-
promo: 'Doładuj kwotę wyższą niż 1000 CZK i otrzymaj piwo gratis!',
|
|
197
|
-
terms_prefix: 'Zgadzam się z',
|
|
198
|
-
terms_conditions: 'Regulaminem',
|
|
199
|
-
terms_middle: 'Paydroid Cashless oraz z',
|
|
200
|
-
terms_privacy: 'Zasadami przetwarzania danych osobowych',
|
|
201
|
-
terms: 'Zgoda na regulamin i RODO Paydroid Cashless',
|
|
202
|
-
skip: 'chcę tylko bilet w aplikacji',
|
|
203
|
-
submit: 'doładuj',
|
|
204
|
-
success_title: 'Dodaliśmy bilet do Twojego konta',
|
|
205
|
-
success_subtitle:
|
|
206
|
-
'Zaloguj się do aplikacji Paydroid Cashless. Jeśli chcesz uniknąć kolejek, doładuj konto w aplikacji!',
|
|
207
|
-
topup_success_title: 'Dziękujemy za doładowanie!',
|
|
208
|
-
topup_success_subtitle:
|
|
209
|
-
'Właśnie dodaliśmy środki na Twoje konto Paydroid Cashless. Zaloguj się do aplikacji.',
|
|
210
|
-
error_title: 'Doładowanie nie powiodło się',
|
|
211
|
-
error_subtitle: 'Nie zostałeś obciążony. Skontaktuj się z nami w razie problemów.',
|
|
212
|
-
error_account_title: 'Nie udało się utworzyć konta',
|
|
213
|
-
error_account_subtitle: 'Prawdopodobnie podałeś dane różniące się od naszych zapisów.',
|
|
214
|
-
error_account_button: 'zaloguj się do aplikacji',
|
|
215
|
-
error_ticket_title: 'Nie udało się dodać biletu',
|
|
216
|
-
error_ticket_subtitle:
|
|
217
|
-
'Przepraszamy, spróbuj ponownie później. Skontaktuj się z nami jeśli problem się powtórzy.',
|
|
218
|
-
faq_button: 'najczęstsze pytania',
|
|
219
|
-
retry_button: 'spróbuj ponownie',
|
|
220
|
-
missing_api_key: 'Brak klucza API Paydroid',
|
|
221
|
-
},
|
|
222
187
|
unpaid: 'Płatność nie powiodła się.',
|
|
223
188
|
unpaid_description: 'Spróbuj ponownie, klikając przycisk Zapłać.',
|
|
224
189
|
},
|
package/src/locales/sk.tsx
CHANGED
|
@@ -64,7 +64,6 @@ const sk = {
|
|
|
64
64
|
'Táto kategória je doplnková — zadajte číslo už zakúpenej vstupenky.',
|
|
65
65
|
primary_ticket_dialog_title: 'Zadajte číslo primárnej vstupenky',
|
|
66
66
|
primary_ticket_dialog_input_label: 'Číslo primárnej vstupenky',
|
|
67
|
-
amount: 'Čiastka',
|
|
68
67
|
},
|
|
69
68
|
validation: {
|
|
70
69
|
required: 'Toto pole je povinné.',
|
|
@@ -186,42 +185,6 @@ const sk = {
|
|
|
186
185
|
button: 'Stiahnuť vstupenku',
|
|
187
186
|
products: 'Vaše produkty',
|
|
188
187
|
},
|
|
189
|
-
paydroid: {
|
|
190
|
-
label: 'Paydroid Cashless',
|
|
191
|
-
heading: 'Vyhnite sa radom!',
|
|
192
|
-
heading_cta: 'Prednabite si',
|
|
193
|
-
subtitle:
|
|
194
|
-
'Na akcii sa platí len bezhotovostne pomocou systému Paydroid Cashless. Prednabite si čiastku teraz a vyhnite sa radom!',
|
|
195
|
-
amount_label: 'Akú čiastku chcete prednabiť?',
|
|
196
|
-
amount_placeholder: 'Zadajte čiastku',
|
|
197
|
-
promo: 'Prednabite si na akciu čiastku vyššiu ako 1000 Kč a získajte pivo zadarmo!',
|
|
198
|
-
terms_prefix: 'Súhlasím s',
|
|
199
|
-
terms_conditions: 'Obchodnými podmienkami',
|
|
200
|
-
terms_middle: 'Paydroid Cashless a so',
|
|
201
|
-
terms_privacy: 'Zásadami spracovania osobných údajov',
|
|
202
|
-
terms: 'Súhlas VOP a GDPR Paydroid Cashless',
|
|
203
|
-
skip: 'chcem len vstupenku v aplikácii',
|
|
204
|
-
submit: 'prednabiť',
|
|
205
|
-
success_title: 'Vstupenku sme pridali k vášmu účtu',
|
|
206
|
-
success_subtitle:
|
|
207
|
-
'Stačí sa prihlásiť do aplikácie Paydroid Cashless. A ak sa chcete vyhnúť radom, prednabite si v aplikácii!',
|
|
208
|
-
topup_success_title: 'Ďakujeme za prednabitie!',
|
|
209
|
-
topup_success_subtitle:
|
|
210
|
-
'Práve sme pripísali kredit na Váš účet Paydroid Cashless, stačí sa prihlásiť v aplikácii.',
|
|
211
|
-
error_title: 'Prednabitie sa nepodarilo',
|
|
212
|
-
error_subtitle:
|
|
213
|
-
'Neboli ste nijako spoplatnení, v prípade akýchkoľvek problémov nás prosím kontaktujte.',
|
|
214
|
-
error_account_title: 'Nepodarilo sa vytvoriť účet',
|
|
215
|
-
error_account_subtitle:
|
|
216
|
-
'Pravdepodobne ste zadali údaje, ktoré sa líšia od záznamu v našej databáze.',
|
|
217
|
-
error_account_button: 'prihlásiť sa do aplikácie',
|
|
218
|
-
error_ticket_title: 'Pridanie vstupenky sa nepodarilo',
|
|
219
|
-
error_ticket_subtitle:
|
|
220
|
-
'Ospravedlňujeme sa, skúste to neskôr. V prípade problémov nás prosím kontaktujte.',
|
|
221
|
-
faq_button: 'najčastejšie otázky',
|
|
222
|
-
retry_button: 'skúsiť znova',
|
|
223
|
-
missing_api_key: 'Paydroid API kľúč chýba',
|
|
224
|
-
},
|
|
225
188
|
unpaid: 'Platba neprebehla.',
|
|
226
189
|
unpaid_description: 'Skúste to prosím znova kliknutím na tlačidlo Zaplatiť.',
|
|
227
190
|
},
|
package/src/locales/uk.tsx
CHANGED
|
@@ -63,7 +63,6 @@ const uk = {
|
|
|
63
63
|
primary_ticket_number_hint: 'Це додаткова категорія — введіть номер уже придбаного квитка.',
|
|
64
64
|
primary_ticket_dialog_title: 'Введіть номер основного квитка',
|
|
65
65
|
primary_ticket_dialog_input_label: 'Номер основного квитка',
|
|
66
|
-
amount: 'Сума',
|
|
67
66
|
},
|
|
68
67
|
validation: {
|
|
69
68
|
required: "Це поле обов'язкове.",
|
|
@@ -185,40 +184,6 @@ const uk = {
|
|
|
185
184
|
button: 'Завантажити квиток',
|
|
186
185
|
products: 'Ваші продукти',
|
|
187
186
|
},
|
|
188
|
-
paydroid: {
|
|
189
|
-
label: 'Paydroid Cashless',
|
|
190
|
-
heading: 'Уникайте черг!',
|
|
191
|
-
heading_cta: 'Поповніть баланс',
|
|
192
|
-
subtitle:
|
|
193
|
-
'На заході оплата виключно безготівкова за допомогою системи Paydroid Cashless. Поповніть баланс зараз і уникайте черг!',
|
|
194
|
-
amount_label: 'Яку суму ви хочете поповнити?',
|
|
195
|
-
amount_placeholder: 'Введіть суму',
|
|
196
|
-
promo: 'Поповніть суму понад 1000 CZK та отримайте пиво безкоштовно!',
|
|
197
|
-
terms_prefix: 'Я погоджуюсь з',
|
|
198
|
-
terms_conditions: 'Умовами використання',
|
|
199
|
-
terms_middle: 'Paydroid Cashless та із',
|
|
200
|
-
terms_privacy: 'Правилами обробки персональних даних',
|
|
201
|
-
terms: 'Згода з умовами та GDPR Paydroid Cashless',
|
|
202
|
-
skip: 'лише квиток у додатку',
|
|
203
|
-
submit: 'поповнити',
|
|
204
|
-
success_title: 'Ми додали квиток до вашого облікового запису',
|
|
205
|
-
success_subtitle:
|
|
206
|
-
'Просто увійдіть у додаток Paydroid Cashless. Якщо хочете уникнути черг — поповніть баланс у додатку!',
|
|
207
|
-
topup_success_title: 'Дякуємо за поповнення!',
|
|
208
|
-
topup_success_subtitle:
|
|
209
|
-
'Ми щойно зарахували кошти на ваш рахунок Paydroid Cashless. Увійдіть у додаток.',
|
|
210
|
-
error_title: 'Поповнення не вдалося',
|
|
211
|
-
error_subtitle: 'З вас нічого не стягнуто. Зверніться до нас, якщо виникнуть проблеми.',
|
|
212
|
-
error_account_title: 'Не вдалося створити обліковий запис',
|
|
213
|
-
error_account_subtitle: 'Можливо, ви ввели дані, що відрізняються від наших записів.',
|
|
214
|
-
error_account_button: 'увійти в додаток',
|
|
215
|
-
error_ticket_title: 'Не вдалося додати квиток',
|
|
216
|
-
error_ticket_subtitle:
|
|
217
|
-
'Вибачте, спробуйте пізніше. Зверніться до нас, якщо проблема повториться.',
|
|
218
|
-
faq_button: 'часті запитання',
|
|
219
|
-
retry_button: 'спробувати знову',
|
|
220
|
-
missing_api_key: 'API ключ Paydroid відсутній',
|
|
221
|
-
},
|
|
222
187
|
unpaid: 'Платіж не здійснено.',
|
|
223
188
|
unpaid_description: 'Спробуйте ще раз, натиснувши кнопку Оплатити.',
|
|
224
189
|
},
|
package/src/utils/data/ticket.ts
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
1
|
export const MAX_TICKETS_PER_ORDER = 10;
|
|
2
|
+
|
|
3
|
+
// TODO(EVE-NN): temporary per-event overrides until the backend exposes a
|
|
4
|
+
// configurable maxTicketsPerOrder. Mirrors the same map in the backend's
|
|
5
|
+
// OrderService — keep the two in sync and remove BOTH once that column ships.
|
|
6
|
+
const PER_EVENT_TICKET_LIMITS: Record<number, number> = {
|
|
7
|
+
1837: 2,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const getMaxTicketsPerOrder = (eventId?: number): number =>
|
|
11
|
+
(eventId != null && PER_EVENT_TICKET_LIMITS[eventId]) || MAX_TICKETS_PER_ORDER;
|
|
@@ -40,11 +40,9 @@ export interface IOrderPaid {
|
|
|
40
40
|
orderNumber: number;
|
|
41
41
|
tickets: IPaidTicket[];
|
|
42
42
|
products: IPaidProduct[];
|
|
43
|
-
customer: ICustomer;
|
|
44
43
|
extraFee: number;
|
|
45
44
|
currency: Currencies;
|
|
46
45
|
promoCodes: IPromoCode[] | null;
|
|
47
|
-
paydroidEventId: string | null;
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
export interface IAllowedPaymentMethod {
|
package/CLAUDE.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Eventlook SDK
|
|
2
|
-
|
|
3
|
-
Reusable React component library for order forms (tickets, merchandise, shipping, payment).
|
|
4
|
-
|
|
5
|
-
## Tech Stack
|
|
6
|
-
|
|
7
|
-
- **Library:** React 18-19, MUI, Emotion
|
|
8
|
-
- **Build:** Rollup (CJS + ESM) + TypeScript declarations
|
|
9
|
-
- **Version:** Published as `@eventlook/sdk`
|
|
10
|
-
|
|
11
|
-
## Commands
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
yarn build # Rollup + tsc
|
|
15
|
-
yarn dev # Watch mode (rollup + tsc + yalc push)
|
|
16
|
-
yarn push # yalc push --force
|
|
17
|
-
yarn push:initial # Build then yalc push
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Structure
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
src/
|
|
24
|
-
├── form/ # Order form components
|
|
25
|
-
├── components/ # Shared UI components
|
|
26
|
-
├── hooks/ # Custom hooks
|
|
27
|
-
├── modules/ # Feature modules
|
|
28
|
-
└── locales/ # Translations
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Local Development
|
|
32
|
-
|
|
33
|
-
Use `yarn dev` to watch and auto-push via yalc. Consumer projects (frontend, admin) pick up changes automatically.
|