tf-checkout-react 1.6.6 → 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/README.md +401 -59
- package/dist/adapters/customFields.d.ts +1 -0
- package/dist/api/checkout.d.ts +2 -0
- package/dist/api/common.d.ts +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/preRegistrationComplete.d.ts +1 -1
- package/dist/components/addonsContainer/AddonComponent.d.ts +6 -1
- package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +17 -0
- package/dist/components/addonsContainer/index.d.ts +6 -1
- package/dist/components/billing-info-container/hooks/index.d.ts +3 -0
- package/dist/components/billing-info-container/hooks/usePaymentContext.d.ts +5 -0
- package/dist/components/billing-info-container/hooks/usePaymentRedirect.d.ts +14 -0
- package/dist/components/billing-info-container/hooks/useStripePayment.d.ts +18 -0
- package/dist/components/billing-info-container/index.d.ts +13 -2
- package/dist/components/billing-info-container/utils.d.ts +26 -1
- package/dist/components/common/DatePickerField.d.ts +7 -1
- package/dist/components/common/PhoneNumberField.d.ts +1 -1
- package/dist/components/confirmationContainer/index.d.ts +4 -1
- package/dist/components/countdown/index.d.ts +1 -1
- package/dist/components/forgotPasswordModal/index.d.ts +2 -1
- package/dist/components/myTicketsContainer/index.d.ts +3 -2
- package/dist/components/orderDetailsContainer/index.d.ts +8 -1
- package/dist/components/paymentContainer/OrderDetails.d.ts +9 -0
- package/dist/components/paymentContainer/handlePayment.d.ts +15 -0
- package/dist/components/paymentContainer/index.d.ts +12 -6
- package/dist/components/preRegistration/FieldsSection.d.ts +7 -1
- package/dist/components/preRegistration/PreRegistrationComplete.d.ts +8 -0
- package/dist/components/preRegistration/constants.d.ts +2 -2
- package/dist/components/preRegistration/index.d.ts +6 -0
- package/dist/components/resetPasswordContainer/index.d.ts +2 -2
- package/dist/components/ticketsContainer/InfoIcon.d.ts +5 -0
- package/dist/components/ticketsContainer/TicketsSection.d.ts +3 -2
- package/dist/components/ticketsContainer/TimeSlotsSection.d.ts +25 -0
- package/dist/components/ticketsContainer/index.d.ts +29 -5
- package/dist/components/timerWidget/index.d.ts +2 -1
- package/dist/constants/index.d.ts +5 -0
- package/dist/index.d.ts +4 -1
- package/dist/tf-checkout-react.cjs.development.js +11284 -9565
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +11293 -9577
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/types/add_on.d.ts +1 -0
- package/dist/types/checkoutPageConfigs.d.ts +1 -1
- package/dist/types/order-data.d.ts +3 -1
- package/dist/utils/auth.d.ts +8 -0
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +1 -0
- package/dist/utils/customFields.d.ts +11 -0
- package/dist/utils/getDomain.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/setConfigs.d.ts +1 -0
- package/package.json +14 -8
- package/src/adapters/customFields.ts +7 -1
- package/src/api/auth.ts +2 -1
- package/src/api/checkout.ts +9 -4
- package/src/api/common.ts +49 -2
- package/src/api/index.ts +1 -0
- package/src/api/interceptors.ts +7 -23
- package/src/api/preRegistrationComplete.ts +1 -1
- package/src/api/publicRequest.ts +10 -0
- package/src/components/addonsContainer/AddonComponent.tsx +96 -11
- package/src/components/addonsContainer/SimpleAddonsContainer.tsx +420 -0
- package/src/components/addonsContainer/index.tsx +198 -47
- package/src/components/billing-info-container/hooks/index.ts +3 -0
- package/src/components/billing-info-container/hooks/usePaymentContext.ts +22 -0
- package/src/components/billing-info-container/hooks/usePaymentRedirect.ts +147 -0
- package/src/components/billing-info-container/hooks/useStripePayment.ts +121 -0
- package/src/components/billing-info-container/index.tsx +859 -418
- package/src/components/billing-info-container/{utils.ts → utils.tsx} +124 -1
- package/src/components/common/CheckboxField/index.tsx +1 -1
- package/src/components/common/CustomField.tsx +39 -3
- package/src/components/common/DatePickerField.tsx +25 -10
- package/src/components/common/PhoneNumberField.tsx +4 -2
- package/src/components/common/SnackbarAlert.tsx +32 -34
- package/src/components/confirmationContainer/config.ts +3 -3
- package/src/components/confirmationContainer/index.tsx +20 -1
- package/src/components/confirmationContainer/social-buttons.tsx +5 -3
- package/src/components/confirmationContainer/style.css +9 -5
- package/src/components/countdown/index.tsx +22 -22
- package/src/components/delegationsContainer/IssueComponent.tsx +2 -1
- package/src/components/forgotPasswordModal/index.tsx +44 -13
- package/src/components/loginForm/index.tsx +1 -1
- package/src/components/loginModal/index.tsx +19 -27
- package/src/components/loginModal/style.css +3 -1
- package/src/components/myTicketsContainer/index.tsx +13 -9
- package/src/components/orderDetailsContainer/index.tsx +206 -174
- package/src/components/paymentContainer/OrderDetails.tsx +257 -0
- package/src/components/paymentContainer/handlePayment.ts +86 -0
- package/src/components/paymentContainer/index.tsx +299 -259
- package/src/components/paymentContainer/style.css +141 -0
- package/src/components/preRegistration/FieldsSection.tsx +8 -0
- package/src/components/preRegistration/PreRegistrationComplete.tsx +138 -118
- package/src/components/preRegistration/PreRegistrationInformations.tsx +21 -15
- package/src/components/preRegistration/constants.tsx +10 -4
- package/src/components/preRegistration/index.tsx +233 -179
- package/src/components/preRegistration/style.css +3 -0
- package/src/components/registerForm/constants.tsx +3 -1
- package/src/components/registerForm/index.tsx +3 -3
- package/src/components/registerModal/index.tsx +47 -72
- package/src/components/resetPasswordContainer/index.tsx +20 -14
- package/src/components/seatMapContainer/TicketsSection.tsx +2 -2
- package/src/components/signupModal/index.tsx +13 -6
- package/src/components/ticketResale/index.tsx +7 -0
- package/src/components/ticketsContainer/InfoIcon.tsx +35 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +34 -28
- package/src/components/ticketsContainer/TicketRow.tsx +1 -1
- package/src/components/ticketsContainer/TicketsSection.tsx +189 -57
- package/src/components/ticketsContainer/TimeSlotsSection.tsx +120 -0
- package/src/components/ticketsContainer/index.tsx +268 -106
- package/src/components/timerWidget/index.tsx +15 -3
- package/src/components/timerWidget/style.css +2 -1
- package/src/constants/index.ts +2 -0
- package/src/env.ts +14 -6
- package/src/hoc/CustomFields/index.tsx +9 -1
- package/src/index.ts +7 -2
- package/src/types/add_on.ts +1 -0
- package/src/types/api/cart.d.ts +8 -0
- package/src/types/api/checkout.d.ts +58 -7
- package/src/types/api/common.d.ts +30 -0
- package/src/types/api/orders.d.ts +19 -3
- package/src/types/api/payment.d.ts +6 -2
- package/src/types/api/preRegistrationComplete.d.ts +2 -2
- package/src/types/checkoutPageConfigs.ts +1 -1
- package/src/types/order-data.ts +3 -1
- package/src/types/pre-registration-complete.d.ts +6 -1
- package/src/utils/auth.ts +32 -0
- package/src/utils/cookies.ts +42 -11
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +3 -1
- package/src/utils/customFields.ts +22 -0
- package/src/utils/getDomain.ts +10 -4
- package/src/utils/index.ts +1 -1
- package/src/utils/setConfigs.ts +3 -1
- package/dist/components/stripePayment/index.d.ts +0 -24
- package/src/components/stripePayment/index.tsx +0 -281
- package/src/components/stripePayment/style.css +0 -60
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import './style.css'
|
|
2
3
|
|
|
4
|
+
import { Backdrop, CircularProgress, ThemeOptions } from '@mui/material'
|
|
3
5
|
import Paper from '@mui/material/Paper'
|
|
6
|
+
import { createTheme, ThemeProvider } from '@mui/material/styles'
|
|
4
7
|
import Table from '@mui/material/Table'
|
|
5
8
|
import TableBody from '@mui/material/TableBody'
|
|
6
9
|
import TableCell from '@mui/material/TableCell'
|
|
7
10
|
import TableContainer from '@mui/material/TableContainer'
|
|
8
11
|
import TableHead from '@mui/material/TableHead'
|
|
9
12
|
import TableRow from '@mui/material/TableRow'
|
|
13
|
+
import { CSSProperties } from '@mui/styles'
|
|
10
14
|
import _find from 'lodash/find'
|
|
11
15
|
import _get from 'lodash/get'
|
|
12
16
|
import _has from 'lodash/has'
|
|
@@ -61,6 +65,10 @@ interface OrderDetailsTypes {
|
|
|
61
65
|
personalLinkIcon?: string;
|
|
62
66
|
displayColumnNameInRow?: boolean;
|
|
63
67
|
canSellTicket?: boolean;
|
|
68
|
+
themeOptions?: ThemeOptions & {
|
|
69
|
+
input?: CSSProperties;
|
|
70
|
+
checkbox?: CSSProperties;
|
|
71
|
+
};
|
|
64
72
|
ticketsTableColumns?: Array<{
|
|
65
73
|
id?: string | number;
|
|
66
74
|
key: keyof ITicketTypes & keyof IActionColumns;
|
|
@@ -71,6 +79,7 @@ interface OrderDetailsTypes {
|
|
|
71
79
|
referralTitle?: string;
|
|
72
80
|
itemsTitle?: string;
|
|
73
81
|
ticketsTitle?: string;
|
|
82
|
+
displayLoading?: boolean;
|
|
74
83
|
}
|
|
75
84
|
|
|
76
85
|
export interface CustomFieldOption {
|
|
@@ -130,6 +139,8 @@ export const OrderDetailsContainer = ({
|
|
|
130
139
|
referralTitle = '',
|
|
131
140
|
itemsTitle = '',
|
|
132
141
|
ticketsTitle = 'Your Tickets',
|
|
142
|
+
themeOptions,
|
|
143
|
+
displayLoading = false,
|
|
133
144
|
}: OrderDetailsTypes) => {
|
|
134
145
|
const [data, setData] = useState<any>({})
|
|
135
146
|
const [removeFromResaleLoading, setRemoveFromResaleLoading] = useState(false)
|
|
@@ -138,6 +149,7 @@ export const OrderDetailsContainer = ({
|
|
|
138
149
|
const [showRemoveResaleModal, setShowRemoveResaleModal] = useState(false)
|
|
139
150
|
const [activeTicket, setActiveTicket] = useState<any>(null)
|
|
140
151
|
const [showOrderCustomFieldsSection, setShowOrderCustomFieldsSection] = useState(false)
|
|
152
|
+
const [isLoading, setIsLoading] = useState(false)
|
|
141
153
|
|
|
142
154
|
const isTable = _get(data, 'tickets[0].is_table', false)
|
|
143
155
|
const columnsProps = isTable
|
|
@@ -193,16 +205,19 @@ export const OrderDetailsContainer = ({
|
|
|
193
205
|
const params: URLSearchParams = new URL(`${window.location}`).searchParams
|
|
194
206
|
orderId = params.get('o') || ''
|
|
195
207
|
}
|
|
208
|
+
setIsLoading(true)
|
|
196
209
|
const response = await getOrderDetails(String(orderId))
|
|
197
210
|
onGetOrdersSuccess(response)
|
|
198
211
|
|
|
199
212
|
const data = _get(response, 'data.attributes')
|
|
200
213
|
setData(data)
|
|
214
|
+
setIsLoading(false)
|
|
201
215
|
} catch (error) {
|
|
202
216
|
onGetOrdersError(error)
|
|
217
|
+
setIsLoading(false)
|
|
203
218
|
}
|
|
204
219
|
})()
|
|
205
|
-
}, [])
|
|
220
|
+
}, [onGetOrdersError, onGetOrdersSuccess, pOrderId])
|
|
206
221
|
|
|
207
222
|
const handleSellTicket = (ticket: ITicketTypes) => {
|
|
208
223
|
const ticketTypesArr = data.items.ticket_types
|
|
@@ -352,194 +367,211 @@ export const OrderDetailsContainer = ({
|
|
|
352
367
|
}
|
|
353
368
|
}
|
|
354
369
|
|
|
370
|
+
const theme = createTheme(themeOptions ?? {})
|
|
371
|
+
|
|
372
|
+
if (isLoading && displayLoading) {
|
|
373
|
+
return (
|
|
374
|
+
<Backdrop
|
|
375
|
+
sx={{ color: '#fff', backgroundColor: '#000000bd', zIndex: 1205 }}
|
|
376
|
+
open={true}
|
|
377
|
+
>
|
|
378
|
+
<CircularProgress color="inherit" />
|
|
379
|
+
</Backdrop>
|
|
380
|
+
)
|
|
381
|
+
}
|
|
382
|
+
|
|
355
383
|
return (
|
|
356
|
-
<
|
|
357
|
-
<div className="
|
|
358
|
-
<
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
<div className="order-summary-box">
|
|
364
|
-
<div className="summary-block">
|
|
365
|
-
<div className="summary-item">
|
|
366
|
-
<h6 className="sub-title">Order Summary</h6>
|
|
367
|
-
<p className="order-summary-date">{orderSummery}</p>
|
|
368
|
-
</div>
|
|
369
|
-
<div className="summary-item">
|
|
370
|
-
<div className="return-button-container">
|
|
371
|
-
<button
|
|
372
|
-
type="button"
|
|
373
|
-
className="return-button"
|
|
374
|
-
onClick={() => {
|
|
375
|
-
if (isBrowser) {
|
|
376
|
-
window.location.assign(ordersPath ?? '/orders')
|
|
377
|
-
}
|
|
378
|
-
}}
|
|
379
|
-
>
|
|
380
|
-
Back to Orders
|
|
381
|
-
</button>
|
|
382
|
-
</div>
|
|
383
|
-
</div>
|
|
384
|
+
<ThemeProvider theme={theme}>
|
|
385
|
+
<div className="order-details">
|
|
386
|
+
<div className="layout-block">
|
|
387
|
+
<h1 className="layout-title">Order Details</h1>
|
|
388
|
+
{!_isEmpty(orderUpdatableCustomFields) && (
|
|
389
|
+
<SVG src={EditSvg} onClick={() => setShowOrderCustomFieldsSection(true)} />
|
|
390
|
+
)}
|
|
384
391
|
</div>
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
<div className="
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
<b>{customField.label} :</b> {renderCustomFieldValue(customField)}
|
|
391
|
-
</div>
|
|
392
|
-
))}
|
|
392
|
+
<div className="order-summary-box">
|
|
393
|
+
<div className="summary-block">
|
|
394
|
+
<div className="summary-item">
|
|
395
|
+
<h6 className="sub-title">Order Summary</h6>
|
|
396
|
+
<p className="order-summary-date">{orderSummery}</p>
|
|
393
397
|
</div>
|
|
394
|
-
|
|
395
|
-
<div
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
398
|
+
<div className="summary-item">
|
|
399
|
+
<div className="return-button-container">
|
|
400
|
+
<button
|
|
401
|
+
type="button"
|
|
402
|
+
className="return-button"
|
|
403
|
+
onClick={() => {
|
|
404
|
+
if (isBrowser) {
|
|
405
|
+
window.location.assign(ordersPath ?? '/orders')
|
|
406
|
+
}
|
|
407
|
+
}}
|
|
408
|
+
>
|
|
409
|
+
Back to Orders
|
|
410
|
+
</button>
|
|
407
411
|
</div>
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
<span>Personal Share Link: </span>
|
|
419
|
-
<a href={data?.personal_share_link} target="_blank" rel="noreferrer">
|
|
420
|
-
{Boolean(personalLinkIcon) && <img src={personalLinkIcon} alt="Icon" />}
|
|
421
|
-
{data?.personal_share_link}
|
|
422
|
-
</a>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
{!_isEmpty(orderCustomFields) && (
|
|
415
|
+
<>
|
|
416
|
+
<div className="custom-field-value-container">
|
|
417
|
+
{orderCustomFields.map((customField: CustomFieldTypes) => (
|
|
418
|
+
<div className="info-item" key={customField.id}>
|
|
419
|
+
<b>{customField.label} :</b> {renderCustomFieldValue(customField)}
|
|
420
|
+
</div>
|
|
421
|
+
))}
|
|
423
422
|
</div>
|
|
424
|
-
{
|
|
423
|
+
{!_isEmpty(orderUpdatableCustomFields) && (
|
|
424
|
+
<div
|
|
425
|
+
className={`custom-fields-block ${
|
|
426
|
+
showOrderCustomFieldsSection ? 'show' : ''
|
|
427
|
+
}`}
|
|
428
|
+
>
|
|
429
|
+
<p className="title">Aditional Information Request</p>
|
|
430
|
+
<CustomFieldsForm
|
|
431
|
+
initialValues={orderEditableFieldsFormInitialValues}
|
|
432
|
+
fields={orderUpdatableCustomFields}
|
|
433
|
+
handleFormSubmit={handleOrderCustomFieldsUpdate}
|
|
434
|
+
handleFormClose={() => setShowOrderCustomFieldsSection(false)}
|
|
435
|
+
/>
|
|
436
|
+
</div>
|
|
437
|
+
)}
|
|
438
|
+
</>
|
|
439
|
+
)}
|
|
440
|
+
{!data?.disable_referral && (
|
|
441
|
+
<>
|
|
442
|
+
{referralTitle && (
|
|
443
|
+
<h4 className="referral-title sub-title">{referralTitle}</h4>
|
|
444
|
+
)}
|
|
445
|
+
<div className="personal-link">
|
|
425
446
|
<div className="link-item">
|
|
426
|
-
<
|
|
447
|
+
<span>Personal Share Link: </span>
|
|
448
|
+
<a href={data?.personal_share_link} target="_blank" rel="noreferrer">
|
|
449
|
+
{Boolean(personalLinkIcon) && (
|
|
450
|
+
<img src={personalLinkIcon} alt="Icon" />
|
|
451
|
+
)}
|
|
452
|
+
{data?.personal_share_link}
|
|
453
|
+
</a>
|
|
427
454
|
</div>
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
455
|
+
{data?.sales_referred ? (
|
|
456
|
+
<div className="link-item">
|
|
457
|
+
<p className="total-referrer">{`So far, you’ve referred ${data.sales_referred} tickets`}</p>
|
|
458
|
+
</div>
|
|
459
|
+
) : null}
|
|
460
|
+
</div>
|
|
461
|
+
</>
|
|
462
|
+
)}
|
|
463
|
+
{itemsTitle && <h4 className="items-title sub-title">{itemsTitle}</h4>}
|
|
464
|
+
<TableContainer component={Paper}>
|
|
465
|
+
<Table className="tt-type" aria-label="collapsible table">
|
|
466
|
+
<TableHead>
|
|
467
|
+
<TableRow>
|
|
468
|
+
{_map(columnsProps, item => (
|
|
469
|
+
<TableCell>{item.label || ''}</TableCell>
|
|
470
|
+
))}
|
|
471
|
+
</TableRow>
|
|
472
|
+
</TableHead>
|
|
473
|
+
<TableBody>
|
|
474
|
+
{data?.items?.ticket_types?.map((ticket: TicketTypes, index: number) =>
|
|
475
|
+
data?.tickets && !data?.tickets[0].is_table ? (
|
|
476
|
+
<TableRow key={index}>
|
|
477
|
+
<TableCell>
|
|
478
|
+
<b>Ticket Type:</b> {ticket.name}
|
|
479
|
+
</TableCell>
|
|
480
|
+
<TableCell>{ticket.currency + ticket.price}</TableCell>
|
|
481
|
+
<TableCell>{ticket.quantity}</TableCell>
|
|
482
|
+
<TableCell>{ticket.currency + ticket.total}</TableCell>
|
|
483
|
+
</TableRow>
|
|
484
|
+
) : (
|
|
485
|
+
<TableRow key={index}>
|
|
486
|
+
<TableCell>
|
|
487
|
+
<b>Ticket Type:</b> {ticket.name}
|
|
488
|
+
</TableCell>
|
|
489
|
+
<TableCell>{ticket.currency + ticket.price}</TableCell>
|
|
490
|
+
<TableCell>{ticket.guests_count}</TableCell>
|
|
491
|
+
<TableCell>{ticket.deposit_paid}</TableCell>
|
|
492
|
+
<TableCell>{ticket.remaining}</TableCell>
|
|
493
|
+
</TableRow>
|
|
494
|
+
)
|
|
495
|
+
)}
|
|
496
|
+
{data?.items?.add_ons?.map((ticket: TicketTypes, index: number) => (
|
|
445
497
|
<TableRow key={index}>
|
|
446
498
|
<TableCell>
|
|
447
|
-
<
|
|
499
|
+
<div>
|
|
500
|
+
<b>Add-On</b>
|
|
501
|
+
<div>
|
|
502
|
+
{ticket.groupName && `${ticket.groupName}: `} {ticket.name}
|
|
503
|
+
</div>
|
|
504
|
+
</div>
|
|
448
505
|
</TableCell>
|
|
449
506
|
<TableCell>{ticket.currency + ticket.price}</TableCell>
|
|
450
507
|
<TableCell>{ticket.quantity}</TableCell>
|
|
451
508
|
<TableCell>{ticket.currency + ticket.total}</TableCell>
|
|
452
509
|
</TableRow>
|
|
453
|
-
)
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
<TableCell>{ticket.guests_count}</TableCell>
|
|
460
|
-
<TableCell>{ticket.deposit_paid}</TableCell>
|
|
461
|
-
<TableCell>{ticket.remaining}</TableCell>
|
|
462
|
-
</TableRow>
|
|
463
|
-
)
|
|
464
|
-
)}
|
|
465
|
-
{data?.items?.add_ons?.map((ticket: TicketTypes, index: number) => (
|
|
466
|
-
<TableRow key={index}>
|
|
467
|
-
<TableCell>
|
|
468
|
-
<div>
|
|
469
|
-
<b>Add-On</b>
|
|
470
|
-
<div>
|
|
471
|
-
{ticket.groupName && `${ticket.groupName}: `} {ticket.name}
|
|
472
|
-
</div>
|
|
473
|
-
</div>
|
|
474
|
-
</TableCell>
|
|
475
|
-
<TableCell>{ticket.currency + ticket.price}</TableCell>
|
|
476
|
-
<TableCell>{ticket.quantity}</TableCell>
|
|
477
|
-
<TableCell>{ticket.currency + ticket.total}</TableCell>
|
|
510
|
+
))}
|
|
511
|
+
<TableRow className="total-row">
|
|
512
|
+
<TableCell />
|
|
513
|
+
<TableCell />
|
|
514
|
+
<TableCell>Total</TableCell>
|
|
515
|
+
<TableCell>{getTotal(data)}</TableCell>
|
|
478
516
|
</TableRow>
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}
|
|
505
|
-
handleSellTicket={handleSellTicket}
|
|
506
|
-
handleRemoveFromResale={handleRemoveFromResale}
|
|
507
|
-
displayColumnNameInRow={displayColumnNameInRow}
|
|
508
|
-
canSellTicket={canSellTicket}
|
|
509
|
-
ticketHoldersCustomFields={ticketHoldersCustomFields}
|
|
510
|
-
handleTicketHoldersUpdate={handleTicketHoldersUpdate}
|
|
511
|
-
/>
|
|
512
|
-
<div className="return-button-container">
|
|
513
|
-
<button
|
|
514
|
-
type="button"
|
|
515
|
-
className="return-button"
|
|
516
|
-
onClick={() => {
|
|
517
|
-
if (onReturnButtonClick) {
|
|
518
|
-
onReturnButtonClick(data)
|
|
519
|
-
} else if (isBrowser) {
|
|
520
|
-
window.location.assign(ordersPath ?? '/orders')
|
|
521
|
-
}
|
|
522
|
-
}}
|
|
523
|
-
>
|
|
524
|
-
Return to Order History
|
|
525
|
-
</button>
|
|
526
|
-
</div>
|
|
527
|
-
{showResaleModal && (
|
|
528
|
-
<TicketResaleModal
|
|
529
|
-
ticket={activeTicket}
|
|
530
|
-
onClose={handleOnClose}
|
|
531
|
-
onSubmit={handleOnSubmit}
|
|
532
|
-
loading={resaleTicketLoading}
|
|
533
|
-
/>
|
|
534
|
-
)}
|
|
535
|
-
{showRemoveResaleModal && (
|
|
536
|
-
<ConfirmModal
|
|
537
|
-
message="Are you sure you want to withdraw your ticket from resale?"
|
|
538
|
-
onClose={onCloseRemoveResale}
|
|
539
|
-
onConfirm={onConfirmRemoveResale}
|
|
540
|
-
loading={removeFromResaleLoading}
|
|
517
|
+
</TableBody>
|
|
518
|
+
</Table>
|
|
519
|
+
</TableContainer>
|
|
520
|
+
</div>
|
|
521
|
+
<TicketsTable
|
|
522
|
+
ticketsTitle={ticketsTitle}
|
|
523
|
+
tickets={data.tickets}
|
|
524
|
+
columns={
|
|
525
|
+
ticketsTableColumns?.length
|
|
526
|
+
? ticketsTableColumns
|
|
527
|
+
: [
|
|
528
|
+
{ key: 'hash' as never, label: 'Ticket ID' },
|
|
529
|
+
{ key: 'ticket_type' as never, label: 'Ticket Type' },
|
|
530
|
+
{ key: 'holder_name' as never, label: 'Ticket Holder' },
|
|
531
|
+
{ key: 'status' as never, label: 'Status' },
|
|
532
|
+
{ key: 'download' as never, label: '' },
|
|
533
|
+
{ key: 'sell_ticket' as never, label: '' },
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
handleSellTicket={handleSellTicket}
|
|
537
|
+
handleRemoveFromResale={handleRemoveFromResale}
|
|
538
|
+
displayColumnNameInRow={displayColumnNameInRow}
|
|
539
|
+
canSellTicket={canSellTicket}
|
|
540
|
+
ticketHoldersCustomFields={ticketHoldersCustomFields}
|
|
541
|
+
handleTicketHoldersUpdate={handleTicketHoldersUpdate}
|
|
541
542
|
/>
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
<div className="return-button-container">
|
|
544
|
+
<button
|
|
545
|
+
type="button"
|
|
546
|
+
className="return-button"
|
|
547
|
+
onClick={() => {
|
|
548
|
+
if (onReturnButtonClick) {
|
|
549
|
+
onReturnButtonClick(data)
|
|
550
|
+
} else if (isBrowser) {
|
|
551
|
+
window.location.assign(ordersPath ?? '/orders')
|
|
552
|
+
}
|
|
553
|
+
}}
|
|
554
|
+
>
|
|
555
|
+
Return to Order History
|
|
556
|
+
</button>
|
|
557
|
+
</div>
|
|
558
|
+
{showResaleModal && (
|
|
559
|
+
<TicketResaleModal
|
|
560
|
+
ticket={activeTicket}
|
|
561
|
+
onClose={handleOnClose}
|
|
562
|
+
onSubmit={handleOnSubmit}
|
|
563
|
+
loading={resaleTicketLoading}
|
|
564
|
+
/>
|
|
565
|
+
)}
|
|
566
|
+
{showRemoveResaleModal && (
|
|
567
|
+
<ConfirmModal
|
|
568
|
+
message="Are you sure you want to withdraw your ticket from resale?"
|
|
569
|
+
onClose={onCloseRemoveResale}
|
|
570
|
+
onConfirm={onConfirmRemoveResale}
|
|
571
|
+
loading={removeFromResaleLoading}
|
|
572
|
+
/>
|
|
573
|
+
)}
|
|
574
|
+
</div>
|
|
575
|
+
</ThemeProvider>
|
|
544
576
|
)
|
|
545
577
|
}
|