tf-checkout-react 1.0.99 → 1.0.100-beta.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 (117) hide show
  1. package/README.md +278 -1
  2. package/dist/api/index.d.ts +31 -26
  3. package/dist/components/account-settings/index.d.ts +3 -0
  4. package/dist/components/billing-info-container/index.d.ts +5 -5
  5. package/dist/components/billing-info-container/utils.d.ts +1 -0
  6. package/dist/components/common/CustomField.d.ts +1 -1
  7. package/dist/components/common/DatePickerField.d.ts +14 -0
  8. package/dist/components/common/RedirectModal.d.ts +7 -0
  9. package/dist/components/common/SnackbarAlert.d.ts +13 -0
  10. package/dist/components/confirmationContainer/index.d.ts +2 -1
  11. package/dist/components/countdown/index.d.ts +4 -1
  12. package/dist/components/myTicketsContainer/tableConfig.d.ts +0 -1
  13. package/dist/components/orderDetailsContainer/index.d.ts +5 -1
  14. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +4 -1
  15. package/dist/components/paymentContainer/index.d.ts +3 -1
  16. package/dist/components/rsvpContainer/index.d.ts +7 -0
  17. package/dist/components/stripePayment/index.d.ts +2 -1
  18. package/dist/components/ticketResale/index.d.ts +5 -3
  19. package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
  20. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +6 -9
  21. package/dist/components/ticketsContainer/TicketsSection.d.ts +5 -3
  22. package/dist/components/ticketsContainer/index.d.ts +13 -2
  23. package/dist/components/timerWidget/index.d.ts +3 -3
  24. package/dist/env.d.ts +1 -0
  25. package/dist/images/cross.svg +44 -0
  26. package/dist/images/done.svg +3 -3
  27. package/dist/index.d.ts +2 -0
  28. package/dist/tf-checkout-react.cjs.development.js +1400 -575
  29. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  30. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  31. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  32. package/dist/tf-checkout-react.esm.js +1409 -586
  33. package/dist/tf-checkout-react.esm.js.map +1 -1
  34. package/dist/tf-checkout-styles.css +1 -1
  35. package/dist/utils/cookies.d.ts +3 -0
  36. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +6 -1
  37. package/dist/utils/downloadPDF.d.ts +1 -1
  38. package/dist/utils/getDomain.d.ts +1 -0
  39. package/dist/utils/index.d.ts +2 -0
  40. package/package.json +89 -89
  41. package/src/.DS_Store +0 -0
  42. package/src/.d.ts +2 -2
  43. package/src/api/index.ts +313 -278
  44. package/src/assets/images/cross.svg +44 -0
  45. package/src/assets/images/done.svg +3 -3
  46. package/src/components/.DS_Store +0 -0
  47. package/src/components/account-settings/index.tsx +161 -0
  48. package/src/components/account-settings/style.css +200 -0
  49. package/src/components/billing-info-container/index.tsx +821 -777
  50. package/src/components/billing-info-container/style.css +106 -106
  51. package/src/components/billing-info-container/utils.ts +233 -223
  52. package/src/components/common/CheckboxField.tsx +41 -41
  53. package/src/components/common/CustomField.tsx +87 -84
  54. package/src/components/common/DatePickerField.tsx +98 -0
  55. package/src/components/common/FormikPhoneNumberField.tsx +51 -51
  56. package/src/components/common/Loader.tsx +9 -9
  57. package/src/components/common/RadioField.tsx +35 -35
  58. package/src/components/common/RedirectModal.tsx +43 -0
  59. package/src/components/common/SelectField.tsx +80 -80
  60. package/src/components/common/SnackbarAlert.tsx +54 -0
  61. package/src/components/common/dist/PhoneNumberField.js +96 -0
  62. package/src/components/common/index.tsx +4 -4
  63. package/src/components/confirmModal/index.tsx +51 -51
  64. package/src/components/confirmModal/style.css +21 -21
  65. package/src/components/confirmationContainer/config.ts +72 -72
  66. package/src/components/confirmationContainer/index.tsx +197 -194
  67. package/src/components/confirmationContainer/social-buttons.tsx +94 -94
  68. package/src/components/confirmationContainer/style.css +202 -202
  69. package/src/components/countdown/index.tsx +100 -89
  70. package/src/components/countdown/style.css +9 -9
  71. package/src/components/index.ts +7 -7
  72. package/src/components/loginModal/index.tsx +171 -209
  73. package/src/components/loginModal/style.css +71 -71
  74. package/src/components/myTicketsContainer/index.tsx +201 -137
  75. package/src/components/myTicketsContainer/row.tsx +41 -41
  76. package/src/components/myTicketsContainer/style.css +40 -40
  77. package/src/components/myTicketsContainer/tableConfig.tsx +32 -34
  78. package/src/components/orderDetailsContainer/index.tsx +289 -249
  79. package/src/components/orderDetailsContainer/style.css +73 -73
  80. package/src/components/orderDetailsContainer/ticketsTable.tsx +177 -124
  81. package/src/components/paymentContainer/index.tsx +352 -284
  82. package/src/components/registerModal/index.tsx +183 -190
  83. package/src/components/rsvpContainer/index.tsx +126 -0
  84. package/src/components/stripePayment/index.tsx +258 -253
  85. package/src/components/stripePayment/style.css +60 -60
  86. package/src/components/ticketResale/index.tsx +74 -56
  87. package/src/components/ticketResaleModal/index.tsx +213 -210
  88. package/src/components/ticketResaleModal/style.css +28 -28
  89. package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
  90. package/src/components/ticketsContainer/PromoCodeSection.tsx +89 -99
  91. package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
  92. package/src/components/ticketsContainer/TicketRow.tsx +89 -83
  93. package/src/components/ticketsContainer/TicketsSection.tsx +87 -81
  94. package/src/components/ticketsContainer/index.tsx +506 -409
  95. package/src/components/ticketsContainer/style.css +181 -181
  96. package/src/components/ticketsContainer/utils.ts +11 -11
  97. package/src/components/timerWidget/index.tsx +87 -70
  98. package/src/components/timerWidget/style.css +34 -26
  99. package/src/components/waitingList/index.tsx +178 -178
  100. package/src/components/waitingList/style.css +26 -26
  101. package/src/env.ts +20 -19
  102. package/src/index.ts +15 -13
  103. package/src/normalizers/index.ts +45 -45
  104. package/src/types/billing-info-data.ts +37 -37
  105. package/src/types/payment-field.ts +7 -7
  106. package/src/types/referral-promotion.ts +7 -7
  107. package/src/utils/cookies.ts +42 -0
  108. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +71 -59
  109. package/src/utils/downloadPDF.tsx +52 -30
  110. package/src/utils/formikErrorFocus.ts +24 -24
  111. package/src/utils/getDomain.ts +15 -0
  112. package/src/utils/getImage.ts +14 -14
  113. package/src/utils/getQueryVariable.ts +13 -13
  114. package/src/utils/index.ts +7 -5
  115. package/src/utils/setConfigs.ts +26 -26
  116. package/src/utils/showZero.tsx +10 -10
  117. package/src/validators/index.ts +20 -20
