tf-checkout-react 1.0.52 → 1.0.56
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/components/billing-info-container/index.d.ts +3 -1
- package/dist/components/paymentContainer/index.d.ts +3 -1
- package/dist/tf-checkout-react.cjs.development.css +1 -1
- package/dist/tf-checkout-react.cjs.development.js +118 -71
- 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 +119 -72
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +74 -87
- package/src/components/billing-info-container/utils.ts +8 -0
- package/src/components/confirmationContainer/index.tsx +1 -1
- package/src/components/paymentContainer/index.tsx +5 -0
- package/src/components/stripePayment/index.tsx +41 -9
- package/src/components/waitingList/index.tsx +2 -1
- package/src/components/waitingList/style.css +6 -0
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -88,10 +88,12 @@ export interface IBillingInfoPage {
|
|
|
88
88
|
onAuthorizeError?: (e: AxiosError) => void;
|
|
89
89
|
|
|
90
90
|
onLogin?: () => void;
|
|
91
|
+
onLoginSuccess?: () => void;
|
|
91
92
|
|
|
92
93
|
initialValues?: FormikValues;
|
|
93
94
|
buttonName?: string;
|
|
94
95
|
theme?: 'light' | 'dark';
|
|
96
|
+
isLoggedIn?: boolean;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
const LogicRunner: FC<{
|
|
@@ -155,6 +157,9 @@ const LogicRunner: FC<{
|
|
|
155
157
|
city: parsedData?.city || '',
|
|
156
158
|
confirmPassword: '',
|
|
157
159
|
password: '',
|
|
160
|
+
'holderFirstName-0': parsedData?.first_name || '',
|
|
161
|
+
'holderLastName-0': parsedData?.last_name || '',
|
|
162
|
+
'holderEmail-0': parsedData?.email || '',
|
|
158
163
|
}
|
|
159
164
|
setValues(mappedValues)
|
|
160
165
|
setUserValues(mappedValues)
|
|
@@ -192,13 +197,16 @@ export const BillingInfoContainer = ({
|
|
|
192
197
|
onAuthorizeSuccess = () => {},
|
|
193
198
|
onAuthorizeError = () => {},
|
|
194
199
|
onLogin = () => {},
|
|
200
|
+
onLoginSuccess = () => {},
|
|
201
|
+
isLoggedIn: pIsLoggedIn = false,
|
|
195
202
|
}: IBillingInfoPage) => {
|
|
203
|
+
const isWindowDefined = typeof window !== 'undefined'
|
|
196
204
|
const userData =
|
|
197
|
-
|
|
205
|
+
isWindowDefined && window.localStorage.getItem('user_data')
|
|
198
206
|
? JSON.parse(window.localStorage.getItem('user_data') || '')
|
|
199
207
|
: {}
|
|
200
208
|
const access_token =
|
|
201
|
-
|
|
209
|
+
isWindowDefined && window.localStorage.getItem('access_token')
|
|
202
210
|
? window.localStorage.getItem('access_token') || ''
|
|
203
211
|
: ''
|
|
204
212
|
|
|
@@ -206,6 +214,7 @@ export const BillingInfoContainer = ({
|
|
|
206
214
|
IBillingInfoData[]
|
|
207
215
|
>(data)
|
|
208
216
|
|
|
217
|
+
const [isLoggedIn, setIsLoggedIn] = useState(!!access_token)
|
|
209
218
|
const [cartInfoData, setCartInfo] = useState<any>({})
|
|
210
219
|
const [countries, setCountries] = useState<any>([])
|
|
211
220
|
const [states, setStates] = useState<any>([])
|
|
@@ -229,7 +238,6 @@ export const BillingInfoContainer = ({
|
|
|
229
238
|
state: '',
|
|
230
239
|
zip: '',
|
|
231
240
|
})
|
|
232
|
-
const isLoggedIn = !!access_token
|
|
233
241
|
const emailLogged =
|
|
234
242
|
_get(userData, 'email', '') || _get(userValues, 'email', '')
|
|
235
243
|
const firstNameLogged =
|
|
@@ -238,7 +246,6 @@ export const BillingInfoContainer = ({
|
|
|
238
246
|
_get(userData, 'last_name', '') || _get(userValues, 'last_name', '')
|
|
239
247
|
|
|
240
248
|
const showDOB = getQueryVariable('age_required') === 'true'
|
|
241
|
-
const showTicketHolderName = getQueryVariable('names_required') === 'true'
|
|
242
249
|
const eventId = getQueryVariable('event_id')
|
|
243
250
|
const optedInFieldValue: boolean = _get(cartInfoData, 'optedIn', false)
|
|
244
251
|
const hideTtfOptIn: boolean = _get(cartInfoData, 'hide_ttf_opt_in', true)
|
|
@@ -255,6 +262,12 @@ export const BillingInfoContainer = ({
|
|
|
255
262
|
return qty
|
|
256
263
|
}
|
|
257
264
|
|
|
265
|
+
useEffect(() => {
|
|
266
|
+
if ((pIsLoggedIn || access_token) && !isLoggedIn) {
|
|
267
|
+
setIsLoggedIn(true)
|
|
268
|
+
}
|
|
269
|
+
}, [pIsLoggedIn, isLoggedIn, access_token])
|
|
270
|
+
|
|
258
271
|
//just once
|
|
259
272
|
useEffect(() => {
|
|
260
273
|
// fetch countries data
|
|
@@ -301,7 +314,7 @@ export const BillingInfoContainer = ({
|
|
|
301
314
|
// fetch user data
|
|
302
315
|
const fetchUserData = async (token: string) => {
|
|
303
316
|
try {
|
|
304
|
-
if (
|
|
317
|
+
if (isWindowDefined && token) {
|
|
305
318
|
const userDataResponse = await getProfileData(token)
|
|
306
319
|
const profileSpecifiedData = _get(userDataResponse, 'data.data')
|
|
307
320
|
const profileDataObj = setLoggedUserData(profileSpecifiedData)
|
|
@@ -346,7 +359,7 @@ export const BillingInfoContainer = ({
|
|
|
346
359
|
const updatedUserData = await getProfileData(access_token)
|
|
347
360
|
const profileSpecifiedData = _get(updatedUserData, 'data.data')
|
|
348
361
|
const profileDataObj = setLoggedUserData(profileSpecifiedData)
|
|
349
|
-
if (
|
|
362
|
+
if (isWindowDefined) {
|
|
350
363
|
window.localStorage.setItem(
|
|
351
364
|
'user_data',
|
|
352
365
|
JSON.stringify(profileDataObj)
|
|
@@ -375,7 +388,10 @@ export const BillingInfoContainer = ({
|
|
|
375
388
|
{ emailLogged, firstNameLogged, lastNameLogged },
|
|
376
389
|
showDOB
|
|
377
390
|
)
|
|
378
|
-
const bodyFormData = createRegisterFormData(
|
|
391
|
+
const bodyFormData = createRegisterFormData(
|
|
392
|
+
values,
|
|
393
|
+
checkoutBodyForRegistration
|
|
394
|
+
)
|
|
379
395
|
|
|
380
396
|
let access_token_register = null
|
|
381
397
|
try {
|
|
@@ -423,7 +439,7 @@ export const BillingInfoContainer = ({
|
|
|
423
439
|
const profileData = await getProfileData(access_token_register)
|
|
424
440
|
const profileSpecifiedData = _get(profileData, 'data.data')
|
|
425
441
|
const profileDataObj = setLoggedUserData(profileSpecifiedData)
|
|
426
|
-
if (
|
|
442
|
+
if (isWindowDefined) {
|
|
427
443
|
window.localStorage.setItem(
|
|
428
444
|
'user_data',
|
|
429
445
|
JSON.stringify(profileDataObj)
|
|
@@ -449,7 +465,7 @@ export const BillingInfoContainer = ({
|
|
|
449
465
|
} catch (e) {
|
|
450
466
|
if (axios.isAxiosError(e)) {
|
|
451
467
|
if (e.response?.data.error === 'invalid_token') {
|
|
452
|
-
if (
|
|
468
|
+
if (isWindowDefined) {
|
|
453
469
|
window.localStorage.removeItem('user_data')
|
|
454
470
|
window.localStorage.removeItem('access_token')
|
|
455
471
|
setUserExpired(true)
|
|
@@ -499,45 +515,16 @@ export const BillingInfoContainer = ({
|
|
|
499
515
|
)}
|
|
500
516
|
{_map(dataWithUniqueIds, item => {
|
|
501
517
|
const { label, labelClassName, fields } = item
|
|
502
|
-
if (
|
|
503
|
-
label === 'Ticket Holders' &&
|
|
504
|
-
!showTicketHolderName &&
|
|
505
|
-
!showDOB
|
|
506
|
-
) {
|
|
507
|
-
return null
|
|
508
|
-
}
|
|
509
518
|
return (
|
|
510
519
|
<React.Fragment key={item.uniqueId}>
|
|
511
520
|
<p className={labelClassName}>{label}</p>
|
|
512
521
|
{_map(fields, group => {
|
|
513
|
-
const {
|
|
514
|
-
groupClassname,
|
|
515
|
-
groupItems,
|
|
516
|
-
groupLabel,
|
|
517
|
-
groupLabelClassName,
|
|
518
|
-
} = group
|
|
522
|
+
const { groupClassname, groupItems } = group
|
|
519
523
|
return (
|
|
520
524
|
<React.Fragment key={group.uniqueId}>
|
|
521
|
-
{!isLoggedIn && (
|
|
522
|
-
<div className={groupLabelClassName}>
|
|
523
|
-
{groupLabel}
|
|
524
|
-
</div>
|
|
525
|
-
)}
|
|
526
525
|
<div className={groupClassname}>
|
|
527
526
|
{_map(
|
|
528
527
|
groupItems.filter(el => {
|
|
529
|
-
if (
|
|
530
|
-
el.name === 'holderFirstName' &&
|
|
531
|
-
!showTicketHolderName
|
|
532
|
-
) {
|
|
533
|
-
return false
|
|
534
|
-
}
|
|
535
|
-
if (
|
|
536
|
-
el.name === 'holderLastName' &&
|
|
537
|
-
!showTicketHolderName
|
|
538
|
-
) {
|
|
539
|
-
return false
|
|
540
|
-
}
|
|
541
528
|
if (el.name === 'holderAge' && !showDOB) {
|
|
542
529
|
return false
|
|
543
530
|
}
|
|
@@ -547,9 +534,12 @@ export const BillingInfoContainer = ({
|
|
|
547
534
|
return true
|
|
548
535
|
}),
|
|
549
536
|
element =>
|
|
550
|
-
[
|
|
551
|
-
|
|
552
|
-
|
|
537
|
+
[
|
|
538
|
+
'password',
|
|
539
|
+
'confirmPassword',
|
|
540
|
+
'password-info',
|
|
541
|
+
].includes(element.name) &&
|
|
542
|
+
isLoggedIn ? null : (
|
|
553
543
|
<React.Fragment key={element.uniqueId}>
|
|
554
544
|
{element.name === 'email' ? (
|
|
555
545
|
<div className="email-checking">
|
|
@@ -598,53 +588,49 @@ export const BillingInfoContainer = ({
|
|
|
598
588
|
</React.Fragment>
|
|
599
589
|
)
|
|
600
590
|
})}
|
|
601
|
-
|
|
602
|
-
<
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
{
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
<div
|
|
613
|
-
{
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
)}
|
|
636
|
-
/>
|
|
637
|
-
</div>
|
|
638
|
-
))}
|
|
591
|
+
<div className="ticket-holders-fields">
|
|
592
|
+
<p>{ticketHoldersFields.label}</p>
|
|
593
|
+
{_map(ticketsQuantity, (_item, index) => (
|
|
594
|
+
<div key={_item}>
|
|
595
|
+
<h5>Ticket {index + 1}</h5>
|
|
596
|
+
{_map(ticketHoldersFields.fields, group => {
|
|
597
|
+
const { groupClassname, groupItems } = group
|
|
598
|
+
return (
|
|
599
|
+
<div key={group.uniqueId}>
|
|
600
|
+
<div className={groupClassname}>
|
|
601
|
+
{_map(groupItems, element => (
|
|
602
|
+
<div
|
|
603
|
+
className={element.className}
|
|
604
|
+
key={element.uniqueId}
|
|
605
|
+
>
|
|
606
|
+
<Field
|
|
607
|
+
name={`${element.name}-${index}`}
|
|
608
|
+
label={element.label}
|
|
609
|
+
type={element.type}
|
|
610
|
+
required={true}
|
|
611
|
+
component={
|
|
612
|
+
element.type === 'checkbox'
|
|
613
|
+
? CheckboxField
|
|
614
|
+
: CustomField
|
|
615
|
+
}
|
|
616
|
+
validate={combineValidators(
|
|
617
|
+
element.required
|
|
618
|
+
? requiredValidator
|
|
619
|
+
: () => {},
|
|
620
|
+
element.onValidate
|
|
621
|
+
? element.onValidate
|
|
622
|
+
: () => {}
|
|
623
|
+
)}
|
|
624
|
+
/>
|
|
639
625
|
</div>
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
)
|
|
626
|
+
))}
|
|
627
|
+
</div>
|
|
628
|
+
</div>
|
|
629
|
+
)
|
|
630
|
+
})}
|
|
645
631
|
</div>
|
|
646
|
-
|
|
647
|
-
|
|
632
|
+
))}
|
|
633
|
+
</div>
|
|
648
634
|
<div className="button-container">
|
|
649
635
|
<LoadingButton
|
|
650
636
|
type="submit"
|
|
@@ -671,6 +657,7 @@ export const BillingInfoContainer = ({
|
|
|
671
657
|
onLogin={() => {
|
|
672
658
|
setShowModalLogin(false)
|
|
673
659
|
setUserExpired(false)
|
|
660
|
+
onLoginSuccess()
|
|
674
661
|
}}
|
|
675
662
|
alreadyHasUser={alreadyHasUser}
|
|
676
663
|
userExpired={userExpired}
|
|
@@ -33,6 +33,14 @@ export const getInitialValues = (
|
|
|
33
33
|
initialValues[item] = propsInitialValues[item] || userValues[item] || ''
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
+
// set logged in user as first ticket holder
|
|
37
|
+
initialValues['holderFirstName-0'] =
|
|
38
|
+
propsInitialValues.firstName || userValues.firstName || ''
|
|
39
|
+
initialValues['holderLastName-0'] =
|
|
40
|
+
propsInitialValues.lastName || userValues.lastName || ''
|
|
41
|
+
initialValues['holderEmail-0'] =
|
|
42
|
+
propsInitialValues.email || userValues.email || ''
|
|
43
|
+
|
|
36
44
|
return initialValues
|
|
37
45
|
}
|
|
38
46
|
|
|
@@ -16,6 +16,7 @@ import StripePayment from '../stripePayment'
|
|
|
16
16
|
import { IOrderData, IPaymentField } from '../../types'
|
|
17
17
|
|
|
18
18
|
import { getPaymentData, handlePaymentSuccess, getConditions } from '../../api'
|
|
19
|
+
import { StripeCardNumberElementOptions } from '@stripe/stripe-js'
|
|
19
20
|
|
|
20
21
|
const testId = ENV.STRIPE_PUBLISHABLE_KEY || 'pk_test_3Ov1P1oP33A1cxaSjxWE0VjT'
|
|
21
22
|
const stripePromise = loadStripe(
|
|
@@ -32,6 +33,7 @@ export interface IPaymentPage {
|
|
|
32
33
|
onGetPaymentDataSuccess: (value: any) => void;
|
|
33
34
|
onGetPaymentDataError: (value: AxiosError) => void;
|
|
34
35
|
onPaymentError: (value: AxiosError) => void;
|
|
36
|
+
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
const initialOrderValues: IOrderData = {
|
|
@@ -62,6 +64,7 @@ export const PaymentContainer = ({
|
|
|
62
64
|
onGetPaymentDataSuccess = () => {},
|
|
63
65
|
onGetPaymentDataError = () => {},
|
|
64
66
|
onPaymentError = () => {},
|
|
67
|
+
stripeCardOptions = {},
|
|
65
68
|
}: IPaymentPage) => {
|
|
66
69
|
const [reviewData, setReviewData] = useState(initialReviewValues)
|
|
67
70
|
const [orderData, setOrderData] = useState(initialOrderValues)
|
|
@@ -118,6 +121,7 @@ export const PaymentContainer = ({
|
|
|
118
121
|
? conditionsInfo.map((item: string) => ({
|
|
119
122
|
id: nanoid(),
|
|
120
123
|
text: item,
|
|
124
|
+
checked: false,
|
|
121
125
|
}))
|
|
122
126
|
: []
|
|
123
127
|
)
|
|
@@ -191,6 +195,7 @@ export const PaymentContainer = ({
|
|
|
191
195
|
isLoading={paymentIsLoading}
|
|
192
196
|
handleSetLoading={value => setPaymentIsLoading(value)}
|
|
193
197
|
conditions={conditions}
|
|
198
|
+
stripeCardOptions={stripeCardOptions}
|
|
194
199
|
/>
|
|
195
200
|
</Elements>
|
|
196
201
|
</div>
|
|
@@ -18,11 +18,13 @@ import CircularProgress from '@mui/material/CircularProgress'
|
|
|
18
18
|
const options: StripeCardNumberElementOptions = {
|
|
19
19
|
style: {
|
|
20
20
|
base: {
|
|
21
|
-
backgroundColor:'#232323',
|
|
21
|
+
backgroundColor: '#232323',
|
|
22
22
|
fontSize: '18px',
|
|
23
23
|
color: '#ffffff',
|
|
24
24
|
letterSpacing: '1px',
|
|
25
|
-
|
|
25
|
+
':-webkit-autofill': {
|
|
26
|
+
color: '#ffffff',
|
|
27
|
+
},
|
|
26
28
|
'::placeholder': {
|
|
27
29
|
color: 'rgba(201, 201, 201, 0.5)',
|
|
28
30
|
},
|
|
@@ -37,7 +39,6 @@ export interface ICheckoutForm {
|
|
|
37
39
|
total: string;
|
|
38
40
|
currency: string;
|
|
39
41
|
onSubmit: (error: any) => Promise<any>;
|
|
40
|
-
|
|
41
42
|
error?: string | null;
|
|
42
43
|
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
43
44
|
stripe_client_secret: string;
|
|
@@ -57,7 +58,7 @@ interface AddressTypes {
|
|
|
57
58
|
const CheckoutForm = ({
|
|
58
59
|
total,
|
|
59
60
|
onSubmit = _identity,
|
|
60
|
-
stripeCardOptions =
|
|
61
|
+
stripeCardOptions = {},
|
|
61
62
|
error = null,
|
|
62
63
|
stripe_client_secret,
|
|
63
64
|
currency,
|
|
@@ -70,6 +71,8 @@ const CheckoutForm = ({
|
|
|
70
71
|
const elements = useElements()
|
|
71
72
|
const [postalCode, setPostalCode] = useState<any>('')
|
|
72
73
|
const [stripeError, setStripeError] = useState<any>(null)
|
|
74
|
+
const [checkboxes, setCheckboxes] = useState<any>([])
|
|
75
|
+
const [allowSubmit, setAllowSubmit] = useState(false)
|
|
73
76
|
|
|
74
77
|
const handleSubmit = async (event: React.SyntheticEvent) => {
|
|
75
78
|
handleSetLoading(true)
|
|
@@ -127,6 +130,18 @@ const CheckoutForm = ({
|
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
|
|
133
|
+
const handleCheckboxes = (e: any) => {
|
|
134
|
+
const checkbox = e.target
|
|
135
|
+
const updatedCheckedState = checkboxes.map((item: any) => {
|
|
136
|
+
const value = item.id === checkbox.name ? !item.checked : item.checked
|
|
137
|
+
return {
|
|
138
|
+
...item,
|
|
139
|
+
checked: value,
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
setCheckboxes(updatedCheckedState)
|
|
143
|
+
}
|
|
144
|
+
|
|
130
145
|
const onChangePostalCode = (e: any) => {
|
|
131
146
|
setPostalCode(e.target.value)
|
|
132
147
|
}
|
|
@@ -141,6 +156,21 @@ const CheckoutForm = ({
|
|
|
141
156
|
}
|
|
142
157
|
}, [])
|
|
143
158
|
|
|
159
|
+
useEffect(() => {
|
|
160
|
+
if (conditions.length) {
|
|
161
|
+
setCheckboxes(conditions)
|
|
162
|
+
}
|
|
163
|
+
}, [conditions])
|
|
164
|
+
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
if (checkboxes.length) {
|
|
167
|
+
const allChecked = checkboxes.every(
|
|
168
|
+
(item: any) => item?.checked === true
|
|
169
|
+
)
|
|
170
|
+
setAllowSubmit(allChecked)
|
|
171
|
+
}
|
|
172
|
+
}, [checkboxes])
|
|
173
|
+
|
|
144
174
|
const buttonIsDiabled = !stripe || !!error || isLoading
|
|
145
175
|
|
|
146
176
|
return (
|
|
@@ -153,7 +183,7 @@ const CheckoutForm = ({
|
|
|
153
183
|
<label className="card_number_element">
|
|
154
184
|
<span className="card_label_text">Card number</span>
|
|
155
185
|
<CardNumberElement
|
|
156
|
-
options={stripeCardOptions}
|
|
186
|
+
options={{ ...options, ...stripeCardOptions }}
|
|
157
187
|
onReady={_identity}
|
|
158
188
|
onChange={_identity}
|
|
159
189
|
onBlur={_identity}
|
|
@@ -162,11 +192,11 @@ const CheckoutForm = ({
|
|
|
162
192
|
</label>
|
|
163
193
|
<label className="expiration_element">
|
|
164
194
|
<span className="card_label_text">Expiration date</span>
|
|
165
|
-
<CardExpiryElement options={stripeCardOptions} />
|
|
195
|
+
<CardExpiryElement options={{ ...options, ...stripeCardOptions }} />
|
|
166
196
|
</label>
|
|
167
197
|
<label className="cvc_element">
|
|
168
198
|
<span className="card_label_text">CVC</span>
|
|
169
|
-
<CardCvcElement options={stripeCardOptions} />
|
|
199
|
+
<CardCvcElement options={{ ...options, ...stripeCardOptions }} />
|
|
170
200
|
</label>
|
|
171
201
|
<label className="zip_element">
|
|
172
202
|
<p className="card_label_text">ZIP</p>
|
|
@@ -178,7 +208,7 @@ const CheckoutForm = ({
|
|
|
178
208
|
/>
|
|
179
209
|
</label>
|
|
180
210
|
</div>
|
|
181
|
-
{
|
|
211
|
+
{checkboxes?.map((checkbox: any) => (
|
|
182
212
|
<div
|
|
183
213
|
className={'billing-info-container__singleField'}
|
|
184
214
|
key={checkbox.id}
|
|
@@ -188,13 +218,15 @@ const CheckoutForm = ({
|
|
|
188
218
|
name={checkbox.id}
|
|
189
219
|
label={checkbox.text}
|
|
190
220
|
required={true}
|
|
221
|
+
onChange={handleCheckboxes}
|
|
222
|
+
checked={checkbox.checked}
|
|
191
223
|
/>
|
|
192
224
|
</div>
|
|
193
225
|
</div>
|
|
194
226
|
))}
|
|
195
227
|
<div
|
|
196
228
|
className={`payment_button ${
|
|
197
|
-
buttonIsDiabled ? 'disabled-payment-button' : ''
|
|
229
|
+
buttonIsDiabled || !allowSubmit ? 'disabled-payment-button' : ''
|
|
198
230
|
}`}
|
|
199
231
|
>
|
|
200
232
|
<button disabled={buttonIsDiabled} type="submit">
|
|
@@ -66,9 +66,10 @@ const WaitingList = ({ tickets = {} }: WaitingListProps) => {
|
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
68
|
<div className="waiting-list">
|
|
69
|
+
<p className="no-tickets-text">No tickets are currently available for this event.</p>
|
|
69
70
|
{showSuccessMessage ? (
|
|
70
71
|
<div className="success-message">
|
|
71
|
-
<
|
|
72
|
+
<p className="added-success-message">{`You've been added to the waiting list!`}</p>
|
|
72
73
|
<p>{`You'll be notified if tickets become available.`}</p>
|
|
73
74
|
</div>
|
|
74
75
|
) : (
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/components/.DS_Store
DELETED
|
Binary file
|