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,56 +1,74 @@
1
- import React, { useEffect, useState } from 'react'
2
- import _get from 'lodash/get'
3
- import { checkTicketStatus } from '../../api'
4
- import { AxiosError } from 'axios'
5
-
6
- export interface ITicketResaleContainer {
7
- onCheckTicketStatusSuccess: (res: any) => void
8
- onCheckTicketStatusError: (e: AxiosError) => void
9
- orderHash?: string
10
- }
11
-
12
- export const TicketResaleContainer = ({
13
- onCheckTicketStatusSuccess = () => {},
14
- onCheckTicketStatusError = () => {},
15
- orderHash,
16
- }: ITicketResaleContainer) => {
17
- const isWindowDefined = typeof window !== 'undefined'
18
- const [error, setError] = useState(null)
19
-
20
- useEffect(() => {
21
- (async () => {
22
- if (isWindowDefined) {
23
- const params: URLSearchParams = new URL(`${window.location}`)
24
- .searchParams
25
- const hash = params.get('o') || orderHash || null
26
-
27
- if (hash) {
28
- try {
29
- const response = await checkTicketStatus(hash)
30
- const data = _get(response, 'data.data.attributes')
31
- const age_required = _get(data, 'age_required', false)
32
- const names_required = _get(data, 'names_required', false)
33
- const event_id = _get(data, 'event_id')
34
-
35
- onCheckTicketStatusSuccess(response.data)
36
- window.location.href = `/billing/billing-info/?age_required=${age_required}&names_required=${names_required}&event_id=${event_id}`
37
- } catch (error) {
38
- console.log(error)
39
- setError(error?.response?.data?.message)
40
- onCheckTicketStatusError(error.response)
41
- }
42
- } else {
43
- window.location.href = '/'
44
- }
45
- }
46
- })()
47
- }, [])
48
-
49
- return (
50
- <div className="ticket-resale-page">
51
- <div className="error-block">
52
- <h3>{error}</h3>
53
- </div>
54
- </div>
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,213 @@
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
- return (
81
- <Modal
82
- open={true}
83
- onClose={onClose}
84
- aria-labelledby="modal-modal-title"
85
- aria-describedby="modal-modal-description"
86
- className='resale-modal'
87
- >
88
- <Box style={style}>
89
- <h3>Sell Ticket</h3>
90
- <div>
91
- <h3>Ticket Details</h3>
92
- <div>
93
- <h4>Event</h4>
94
- <p>{event_name}</p>
95
- </div>
96
- <div>
97
- <h4>Ticket Holder</h4>
98
- <p>{holder_name}</p>
99
- </div>
100
- <div>
101
- <h4>Ticket ID</h4>
102
- <p>{hash}</p>
103
- </div>
104
- </div>
105
- <div>
106
- <h3>Sell to Whom</h3>
107
- <Formik
108
- initialValues={initialValues}
109
- validationSchema={schema}
110
- onSubmit={onSubmit}
111
- >
112
- {({ values, isValid, dirty }) => (
113
- <Form>
114
- <div>
115
- <Field
116
- name='to'
117
- label='I want to sell the ticket to someone I know'
118
- type='radio'
119
- value='friend'
120
- component={RadioField}
121
- />
122
- {values.to === 'friend' && (
123
- <div className='sell-to-friend'>
124
- <div className='user-info-box'>
125
- <div className='field-box'>
126
- <div className='icon'>
127
- <SVG
128
- src={getImage('user.svg')}
129
- width='24'
130
- height='24'
131
- />
132
- </div>
133
- <Field
134
- name='first_name'
135
- label='First Name'
136
- type='text'
137
- component={CustomField}
138
- />
139
- </div>
140
- <div className='field-box'>
141
- <div className='empty-box' />
142
- <Field
143
- name='last_name'
144
- label='Last Name'
145
- type='text'
146
- component={CustomField}
147
- />
148
- </div>
149
- </div>
150
- <div className='email-info-box'>
151
- <div className='field-box'>
152
- <div className='icon'>
153
- <SVG
154
- src={getImage('email.svg')}
155
- width='24'
156
- height='24'
157
- />
158
- </div>
159
- <Field
160
- name='email'
161
- label='Email address'
162
- type='text'
163
- component={CustomField}
164
- />
165
- </div>
166
- <div className='field-box'>
167
- <div className='empty-box' />
168
- <Field
169
- name='confirm_email'
170
- label='Confirm Email address'
171
- type='text'
172
- component={CustomField}
173
- />
174
- </div>
175
- </div>
176
- </div>
177
- )}
178
- </div>
179
- <div>
180
- <Field
181
- name='to'
182
- label='I will sell my ticket to anyone who wants to buy it'
183
- type='radio'
184
- value='anyone'
185
- component={RadioField}
186
- />
187
- </div>
188
- <div>
189
- <h4>Terms of Resale</h4>
190
- <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>
191
- <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>
192
- <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>
193
- <Field
194
- name='confirm'
195
- label='I agree'
196
- type='checkbox'
197
- component={CheckboxField}
198
- />
199
- </div>
200
- <div className="resale-action-button">
201
- <Button type="submit" disabled={!(isValid && dirty)}>Sell Ticket</Button>
202
- </div>
203
- </Form>
204
- )}
205
- </Formik>
206
- </div>
207
- </Box>
208
- </Modal>
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
+ {ticket_type_is_active && (
181
+ <div>
182
+ <Field
183
+ name="to"
184
+ label="I will sell my ticket to anyone who wants to buy it"
185
+ type="radio"
186
+ value="anyone"
187
+ component={RadioField}
188
+ />
189
+ </div>
190
+ )}
191
+ <div>
192
+ <h4>Terms of Resale</h4>
193
+ <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>
194
+ <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>
195
+ <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>
196
+ <Field
197
+ name='confirm'
198
+ label='I agree'
199
+ type='checkbox'
200
+ component={CheckboxField}
201
+ />
202
+ </div>
203
+ <div className="resale-action-button">
204
+ <Button type="submit" disabled={!(isValid && dirty)}>Sell Ticket</Button>
205
+ </div>
206
+ </Form>
207
+ )}
208
+ </Formik>
209
+ </div>
210
+ </Box>
211
+ </Modal>
212
+ )
213
+ }
@@ -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
+ }