tf-checkout-react 1.0.103 → 1.0.106
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/dist/api/index.d.ts +3 -1
- package/dist/components/common/CustomField.d.ts +1 -1
- package/dist/components/common/DatePickerField.d.ts +14 -0
- package/dist/components/common/RedirectModal.d.ts +7 -0
- package/dist/components/countdown/index.d.ts +3 -1
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -0
- package/dist/components/rsvpContainer/index.d.ts +7 -0
- package/dist/components/ticketResale/index.d.ts +5 -3
- package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +5 -9
- package/dist/components/ticketsContainer/TicketsSection.d.ts +6 -3
- package/dist/components/ticketsContainer/index.d.ts +9 -2
- package/dist/components/timerWidget/index.d.ts +3 -3
- package/dist/images/cross.svg +44 -0
- package/dist/images/done.svg +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +639 -223
- 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 +645 -231
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +89 -89
- package/src/.DS_Store +0 -0
- package/src/.d.ts +2 -2
- package/src/api/index.ts +300 -278
- package/src/assets/images/cross.svg +44 -0
- package/src/assets/images/done.svg +3 -3
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +811 -799
- package/src/components/billing-info-container/style.css +105 -105
- package/src/components/billing-info-container/utils.ts +225 -224
- package/src/components/common/CheckboxField.tsx +41 -41
- package/src/components/common/CustomField.tsx +87 -84
- package/src/components/common/DatePickerField.tsx +98 -0
- package/src/components/common/FormikPhoneNumberField.tsx +51 -51
- package/src/components/common/Loader.tsx +9 -9
- package/src/components/common/RadioField.tsx +35 -35
- package/src/components/common/RedirectModal.tsx +43 -0
- package/src/components/common/SelectField.tsx +80 -80
- package/src/components/common/SnackbarAlert.tsx +53 -53
- package/src/components/common/index.tsx +4 -4
- package/src/components/confirmModal/index.tsx +51 -51
- package/src/components/confirmModal/style.css +21 -21
- package/src/components/confirmationContainer/config.ts +72 -72
- package/src/components/confirmationContainer/index.tsx +197 -197
- package/src/components/confirmationContainer/social-buttons.tsx +94 -94
- package/src/components/confirmationContainer/style.css +202 -202
- package/src/components/countdown/index.tsx +98 -89
- package/src/components/countdown/style.css +9 -9
- package/src/components/index.ts +7 -7
- package/src/components/loginModal/index.tsx +209 -209
- package/src/components/loginModal/style.css +71 -71
- package/src/components/myTicketsContainer/index.tsx +196 -196
- package/src/components/myTicketsContainer/row.tsx +41 -41
- package/src/components/myTicketsContainer/style.css +39 -39
- package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
- package/src/components/orderDetailsContainer/index.tsx +252 -249
- package/src/components/orderDetailsContainer/style.css +72 -72
- package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -124
- package/src/components/paymentContainer/index.tsx +285 -284
- package/src/components/registerModal/index.tsx +190 -190
- package/src/components/rsvpContainer/index.tsx +126 -0
- package/src/components/stripePayment/index.tsx +254 -253
- package/src/components/stripePayment/style.css +59 -59
- package/src/components/ticketResale/index.tsx +74 -56
- package/src/components/ticketResaleModal/index.tsx +215 -210
- package/src/components/ticketResaleModal/style.css +28 -28
- package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +88 -99
- package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
- package/src/components/ticketsContainer/TicketRow.tsx +83 -83
- package/src/components/ticketsContainer/TicketsSection.tsx +90 -81
- package/src/components/ticketsContainer/index.tsx +464 -430
- package/src/components/ticketsContainer/style.css +181 -181
- package/src/components/ticketsContainer/utils.ts +11 -11
- package/src/components/timerWidget/index.tsx +87 -70
- package/src/components/timerWidget/style.css +34 -26
- package/src/components/waitingList/index.tsx +178 -178
- package/src/components/waitingList/style.css +26 -26
- package/src/env.ts +20 -20
- package/src/index.ts +15 -13
- package/src/normalizers/index.ts +45 -45
- package/src/types/billing-info-data.ts +37 -37
- package/src/types/payment-field.ts +7 -7
- package/src/types/referral-promotion.ts +7 -7
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
- package/src/utils/downloadPDF.tsx +30 -30
- package/src/utils/formikErrorFocus.ts +24 -24
- package/src/utils/getImage.ts +14 -14
- package/src/utils/getQueryVariable.ts +13 -13
- package/src/utils/index.ts +5 -5
- package/src/utils/setConfigs.ts +26 -26
- package/src/utils/showZero.tsx +10 -10
- package/src/validators/index.ts +20 -20
|
@@ -1,56 +1,74 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import _get from 'lodash/get'
|
|
3
|
-
import {
|
|
4
|
-
import { AxiosError } from 'axios'
|
|
5
|
-
|
|
6
|
-
export interface ITicketResaleContainer {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import _get from 'lodash/get'
|
|
3
|
+
import { processTicket, declineInvitation } from '../../api'
|
|
4
|
+
import { AxiosError } from 'axios'
|
|
5
|
+
|
|
6
|
+
export interface ITicketResaleContainer {
|
|
7
|
+
onProcessTicketSuccess: (res: any) => void
|
|
8
|
+
onProcessTicketError: (e: AxiosError) => void
|
|
9
|
+
onDeclineTicketPurchaseSuccess: (res: any) => void
|
|
10
|
+
onDeclineTicketPurchaseError: (e: AxiosError) => void
|
|
11
|
+
orderHash?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const TicketResaleContainer = ({
|
|
15
|
+
onProcessTicketSuccess = () => {},
|
|
16
|
+
onProcessTicketError = () => {},
|
|
17
|
+
onDeclineTicketPurchaseSuccess = () => {},
|
|
18
|
+
onDeclineTicketPurchaseError = () => {},
|
|
19
|
+
orderHash,
|
|
20
|
+
}: ITicketResaleContainer) => {
|
|
21
|
+
const isWindowDefined = typeof window !== 'undefined'
|
|
22
|
+
const [error, setError] = useState('')
|
|
23
|
+
const [successMessage, setSuccessMessage] = useState('')
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
(async () => {
|
|
27
|
+
if (isWindowDefined) {
|
|
28
|
+
const params: URLSearchParams = new URL(`${window.location}`)
|
|
29
|
+
.searchParams
|
|
30
|
+
const hash = params.get('invitation_hash') || orderHash || null
|
|
31
|
+
const isDeclined = params.get('decline') || false
|
|
32
|
+
|
|
33
|
+
if (hash) {
|
|
34
|
+
// Process of declining ticket purchase invitation
|
|
35
|
+
if (isDeclined) {
|
|
36
|
+
try {
|
|
37
|
+
const response = await declineInvitation(hash)
|
|
38
|
+
onDeclineTicketPurchaseSuccess(response)
|
|
39
|
+
setSuccessMessage("Thanks for letting us know! We'll offer this ticket to someone else!")
|
|
40
|
+
} catch (error) {
|
|
41
|
+
setError(error?.response?.data?.message)
|
|
42
|
+
onDeclineTicketPurchaseError(error.response)
|
|
43
|
+
}
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const response = await processTicket(hash)
|
|
49
|
+
const data = _get(response, 'data.data.attributes')
|
|
50
|
+
const age_required = _get(data, 'age_required', false)
|
|
51
|
+
const names_required = _get(data, 'names_required', false)
|
|
52
|
+
const event_id = _get(data, 'event_id')
|
|
53
|
+
|
|
54
|
+
onProcessTicketSuccess(response.data)
|
|
55
|
+
window.location.href = `/billing/billing-info/?age_required=${age_required}&names_required=${names_required}&event_id=${event_id}`
|
|
56
|
+
} catch (error) {
|
|
57
|
+
setError(error?.response?.data?.message)
|
|
58
|
+
onProcessTicketError(error.response)
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
window.location.href = '/'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
})()
|
|
65
|
+
}, [])
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div className="ticket-resale-page">
|
|
69
|
+
<div className={`${successMessage ? 'success-block': 'error-block'}`}>
|
|
70
|
+
<h3>{successMessage ? successMessage : error}</h3>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -1,210 +1,215 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Field, Form, Formik } from 'formik'
|
|
3
|
-
import * as yup from 'yup';
|
|
4
|
-
import Modal from '@mui/material/Modal'
|
|
5
|
-
import Box from '@mui/material/Box'
|
|
6
|
-
import Button from '@mui/material/Button';
|
|
7
|
-
import { RadioField } from '../common/RadioField'
|
|
8
|
-
import { CheckboxField } from '../common/CheckboxField'
|
|
9
|
-
import { CustomField } from '../common/CustomField'
|
|
10
|
-
import SVG from 'react-inlinesvg'
|
|
11
|
-
import { getImage } from '../../utils/getImage'
|
|
12
|
-
import { ITicketTypes } from '../orderDetailsContainer/ticketsTable'
|
|
13
|
-
import './style.css'
|
|
14
|
-
|
|
15
|
-
interface Props {
|
|
16
|
-
ticket: ITicketTypes;
|
|
17
|
-
onClose: () => void;
|
|
18
|
-
onSubmit: (values: InitialValuesTypes) => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface InitialValuesTypes {
|
|
22
|
-
to: string;
|
|
23
|
-
first_name: string;
|
|
24
|
-
last_name: string;
|
|
25
|
-
email: string;
|
|
26
|
-
confirm_email: string;
|
|
27
|
-
confirm: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const style: React.CSSProperties = {
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
top: '50%',
|
|
33
|
-
left: '50%',
|
|
34
|
-
transform: 'translate(-50%, -50%)',
|
|
35
|
-
minWidth: 480,
|
|
36
|
-
backgroundColor: '#e3e3e3',
|
|
37
|
-
border: '1px solid white',
|
|
38
|
-
outline: 'none',
|
|
39
|
-
padding: '14px',
|
|
40
|
-
maxHeight: '85vh',
|
|
41
|
-
overflow: 'auto'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const schema = yup.object().shape({
|
|
45
|
-
to: yup.string().required(),
|
|
46
|
-
first_name: yup.string().when('to', {
|
|
47
|
-
is: (to: string) => to === 'friend',
|
|
48
|
-
then: yup.string().required('First Name is required')
|
|
49
|
-
}),
|
|
50
|
-
last_name: yup.string().when('to', {
|
|
51
|
-
is: (to: string) => to === 'friend',
|
|
52
|
-
then: yup.string().required('Last Name is required')
|
|
53
|
-
}),
|
|
54
|
-
email: yup.string().when('to', {
|
|
55
|
-
is: (to: string) => to === 'friend',
|
|
56
|
-
then: yup.string().email('Invalid email').required('Email is required')
|
|
57
|
-
}),
|
|
58
|
-
confirm_email: yup.string().when('to', {
|
|
59
|
-
is: (to: string) => to === 'friend',
|
|
60
|
-
then: yup.string().email('Invalid email').oneOf([yup.ref('email'), null], 'Emails must match').required('Confirm Email is required')
|
|
61
|
-
}),
|
|
62
|
-
confirm: yup.boolean().oneOf([true])
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const initialValues: InitialValuesTypes = {
|
|
66
|
-
to: 'friend',
|
|
67
|
-
first_name: '',
|
|
68
|
-
last_name: '',
|
|
69
|
-
email: '',
|
|
70
|
-
confirm_email: '',
|
|
71
|
-
confirm: false
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const TicketResaleModal = ({
|
|
75
|
-
ticket = {} as ITicketTypes,
|
|
76
|
-
onClose = () => {},
|
|
77
|
-
onSubmit = () => {},
|
|
78
|
-
}: Props) => {
|
|
79
|
-
const { hash, holder_name, event_name, currency, resale_fee_amount } = ticket
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
aria-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Field, Form, Formik } from 'formik'
|
|
3
|
+
import * as yup from 'yup';
|
|
4
|
+
import Modal from '@mui/material/Modal'
|
|
5
|
+
import Box from '@mui/material/Box'
|
|
6
|
+
import Button from '@mui/material/Button';
|
|
7
|
+
import { RadioField } from '../common/RadioField'
|
|
8
|
+
import { CheckboxField } from '../common/CheckboxField'
|
|
9
|
+
import { CustomField } from '../common/CustomField'
|
|
10
|
+
import SVG from 'react-inlinesvg'
|
|
11
|
+
import { getImage } from '../../utils/getImage'
|
|
12
|
+
import { ITicketTypes } from '../orderDetailsContainer/ticketsTable'
|
|
13
|
+
import './style.css'
|
|
14
|
+
|
|
15
|
+
interface Props {
|
|
16
|
+
ticket: ITicketTypes;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
onSubmit: (values: InitialValuesTypes) => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface InitialValuesTypes {
|
|
22
|
+
to: string;
|
|
23
|
+
first_name: string;
|
|
24
|
+
last_name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
confirm_email: string;
|
|
27
|
+
confirm: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const style: React.CSSProperties = {
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
top: '50%',
|
|
33
|
+
left: '50%',
|
|
34
|
+
transform: 'translate(-50%, -50%)',
|
|
35
|
+
minWidth: 480,
|
|
36
|
+
backgroundColor: '#e3e3e3',
|
|
37
|
+
border: '1px solid white',
|
|
38
|
+
outline: 'none',
|
|
39
|
+
padding: '14px',
|
|
40
|
+
maxHeight: '85vh',
|
|
41
|
+
overflow: 'auto'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const schema = yup.object().shape({
|
|
45
|
+
to: yup.string().required(),
|
|
46
|
+
first_name: yup.string().when('to', {
|
|
47
|
+
is: (to: string) => to === 'friend',
|
|
48
|
+
then: yup.string().required('First Name is required')
|
|
49
|
+
}),
|
|
50
|
+
last_name: yup.string().when('to', {
|
|
51
|
+
is: (to: string) => to === 'friend',
|
|
52
|
+
then: yup.string().required('Last Name is required')
|
|
53
|
+
}),
|
|
54
|
+
email: yup.string().when('to', {
|
|
55
|
+
is: (to: string) => to === 'friend',
|
|
56
|
+
then: yup.string().email('Invalid email').required('Email is required')
|
|
57
|
+
}),
|
|
58
|
+
confirm_email: yup.string().when('to', {
|
|
59
|
+
is: (to: string) => to === 'friend',
|
|
60
|
+
then: yup.string().email('Invalid email').oneOf([yup.ref('email'), null], 'Emails must match').required('Confirm Email is required')
|
|
61
|
+
}),
|
|
62
|
+
confirm: yup.boolean().oneOf([true])
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const initialValues: InitialValuesTypes = {
|
|
66
|
+
to: 'friend',
|
|
67
|
+
first_name: '',
|
|
68
|
+
last_name: '',
|
|
69
|
+
email: '',
|
|
70
|
+
confirm_email: '',
|
|
71
|
+
confirm: false
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const TicketResaleModal = ({
|
|
75
|
+
ticket = {} as ITicketTypes,
|
|
76
|
+
onClose = () => {},
|
|
77
|
+
onSubmit = () => {},
|
|
78
|
+
}: Props) => {
|
|
79
|
+
const { hash, holder_name, event_name, currency, resale_fee_amount, ticket_type_is_active } = ticket
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<Modal
|
|
83
|
+
open={true}
|
|
84
|
+
onClose={onClose}
|
|
85
|
+
aria-labelledby="modal-modal-title"
|
|
86
|
+
aria-describedby="modal-modal-description"
|
|
87
|
+
className='resale-modal'
|
|
88
|
+
>
|
|
89
|
+
<Box style={style}>
|
|
90
|
+
<h3>Sell Ticket</h3>
|
|
91
|
+
<div>
|
|
92
|
+
<h3>Ticket Details</h3>
|
|
93
|
+
<div>
|
|
94
|
+
<h4>Event</h4>
|
|
95
|
+
<p>{event_name}</p>
|
|
96
|
+
</div>
|
|
97
|
+
<div>
|
|
98
|
+
<h4>Ticket Holder</h4>
|
|
99
|
+
<p>{holder_name}</p>
|
|
100
|
+
</div>
|
|
101
|
+
<div>
|
|
102
|
+
<h4>Ticket ID</h4>
|
|
103
|
+
<p>{hash}</p>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<div>
|
|
107
|
+
<h3>Sell to Whom</h3>
|
|
108
|
+
<Formik
|
|
109
|
+
initialValues={initialValues}
|
|
110
|
+
validationSchema={schema}
|
|
111
|
+
onSubmit={onSubmit}
|
|
112
|
+
>
|
|
113
|
+
{({ values, isValid, dirty }) => (
|
|
114
|
+
<Form>
|
|
115
|
+
<div>
|
|
116
|
+
<Field
|
|
117
|
+
name='to'
|
|
118
|
+
label='I want to sell the ticket to someone I know'
|
|
119
|
+
type='radio'
|
|
120
|
+
value='friend'
|
|
121
|
+
component={RadioField}
|
|
122
|
+
/>
|
|
123
|
+
{values.to === 'friend' && (
|
|
124
|
+
<div className='sell-to-friend'>
|
|
125
|
+
<div className='user-info-box'>
|
|
126
|
+
<div className='field-box'>
|
|
127
|
+
<div className='icon'>
|
|
128
|
+
<SVG
|
|
129
|
+
src={getImage('user.svg')}
|
|
130
|
+
width='24'
|
|
131
|
+
height='24'
|
|
132
|
+
/>
|
|
133
|
+
</div>
|
|
134
|
+
<Field
|
|
135
|
+
name='first_name'
|
|
136
|
+
label='First Name'
|
|
137
|
+
type='text'
|
|
138
|
+
component={CustomField}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
<div className='field-box'>
|
|
142
|
+
<div className='empty-box' />
|
|
143
|
+
<Field
|
|
144
|
+
name='last_name'
|
|
145
|
+
label='Last Name'
|
|
146
|
+
type='text'
|
|
147
|
+
component={CustomField}
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div className='email-info-box'>
|
|
152
|
+
<div className='field-box'>
|
|
153
|
+
<div className='icon'>
|
|
154
|
+
<SVG
|
|
155
|
+
src={getImage('email.svg')}
|
|
156
|
+
width='24'
|
|
157
|
+
height='24'
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
<Field
|
|
161
|
+
name='email'
|
|
162
|
+
label='Email address'
|
|
163
|
+
type='text'
|
|
164
|
+
component={CustomField}
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
<div className='field-box'>
|
|
168
|
+
<div className='empty-box' />
|
|
169
|
+
<Field
|
|
170
|
+
name='confirm_email'
|
|
171
|
+
label='Confirm Email address'
|
|
172
|
+
type='text'
|
|
173
|
+
component={CustomField}
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
)}
|
|
179
|
+
</div>
|
|
180
|
+
{
|
|
181
|
+
ticket_type_is_active && (
|
|
182
|
+
<div>
|
|
183
|
+
<Field
|
|
184
|
+
name='to'
|
|
185
|
+
label='I will sell my ticket to anyone who wants to buy it'
|
|
186
|
+
type='radio'
|
|
187
|
+
value='anyone'
|
|
188
|
+
component={RadioField}
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
<div>
|
|
194
|
+
<h4>Terms of Resale</h4>
|
|
195
|
+
<p>I confirm that I want to sell this ticket and that, if someone chooses to buy it, I will no longer own it or have the right to ask for it back.</p>
|
|
196
|
+
<p>I also understand that, if no one chooses to buy it, it remains my property, is valid for entry to <strong>{event_name}</strong> and I will not receive any refund.</p>
|
|
197
|
+
<p>If my ticket is sold, the original card I used to buy my ticket will be refunded with the original amount paid, minus a small handling fee of <strong>{currency + resale_fee_amount}</strong>, and that any existing refunds due to me for referring sales for this event are no longer valid.</p>
|
|
198
|
+
<Field
|
|
199
|
+
name='confirm'
|
|
200
|
+
label='I agree'
|
|
201
|
+
type='checkbox'
|
|
202
|
+
component={CheckboxField}
|
|
203
|
+
/>
|
|
204
|
+
</div>
|
|
205
|
+
<div className="resale-action-button">
|
|
206
|
+
<Button type="submit" disabled={!(isValid && dirty)}>Sell Ticket</Button>
|
|
207
|
+
</div>
|
|
208
|
+
</Form>
|
|
209
|
+
)}
|
|
210
|
+
</Formik>
|
|
211
|
+
</div>
|
|
212
|
+
</Box>
|
|
213
|
+
</Modal>
|
|
214
|
+
)
|
|
215
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
.resale-modal .field-box {
|
|
2
|
-
margin-bottom: 10px;
|
|
3
|
-
display: flex;
|
|
4
|
-
}
|
|
5
|
-
.resale-modal .field-box .icon {
|
|
6
|
-
height: 56px;
|
|
7
|
-
min-width: 44px;
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
align-items: center;
|
|
11
|
-
}
|
|
12
|
-
.resale-modal .field-box .empty-box {
|
|
13
|
-
min-width: 44px;
|
|
14
|
-
}
|
|
15
|
-
.resale-modal .resale-action-button button {
|
|
16
|
-
width: 100%;
|
|
17
|
-
color: white;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
background-color: #212529;
|
|
20
|
-
}
|
|
21
|
-
.resale-modal .resale-action-button button[disabled] {
|
|
22
|
-
opacity: .7;
|
|
23
|
-
}
|
|
24
|
-
.resale-modal .resale-action-button button:hover {
|
|
25
|
-
width: 100%;
|
|
26
|
-
background-color: #505050;
|
|
27
|
-
border-color: #505050;
|
|
28
|
-
}
|
|
1
|
+
.resale-modal .field-box {
|
|
2
|
+
margin-bottom: 10px;
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
.resale-modal .field-box .icon {
|
|
6
|
+
height: 56px;
|
|
7
|
+
min-width: 44px;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
.resale-modal .field-box .empty-box {
|
|
13
|
+
min-width: 44px;
|
|
14
|
+
}
|
|
15
|
+
.resale-modal .resale-action-button button {
|
|
16
|
+
width: 100%;
|
|
17
|
+
color: white;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
background-color: #212529;
|
|
20
|
+
}
|
|
21
|
+
.resale-modal .resale-action-button button[disabled] {
|
|
22
|
+
opacity: .7;
|
|
23
|
+
}
|
|
24
|
+
.resale-modal .resale-action-button button:hover {
|
|
25
|
+
width: 100%;
|
|
26
|
+
background-color: #505050;
|
|
27
|
+
border-color: #505050;
|
|
28
|
+
}
|