@@ -1,249 +1,289 @@
1
- import React, { useState, useEffect } from 'react'
2
- import './style.css'
3
-
4
- import Table from '@mui/material/Table'
5
- import TableBody from '@mui/material/TableBody'
6
- import TableCell from '@mui/material/TableCell'
7
- import TableContainer from '@mui/material/TableContainer'
8
- import TableHead from '@mui/material/TableHead'
9
- import TableRow from '@mui/material/TableRow'
10
- import Paper from '@mui/material/Paper'
11
- import CircularProgress from '@mui/material/CircularProgress'
12
- import _get from 'lodash/get'
13
- import _has from 'lodash/has'
14
- import { getOrderDetails } from '../../api'
15
- import TicketsTable, { ITicketTypes } from './ticketsTable'
16
- import { TicketResaleModal, InitialValuesTypes } from '../ticketResaleModal'
17
- import ConfirmModal from '../confirmModal'
18
- import { resaleTicket, removeFromResale } from '../../api'
19
-
20
- interface TicketTypes {
21
- currency: string;
22
- discount: string;
23
- name: string;
24
- price: string;
25
- quantity: string;
26
- total: string;
27
- }
28
-
29
- interface OrderDetailsTypes {
30
- onGetOrdersSuccess: (res: any) => void;
31
- onGetOrdersError: (err: any) => void;
32
- }
33
-
34
- const getTotal = (data: any) => {
35
- if (!data?.total || !_has(data, 'items.ticket_types.length')) return ''
36
-
37
- return data.items.ticket_types[0].currency + data.total
38
- }
39
-
40
- export const OrderDetailsContainer = ({
41
- onGetOrdersSuccess = () => {},
42
- onGetOrdersError = () => {},
43
- }: OrderDetailsTypes) => {
44
- const [data, setData] = useState<any>({})
45
- const [loading, setLoading] = useState(true)
46
- const [showResaleModal, setShowResaleModal] = useState(false)
47
- const [showRemoveResaleModal, setShowRemoveResaleModal] = useState(false)
48
- const [activeTicket, setActiveTicket] = useState<any>(null)
49
-
50
- useEffect(() => {
51
- (async () => {
52
- try {
53
- setLoading(true)
54
- let orderId = ''
55
- if (typeof window !== 'undefined') {
56
- const params: URLSearchParams = new URL(`${window.location}`)
57
- .searchParams
58
- orderId = params.get('o') || ''
59
- }
60
- const response = await getOrderDetails(orderId)
61
- onGetOrdersSuccess(response)
62
-
63
- const data = _get(response, 'data.data.attributes')
64
-
65
- setData(data)
66
- } catch (error) {
67
- onGetOrdersError(error)
68
- } finally {
69
- setLoading(false)
70
- }
71
- })()
72
- }, [])
73
-
74
- const handleSellTicket = (ticket: ITicketTypes) => {
75
- setActiveTicket(ticket)
76
- setShowResaleModal(true)
77
- }
78
-
79
- const handleOnClose = () => {
80
- setShowResaleModal(false)
81
- setActiveTicket(null)
82
- }
83
-
84
- const handleOnSubmit = async (values: InitialValuesTypes) => {
85
- try {
86
- setLoading(true)
87
- const { to, first_name, last_name, email, confirm_email, confirm } = values
88
- const formData = new FormData();
89
- formData.append('to', to)
90
- formData.append('first_name', first_name)
91
- formData.append('last_name', last_name)
92
- formData.append('email', email)
93
- formData.append('confirm_email', confirm_email)
94
- formData.append('confirm', String(confirm))
95
-
96
- await resaleTicket(formData, activeTicket.hash)
97
- const updatedData = { ...data }
98
- updatedData?.tickets?.forEach((ticket: ITicketTypes) => {
99
- if(ticket.hash === activeTicket.hash) {
100
- ticket.is_sellable = false
101
- ticket.is_on_sale = true
102
- }
103
- })
104
-
105
- setData(updatedData)
106
- } catch (error) {
107
- // ...
108
- } finally {
109
- setShowResaleModal(false)
110
- setLoading(false)
111
- }
112
- }
113
-
114
- const handleRemoveFromResale = (ticket: ITicketTypes) => {
115
- setShowRemoveResaleModal(true)
116
- setActiveTicket(ticket)
117
- }
118
-
119
- const onCloseRemoveResale = () => {
120
- setShowRemoveResaleModal(false)
121
- setActiveTicket(null)
122
- }
123
-
124
- const onConfirmRemoveResale = async () => {
125
- try {
126
- setLoading(true)
127
- await removeFromResale(activeTicket.hash)
128
- const updatedData = { ...data }
129
- updatedData?.tickets?.forEach((ticket: ITicketTypes) => {
130
- if(ticket.hash === activeTicket.hash) {
131
- ticket.is_sellable = true
132
- ticket.is_on_sale = false
133
- }
134
- })
135
-
136
- setData(updatedData)
137
- } catch (error) {
138
- // ...
139
- } finally {
140
- setShowRemoveResaleModal(false)
141
- setLoading(false)
142
- }
143
- }
144
-
145
- return (
146
- <div className="order-details">
147
- {loading ? (
148
- <div className="loading">
149
- <CircularProgress />
150
- </div>
151
- ) : (
152
- <>
153
- <h1 className="layout-title">Order Details</h1>
154
- <div className="order-summary-box">
155
- <h4 className="sub-title">Order Summary</h4>
156
- <div className="personal-link">
157
- <b>Your personal share link for this event is: </b>
158
- <a
159
- href={data?.personal_share_link}
160
- target="_blank"
161
- rel="noreferrer"
162
- >
163
- {data?.personal_share_link}
164
- </a>
165
- </div>
166
- <TableContainer component={Paper}>
167
- <Table aria-label="collapsible table">
168
- <TableHead>
169
- <TableRow>
170
- <TableCell>Items</TableCell>
171
- <TableCell>Price</TableCell>
172
- <TableCell>Quantity</TableCell>
173
- <TableCell>Total</TableCell>
174
- </TableRow>
175
- </TableHead>
176
- <TableBody>
177
- {data?.items?.ticket_types?.map(
178
- (ticket: TicketTypes, index: number) => (
179
- <TableRow key={index}>
180
- <TableCell>
181
- <b>Ticket Type: </b>
182
- {ticket.name}
183
- </TableCell>
184
- <TableCell>{ticket.currency + ticket.price}</TableCell>
185
- <TableCell>{ticket.quantity}</TableCell>
186
- <TableCell>{ticket.currency + ticket.total}</TableCell>
187
- </TableRow>
188
- )
189
- )}
190
- {data?.items?.add_ons?.map(
191
- (ticket: TicketTypes, index: number) => (
192
- <TableRow key={index}>
193
- <TableCell>
194
- <b>Add-On: </b>
195
- {ticket.name}
196
- </TableCell>
197
- <TableCell>{ticket.currency + ticket.price}</TableCell>
198
- <TableCell>{ticket.quantity}</TableCell>
199
- <TableCell>{ticket.currency + ticket.total}</TableCell>
200
- </TableRow>
201
- )
202
- )}
203
- <TableRow className="total-row">
204
- <TableCell />
205
- <TableCell />
206
- <TableCell>Total</TableCell>
207
- <TableCell>{getTotal(data)}</TableCell>
208
- </TableRow>
209
- </TableBody>
210
- </Table>
211
- </TableContainer>
212
- </div>
213
- <TicketsTable
214
- tickets={data.tickets}
215
- handleSellTicket={handleSellTicket}
216
- handleRemoveFromResale={handleRemoveFromResale}
217
- />
218
- <div className="return-button-container">
219
- <button
220
- type="button"
221
- className="return-button"
222
- onClick={() => {
223
- if (typeof window !== 'undefined') {
224
- window.location.assign('/orders')
225
- }
226
- }}
227
- >
228
- Return to Order History
229
- </button>
230
- </div>
231
- </>
232
- )}
233
- {showResaleModal && (
234
- <TicketResaleModal
235
- ticket={activeTicket}
236
- onClose={handleOnClose}
237
- onSubmit={handleOnSubmit}
238
- />
239
- )}
240
- {showRemoveResaleModal && (
241
- <ConfirmModal
242
- message="Are you sure you want to withdraw your ticket from resale?"
243
- onClose={onCloseRemoveResale}
244
- onConfirm={onConfirmRemoveResale}
245
- />
246
- )}
247
- </div>
248
- )
249
- }
1
+ import React, { useState, useEffect } from 'react'
2
+ import './style.css'
3
+
4
+ import Table from '@mui/material/Table'
5
+ import TableBody from '@mui/material/TableBody'
6
+ import TableCell from '@mui/material/TableCell'
7
+ import TableContainer from '@mui/material/TableContainer'
8
+ import TableHead from '@mui/material/TableHead'
9
+ import TableRow from '@mui/material/TableRow'
10
+ import Paper from '@mui/material/Paper'
11
+ import CircularProgress from '@mui/material/CircularProgress'
12
+ import _get from 'lodash/get'
13
+ import _has from 'lodash/has'
14
+ import _find from 'lodash/find'
15
+ import _map from 'lodash/map'
16
+ import { getOrderDetails } from '../../api'
17
+ import TicketsTable, { ITicketTypes } from './ticketsTable'
18
+ import { TicketResaleModal, InitialValuesTypes } from '../ticketResaleModal'
19
+ import ConfirmModal from '../confirmModal'
20
+ import { resaleTicket, removeFromResale } from '../../api'
21
+
22
+ interface TicketTypes {
23
+ currency: string;
24
+ discount: string;
25
+ name: string;
26
+ price: string;
27
+ quantity: string;
28
+ total: string;
29
+ }
30
+
31
+ interface OrderDetailsTypes {
32
+ columns: Array<{ label: string }>;
33
+ onGetOrdersSuccess: (res: any) => void;
34
+ onGetOrdersError: (err: any) => void;
35
+ personalLinkIcon?: string;
36
+ }
37
+
38
+ const getTotal = (data: any) => {
39
+ if (!data?.total || !_has(data, 'items.ticket_types.length')) return ''
40
+
41
+ return data.items.ticket_types[0].currency + data.total
42
+ }
43
+
44
+ export const OrderDetailsContainer = ({
45
+ columns = [],
46
+ onGetOrdersSuccess = () => {},
47
+ onGetOrdersError = () => {},
48
+ personalLinkIcon = '',
49
+ }: OrderDetailsTypes) => {
50
+ const [data, setData] = useState<any>({})
51
+ const [loading, setLoading] = useState(true)
52
+ const [showResaleModal, setShowResaleModal] = useState(false)
53
+ const [showRemoveResaleModal, setShowRemoveResaleModal] = useState(false)
54
+ const [activeTicket, setActiveTicket] = useState<any>(null)
55
+
56
+ useEffect(() => {
57
+ (async () => {
58
+ try {
59
+ setLoading(true)
60
+ let orderId = ''
61
+ if (typeof window !== 'undefined') {
62
+ const params: URLSearchParams = new URL(`${window.location}`)
63
+ .searchParams
64
+ orderId = params.get('o') || ''
65
+ }
66
+ const response = await getOrderDetails(orderId)
67
+ onGetOrdersSuccess(response)
68
+
69
+ const data = _get(response, 'data.data.attributes')
70
+
71
+ setData(data)
72
+ } catch (error) {
73
+ onGetOrdersError(error)
74
+ } finally {
75
+ setLoading(false)
76
+ }
77
+ })()
78
+ }, [])
79
+
80
+ const handleSellTicket = (ticket: ITicketTypes) => {
81
+ const ticketTypesArr = data.items.ticket_types
82
+ const sellTicketType = _find(
83
+ ticketTypesArr,
84
+ ticketType => ticketType.hash === ticket.ticket_type_hash
85
+ )
86
+ setActiveTicket({
87
+ ...ticket,
88
+ ticket_type_is_active: sellTicketType?.active,
89
+ })
90
+ setShowResaleModal(true)
91
+ }
92
+
93
+ const handleOnClose = () => {
94
+ setShowResaleModal(false)
95
+ setActiveTicket(null)
96
+ }
97
+
98
+ const handleOnSubmit = async (values: InitialValuesTypes) => {
99
+ try {
100
+ setLoading(true)
101
+ const {
102
+ to,
103
+ first_name,
104
+ last_name,
105
+ email,
106
+ confirm_email,
107
+ confirm,
108
+ } = values
109
+ const formData = new FormData()
110
+ formData.append('to', to)
111
+ formData.append('first_name', first_name)
112
+ formData.append('last_name', last_name)
113
+ formData.append('email', email)
114
+ formData.append('confirm_email', confirm_email)
115
+ formData.append('confirm', String(confirm))
116
+
117
+ await resaleTicket(formData, activeTicket.hash)
118
+ const updatedData = { ...data }
119
+ updatedData?.tickets?.forEach((ticket: ITicketTypes) => {
120
+ if (ticket.hash === activeTicket.hash) {
121
+ ticket.is_sellable = false
122
+ ticket.is_on_sale = true
123
+ }
124
+ })
125
+
126
+ setData(updatedData)
127
+ } catch (error) {
128
+ // ...
129
+ } finally {
130
+ setShowResaleModal(false)
131
+ setLoading(false)
132
+ }
133
+ }
134
+
135
+ const handleRemoveFromResale = (ticket: ITicketTypes) => {
136
+ setShowRemoveResaleModal(true)
137
+ setActiveTicket(ticket)
138
+ }
139
+
140
+ const onCloseRemoveResale = () => {
141
+ setShowRemoveResaleModal(false)
142
+ setActiveTicket(null)
143
+ }
144
+
145
+ const onConfirmRemoveResale = async () => {
146
+ try {
147
+ setLoading(true)
148
+ await removeFromResale(activeTicket.hash)
149
+ const updatedData = { ...data }
150
+ updatedData?.tickets?.forEach((ticket: ITicketTypes) => {
151
+ if (ticket.hash === activeTicket.hash) {
152
+ ticket.is_sellable = true
153
+ ticket.is_on_sale = false
154
+ }
155
+ })
156
+
157
+ setData(updatedData)
158
+ } catch (error) {
159
+ // ...
160
+ } finally {
161
+ setShowRemoveResaleModal(false)
162
+ setLoading(false)
163
+ }
164
+ }
165
+
166
+ let orderSummery = `ID ${data.id}, placed`
167
+ if (data.date) {
168
+ orderSummery += ` ${data.date}`
169
+ }
170
+
171
+ return (
172
+ <div className="order-details">
173
+ {loading ? (
174
+ <div className="loading">
175
+ <CircularProgress />
176
+ </div>
177
+ ) : (
178
+ <>
179
+ <h1 className="layout-title">Order Details</h1>
180
+ <div className="order-summary-box">
181
+ <div className="summary-block">
182
+ <div className="summary-item">
183
+ <h6 className="sub-title">Order Summary</h6>
184
+ <p>{orderSummery}</p>
185
+ </div>
186
+ <div className="summary-item">
187
+ <div className="return-button-container">
188
+ <button
189
+ type="button"
190
+ className="return-button"
191
+ onClick={() => {
192
+ if (typeof window !== 'undefined') {
193
+ window.location.assign('/orders')
194
+ }
195
+ }}
196
+ >
197
+ Back to Orders
198
+ </button>
199
+ </div>
200
+ </div>
201
+ </div>
202
+ <div className="personal-link">
203
+ <div className="link-item">
204
+ <span>Personal Share Link: </span>
205
+ <a
206
+ href={data?.personal_share_link}
207
+ target="_blank"
208
+ rel="noreferrer"
209
+ >
210
+ {Boolean(personalLinkIcon) && (
211
+ <img src={personalLinkIcon} alt="Icon" />
212
+ )}
213
+ {data?.personal_share_link}
214
+ </a>
215
+ </div>
216
+ <div className="link-item">
217
+ <p>{`So far, you’ve referred ${data.sales_referred} tickets`}</p>
218
+ </div>
219
+ </div>
220
+ <TableContainer component={Paper}>
221
+ <Table className="tt-type" aria-label="collapsible table">
222
+ <TableHead>
223
+ <TableRow>
224
+ {_map(columns, item => (
225
+ <TableCell>{item.label || ''}</TableCell>
226
+ ))}
227
+ </TableRow>
228
+ </TableHead>
229
+ <TableBody>
230
+ {data?.items?.ticket_types?.map(
231
+ (ticket: TicketTypes, index: number) => (
232
+ <TableRow key={index}>
233
+ <TableCell>
234
+ <b>Ticket Type: </b>
235
+ {ticket.name}
236
+ </TableCell>
237
+ <TableCell>{ticket.currency + ticket.price}</TableCell>
238
+ <TableCell>{ticket.quantity}</TableCell>
239
+ <TableCell>{ticket.currency + ticket.total}</TableCell>
240
+ </TableRow>
241
+ )
242
+ )}
243
+ {data?.items?.add_ons?.map(
244
+ (ticket: TicketTypes, index: number) => (
245
+ <TableRow key={index}>
246
+ <TableCell>
247
+ <b>Add-On: </b>
248
+ {ticket.name}
249
+ </TableCell>
250
+ <TableCell>{ticket.currency + ticket.price}</TableCell>
251
+ <TableCell>{ticket.quantity}</TableCell>
252
+ <TableCell>{ticket.currency + ticket.total}</TableCell>
253
+ </TableRow>
254
+ )
255
+ )}
256
+ <TableRow className="total-row">
257
+ <TableCell />
258
+ <TableCell />
259
+ <TableCell>Total</TableCell>
260
+ <TableCell>{getTotal(data)}</TableCell>
261
+ </TableRow>
262
+ </TableBody>
263
+ </Table>
264
+ </TableContainer>
265
+ </div>
266
+ <TicketsTable
267
+ tickets={data.tickets}
268
+ handleSellTicket={handleSellTicket}
269
+ handleRemoveFromResale={handleRemoveFromResale}
270
+ />
271
+ </>
272
+ )}
273
+ {showResaleModal && (
274
+ <TicketResaleModal
275
+ ticket={activeTicket}
276
+ onClose={handleOnClose}
277
+ onSubmit={handleOnSubmit}
278
+ />
279
+ )}
280
+ {showRemoveResaleModal && (
281
+ <ConfirmModal
282
+ message="Are you sure you want to withdraw your ticket from resale?"
283
+ onClose={onCloseRemoveResale}
284
+ onConfirm={onConfirmRemoveResale}
285
+ />
286
+ )}
287
+ </div>
288
+ )
289
+ }