tf-checkout-react-native 1.0.12 → 1.0.15
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 +550 -313
- package/android/build.gradle +3 -3
- package/lib/api/ApiClient.d.ts +13 -21
- package/lib/api/ApiClient.js +124 -51
- package/lib/api/ApiClient.js.map +1 -1
- package/lib/api/types.d.ts +23 -11
- package/lib/components/login/Login.d.ts +1 -1
- package/lib/components/login/Login.js +22 -10
- package/lib/components/login/Login.js.map +1 -1
- package/lib/components/login/LoginView.d.ts +1 -1
- package/lib/components/login/LoginView.js +16 -13
- package/lib/components/login/LoginView.js.map +1 -1
- package/lib/components/login/styles.d.ts +2 -1
- package/lib/components/login/styles.js +2 -1
- package/lib/components/login/styles.js.map +1 -1
- package/lib/components/login/types.d.ts +18 -10
- package/lib/components/waitingList/WaitingList.d.ts +1 -1
- package/lib/components/waitingList/WaitingList.js +20 -3
- package/lib/components/waitingList/WaitingList.js.map +1 -1
- package/lib/components/waitingList/WaitingListView.js +19 -7
- package/lib/components/waitingList/WaitingListView.js.map +1 -1
- package/lib/components/waitingList/types.d.ts +10 -0
- package/lib/containers/billingInfo/Billing.d.ts +2 -1
- package/lib/containers/billingInfo/Billing.js +112 -68
- package/lib/containers/billingInfo/Billing.js.map +1 -1
- package/lib/containers/billingInfo/types.d.ts +40 -91
- package/lib/containers/checkout/Checkout.d.ts +1 -1
- package/lib/containers/checkout/Checkout.js +90 -49
- package/lib/containers/checkout/Checkout.js.map +1 -1
- package/lib/containers/checkout/components/styles.js +1 -1
- package/lib/containers/checkout/components/styles.js.map +1 -1
- package/lib/containers/checkout/styles.d.ts +2 -0
- package/lib/containers/checkout/styles.js +3 -1
- package/lib/containers/checkout/styles.js.map +1 -1
- package/lib/containers/checkout/types.d.ts +36 -7
- package/lib/containers/myOrderDetails/MyOrderDetails.js +21 -3
- package/lib/containers/myOrderDetails/MyOrderDetails.js.map +1 -1
- package/lib/containers/myOrderDetails/MyOrderDetailsView.js +10 -7
- package/lib/containers/myOrderDetails/MyOrderDetailsView.js.map +1 -1
- package/lib/containers/myOrderDetails/components/Notification.d.ts +10 -2
- package/lib/containers/myOrderDetails/components/Notification.js +5 -7
- package/lib/containers/myOrderDetails/components/Notification.js.map +1 -1
- package/lib/containers/myOrderDetails/types.d.ts +18 -0
- package/lib/containers/myOrders/MyOrders.js +37 -9
- package/lib/containers/myOrders/MyOrders.js.map +1 -1
- package/lib/containers/myOrders/MyOrdersView.d.ts +1 -1
- package/lib/containers/myOrders/MyOrdersView.js +3 -3
- package/lib/containers/myOrders/MyOrdersView.js.map +1 -1
- package/lib/containers/myOrders/types.d.ts +13 -1
- package/lib/containers/purchaseConfirmation/PurchaseConfirmation.d.ts +1 -1
- package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js +21 -5
- package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js.map +1 -1
- package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.d.ts +2 -2
- package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.js +4 -3
- package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.js.map +1 -1
- package/lib/containers/purchaseConfirmation/types.d.ts +12 -1
- package/lib/containers/tickets/Tickets.d.ts +1 -1
- package/lib/containers/tickets/Tickets.js +37 -9
- package/lib/containers/tickets/Tickets.js.map +1 -1
- package/lib/containers/tickets/TicketsView.d.ts +1 -1
- package/lib/containers/tickets/TicketsView.js +5 -4
- package/lib/containers/tickets/TicketsView.js.map +1 -1
- package/lib/containers/tickets/components/TicketListItem.js +14 -7
- package/lib/containers/tickets/components/TicketListItem.js.map +1 -1
- package/lib/containers/tickets/components/types.d.ts +6 -0
- package/lib/containers/tickets/types.d.ts +18 -11
- package/lib/helpers/LocalStorage.d.ts +1 -1
- package/lib/helpers/LocalStorage.js +1 -3
- package/lib/helpers/LocalStorage.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/res/colors.d.ts +2 -2
- package/lib/res/colors.js +2 -18
- package/lib/res/colors.js.map +1 -1
- package/lib/types/IError.d.ts +5 -0
- package/lib/types/IError.js +2 -0
- package/lib/types/IError.js.map +1 -0
- package/lib/types/ITicket.d.ts +12 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { ColorValue, ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
1
|
+
import { ColorValue, ImageSourcePropType, ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
2
|
import { IButtonStyles } from '../../components/button/types';
|
|
3
3
|
import { ICheckboxStyles } from '../../components/checkbox/types';
|
|
4
4
|
import { IDatePickerStyles } from '../../components/datePicker/types';
|
|
5
|
-
import {
|
|
6
|
-
import { IFormFieldProps } from '../../components/formField/types';
|
|
5
|
+
import { IDropdownStyles } from '../../components/dropdown/types';
|
|
7
6
|
import { IInputStyles } from '../../components/input/types';
|
|
8
|
-
import { ILoginViewStyles, ILoginViewTexts } from '../../components/login/types';
|
|
9
|
-
import {
|
|
10
|
-
import { IAddToCartSuccess } from '../tickets/types';
|
|
7
|
+
import { ILoginBrandImages, ILoginViewStyles, ILoginViewTexts } from '../../components/login/types';
|
|
8
|
+
import { IError, ITicketsResponseData } from '../../types';
|
|
11
9
|
export interface ITokens {
|
|
12
10
|
accessToken: string;
|
|
13
11
|
refreshToken: string;
|
|
@@ -19,38 +17,43 @@ export interface IOnCheckoutSuccess {
|
|
|
19
17
|
status: string;
|
|
20
18
|
}
|
|
21
19
|
export interface IBillingProps {
|
|
22
|
-
cartProps:
|
|
20
|
+
cartProps: ITicketsResponseData;
|
|
23
21
|
onRegisterSuccess?: (tokens: ITokens) => void;
|
|
24
|
-
|
|
22
|
+
onRegisterError?: (error: string) => void;
|
|
25
23
|
onCheckoutSuccess: (data: IOnCheckoutSuccess) => void;
|
|
26
|
-
|
|
24
|
+
onCheckoutError?: (error: IError) => void;
|
|
27
25
|
onLoginSuccess: (data: any) => void;
|
|
28
|
-
|
|
26
|
+
onLoginError?: (error: IError) => void;
|
|
29
27
|
onFetchUserProfileSuccess?: (data: any) => void;
|
|
30
|
-
|
|
31
|
-
onFetchCartError?: (error:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
cartProps: IAddToCartSuccess;
|
|
40
|
-
onRegisterSuccess?: (tokens: ITokens) => void;
|
|
41
|
-
onRegisterFail?: (error: string) => void;
|
|
42
|
-
onCheckoutSuccess: (data: IOnCheckoutSuccess) => void;
|
|
43
|
-
onCheckoutFail?: (error: string) => void;
|
|
44
|
-
onLoginSuccess: (data: any) => void;
|
|
45
|
-
onLoginFail?: (error: string) => void;
|
|
46
|
-
onFetchUserProfileSuccess?: (data: any) => void;
|
|
47
|
-
onFetchUserProfileFail?: (error: any) => void;
|
|
48
|
-
onFetchCartError?: (error: string) => void;
|
|
28
|
+
onFetchUserProfileError?: (error: IError) => void;
|
|
29
|
+
onFetchCartError?: (error: IError) => void;
|
|
30
|
+
onFetchCartSuccess?: () => void;
|
|
31
|
+
onFetchCountriesError?: (error: IError) => void;
|
|
32
|
+
onFetchCountriesSuccess?: () => void;
|
|
33
|
+
onFetchStatesError?: (error: IError) => void;
|
|
34
|
+
onFetchStatesSuccess?: () => void;
|
|
35
|
+
onFetchAccessTokenError?: (error: IError) => void;
|
|
36
|
+
onFetchAccessTokenSuccess?: () => void;
|
|
49
37
|
styles?: IBillingInfoViewStyles;
|
|
50
38
|
texts?: IBillingInfoViewTexts;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
skipBillingConfig?: {
|
|
40
|
+
styles?: {
|
|
41
|
+
rootContainer?: StyleProp<ViewStyle>;
|
|
42
|
+
dialogContainer?: StyleProp<ViewStyle>;
|
|
43
|
+
brandImage?: StyleProp<ImageStyle>;
|
|
44
|
+
text?: StyleProp<TextStyle>;
|
|
45
|
+
activityIndicator?: {
|
|
46
|
+
color?: ColorValue;
|
|
47
|
+
size?: 'large' | 'small';
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
brandImage?: ImageSourcePropType;
|
|
51
|
+
isActivityIndicatorVisible?: boolean;
|
|
52
|
+
};
|
|
53
|
+
loginBrandImages?: ILoginBrandImages;
|
|
54
|
+
areLoadingIndicatorsEnabled?: boolean;
|
|
55
|
+
areAlertsEnabled?: boolean;
|
|
56
|
+
onLoadingChange?: (isLoading: boolean) => void;
|
|
54
57
|
}
|
|
55
58
|
export interface ITicketHolderField {
|
|
56
59
|
firstName: string;
|
|
@@ -62,36 +65,6 @@ export interface ITicketHolderFieldError {
|
|
|
62
65
|
firstNameError?: string;
|
|
63
66
|
lastNameError?: string;
|
|
64
67
|
}
|
|
65
|
-
export interface IBillingInfoFormData {
|
|
66
|
-
firstName: string;
|
|
67
|
-
lastName: string;
|
|
68
|
-
email: string;
|
|
69
|
-
confirmEmail: string;
|
|
70
|
-
password: string;
|
|
71
|
-
confirmPassword: string;
|
|
72
|
-
phone: string;
|
|
73
|
-
street: string;
|
|
74
|
-
city: string;
|
|
75
|
-
country?: IDropdownItem;
|
|
76
|
-
state?: IDropdownItem;
|
|
77
|
-
zipCode: string;
|
|
78
|
-
isSubToNewsletter: boolean;
|
|
79
|
-
isSubToMarketing: boolean;
|
|
80
|
-
ticketHoldersFields: ITicketHolderField[];
|
|
81
|
-
birthday?: Date;
|
|
82
|
-
errors: {
|
|
83
|
-
firstName: string;
|
|
84
|
-
lastName: string;
|
|
85
|
-
email: string;
|
|
86
|
-
confirmEmail: string;
|
|
87
|
-
password: string;
|
|
88
|
-
confirmPassword: string;
|
|
89
|
-
phone: string;
|
|
90
|
-
street: string;
|
|
91
|
-
city: string;
|
|
92
|
-
zipCode: string;
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
68
|
export interface IBillingInfoViewStyles {
|
|
96
69
|
rootContainer?: StyleProp<ViewStyle>;
|
|
97
70
|
loginStyles?: ILoginViewStyles;
|
|
@@ -107,16 +80,7 @@ export interface IBillingInfoViewStyles {
|
|
|
107
80
|
texts?: StyleProp<TextStyle>;
|
|
108
81
|
customCheckbox?: ICheckboxStyles;
|
|
109
82
|
datePicker?: IDatePickerStyles;
|
|
110
|
-
|
|
111
|
-
rootContainer?: StyleProp<ViewStyle>;
|
|
112
|
-
dialogContainer?: StyleProp<ViewStyle>;
|
|
113
|
-
brandImage?: StyleProp<ImageStyle>;
|
|
114
|
-
message?: StyleProp<TextStyle>;
|
|
115
|
-
spinner?: {
|
|
116
|
-
color: ColorValue;
|
|
117
|
-
size: 'large' | 'small';
|
|
118
|
-
};
|
|
119
|
-
};
|
|
83
|
+
privacyPolicyLinkStyle?: StyleProp<TextStyle>;
|
|
120
84
|
}
|
|
121
85
|
export interface IBillingInfoViewTexts {
|
|
122
86
|
loginTexts?: ILoginViewTexts;
|
|
@@ -138,6 +102,8 @@ export interface IBillingInfoViewTexts {
|
|
|
138
102
|
zipCode?: string;
|
|
139
103
|
dateOfBirth?: string;
|
|
140
104
|
isSubToBrand?: string;
|
|
105
|
+
isSubToTicketFairy?: string;
|
|
106
|
+
privacyPolicy?: string;
|
|
141
107
|
ticketHoldersTitle?: string;
|
|
142
108
|
ticketHolderItem?: string;
|
|
143
109
|
holderFirstName?: string;
|
|
@@ -148,24 +114,7 @@ export interface IBillingInfoViewTexts {
|
|
|
148
114
|
emailsAdvice?: string;
|
|
149
115
|
choosePassword?: string;
|
|
150
116
|
checkbox?: string;
|
|
117
|
+
fillAllRequiredFieldsAlert?: string;
|
|
151
118
|
};
|
|
152
119
|
}
|
|
153
|
-
export
|
|
154
|
-
formFields: IFormFieldProps[];
|
|
155
|
-
isLoading: boolean;
|
|
156
|
-
onSubmit: () => void;
|
|
157
|
-
onLoginSuccessful: (userProfile: IUserProfile, accessToken: string) => void;
|
|
158
|
-
isDataValid: boolean;
|
|
159
|
-
isLoginDialogVisible: boolean;
|
|
160
|
-
showLoginDialog: () => void;
|
|
161
|
-
hideLoginDialog: () => void;
|
|
162
|
-
loginMessage?: string;
|
|
163
|
-
userProfile?: IUserProfile;
|
|
164
|
-
isSubmitLoading?: boolean;
|
|
165
|
-
onLogoutSuccess?: () => void;
|
|
166
|
-
styles?: IBillingInfoViewStyles;
|
|
167
|
-
texts?: IBillingInfoViewTexts;
|
|
168
|
-
onLoginFail?: (error: string) => void;
|
|
169
|
-
onFetchUserProfileFailure?: (error: string) => void;
|
|
170
|
-
onFetchAccessTokenFailure?: (error: string) => void;
|
|
171
|
-
}
|
|
120
|
+
export declare type SkippingStatusType = 'skipping' | 'fail' | 'success' | 'false' | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ICheckoutProps } from './types';
|
|
2
|
-
declare const Checkout: ({ eventId,
|
|
2
|
+
declare const Checkout: ({ eventId, checkoutData, onFetchOrderReviewError, onFetchOrderReviewSuccess, onFetchEventConditionsError, onFetchEventConditionsSuccess, onCheckoutCompletedError, onCheckoutCompletedSuccess, onPaymentError, onPaymentSuccess, onStripeInitializeError, texts, styles, onPressExit, areAlertsEnabled, areLoadingIndicatorsEnabled, onLoadingChange, onFetchOrderDetailsError, onFetchOrderDetailsSuccess, }: ICheckoutProps) => JSX.Element;
|
|
3
3
|
export default Checkout;
|
|
@@ -6,7 +6,7 @@ import _mapKeys from 'lodash/mapKeys';
|
|
|
6
6
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
7
|
import { Alert, Text, View } from 'react-native';
|
|
8
8
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
|
9
|
-
import { fetchEventConditions, fetchOrderReview, postOnFreeRegistration, postOnPaymentSuccess, } from '../../api/ApiClient';
|
|
9
|
+
import { fetchEventConditions, fetchOrderDetails, fetchOrderReview, postOnFreeRegistration, postOnPaymentSuccess, } from '../../api/ApiClient';
|
|
10
10
|
import { Loading } from '../../components';
|
|
11
11
|
import Button from '../../components/button/Button';
|
|
12
12
|
import { priceWithCurrency } from '../../helpers/StringsHelper';
|
|
@@ -14,9 +14,9 @@ import { orderReviewItems } from './CheckoutData';
|
|
|
14
14
|
import Conditions from './components/Conditions';
|
|
15
15
|
import OrderReview from './components/OrderReview';
|
|
16
16
|
import s from './styles';
|
|
17
|
-
const Checkout = ({ eventId,
|
|
18
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19
|
-
const { confirmPayment } = useConfirmPayment();
|
|
17
|
+
const Checkout = ({ eventId, checkoutData, onFetchOrderReviewError, onFetchOrderReviewSuccess, onFetchEventConditionsError, onFetchEventConditionsSuccess, onCheckoutCompletedError, onCheckoutCompletedSuccess, onPaymentError, onPaymentSuccess, onStripeInitializeError, texts, styles, onPressExit, areAlertsEnabled = true, areLoadingIndicatorsEnabled = true, onLoadingChange, onFetchOrderDetailsError, onFetchOrderDetailsSuccess, }) => {
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
19
|
+
const { confirmPayment, loading: isLoadingPayment } = useConfirmPayment();
|
|
20
20
|
const [isLoading, setIsLoading] = useState(true);
|
|
21
21
|
const [orderReview, setOrderReview] = useState();
|
|
22
22
|
const [conditionsTexts, setConditionsTexts] = useState([]);
|
|
@@ -44,28 +44,63 @@ const Checkout = ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuc
|
|
|
44
44
|
tConditionsValues[index] = !conditionsValues[index];
|
|
45
45
|
setConditionsValues(tConditionsValues);
|
|
46
46
|
};
|
|
47
|
-
const
|
|
47
|
+
const handleFetchOrderDetails = async () => {
|
|
48
|
+
var _a, _b, _c;
|
|
48
49
|
showLoading();
|
|
49
|
-
const {
|
|
50
|
+
const { orderDetailsData, orderDetailsError } = await fetchOrderDetails(checkoutData.id);
|
|
50
51
|
hideLoading();
|
|
52
|
+
if (orderDetailsError) {
|
|
53
|
+
onFetchOrderDetailsError === null || onFetchOrderDetailsError === void 0 ? void 0 : onFetchOrderDetailsError(orderDetailsError);
|
|
54
|
+
return showAlert(orderDetailsError.message || 'Error while fetching order details');
|
|
55
|
+
}
|
|
56
|
+
if (!orderDetailsData) {
|
|
57
|
+
onFetchOrderDetailsError === null || onFetchOrderDetailsError === void 0 ? void 0 : onFetchOrderDetailsError({
|
|
58
|
+
code: 404,
|
|
59
|
+
message: 'No order data found',
|
|
60
|
+
});
|
|
61
|
+
return showAlert('No order data found');
|
|
62
|
+
}
|
|
63
|
+
const orderDetails = {
|
|
64
|
+
eventId: eventId,
|
|
65
|
+
ticketName: (_a = orderDetailsData.items[0]) === null || _a === void 0 ? void 0 : _a.name,
|
|
66
|
+
ticketCost: (_b = orderDetailsData.items[0]) === null || _b === void 0 ? void 0 : _b.price,
|
|
67
|
+
numberOfTickets: parseInt((_c = orderDetailsData.items[0]) === null || _c === void 0 ? void 0 : _c.quantity, 10),
|
|
68
|
+
eventUserTickets: _map(orderDetailsData.tickets, (ticket) => ({
|
|
69
|
+
hash: ticket.hash,
|
|
70
|
+
ticketType: ticket.ticketType,
|
|
71
|
+
holderEmail: ticket.holderEmail,
|
|
72
|
+
holderPhone: ticket.holderPhone,
|
|
73
|
+
holderName: ticket.holderName,
|
|
74
|
+
qrData: ticket.qrData,
|
|
75
|
+
pdfLink: ticket.pdfLink,
|
|
76
|
+
description: ticket.description,
|
|
77
|
+
descriptionPlain: ticket.descriptionPlain,
|
|
78
|
+
})),
|
|
79
|
+
};
|
|
80
|
+
onFetchOrderDetailsSuccess === null || onFetchOrderDetailsSuccess === void 0 ? void 0 : onFetchOrderDetailsSuccess(orderDetails);
|
|
81
|
+
};
|
|
82
|
+
const handleOnPressFreeRegistration = async () => {
|
|
83
|
+
showLoading();
|
|
84
|
+
const { freeRegistrationData, freeRegistrationError } = await postOnFreeRegistration(checkoutData.hash);
|
|
51
85
|
if (freeRegistrationError) {
|
|
86
|
+
hideLoading();
|
|
52
87
|
if (onPaymentError) {
|
|
53
|
-
onPaymentError(freeRegistrationError
|
|
88
|
+
onPaymentError(freeRegistrationError);
|
|
54
89
|
}
|
|
55
|
-
showAlert(freeRegistrationError || 'Error while registering');
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (onPaymentSuccess) {
|
|
59
|
-
return onPaymentSuccess(freeRegistrationData);
|
|
90
|
+
return showAlert(freeRegistrationError.message || 'Error while registering');
|
|
60
91
|
}
|
|
92
|
+
hideLoading();
|
|
93
|
+
onPaymentSuccess === null || onPaymentSuccess === void 0 ? void 0 : onPaymentSuccess(freeRegistrationData);
|
|
94
|
+
await handleFetchOrderDetails();
|
|
61
95
|
};
|
|
62
96
|
const handleOnPressPay = async () => {
|
|
63
97
|
if (!orderReview) {
|
|
64
98
|
if (onPaymentError) {
|
|
65
|
-
onPaymentError(
|
|
99
|
+
onPaymentError({
|
|
100
|
+
message: `Order data is missing ${JSON.stringify(orderReview)}`,
|
|
101
|
+
});
|
|
66
102
|
}
|
|
67
|
-
showAlert('No order data found');
|
|
68
|
-
return;
|
|
103
|
+
return showAlert('No order data found');
|
|
69
104
|
}
|
|
70
105
|
const { addressData } = orderReview;
|
|
71
106
|
showLoading();
|
|
@@ -79,32 +114,26 @@ const Checkout = ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuc
|
|
|
79
114
|
name: `${orderReview.billingData.firstName} ${orderReview.billingData.lastName}`,
|
|
80
115
|
},
|
|
81
116
|
});
|
|
82
|
-
if (confirmPaymentError) {
|
|
117
|
+
if (confirmPaymentError || (paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status) !== 'Succeeded') {
|
|
83
118
|
hideLoading();
|
|
84
|
-
if (
|
|
85
|
-
|
|
119
|
+
if (onCheckoutCompletedError) {
|
|
120
|
+
onCheckoutCompletedError({
|
|
121
|
+
message: (confirmPaymentError === null || confirmPaymentError === void 0 ? void 0 : confirmPaymentError.message) || 'Error confirming payment',
|
|
122
|
+
extraData: confirmPaymentError === null || confirmPaymentError === void 0 ? void 0 : confirmPaymentError.code,
|
|
123
|
+
});
|
|
86
124
|
}
|
|
87
|
-
showAlert((confirmPaymentError === null || confirmPaymentError === void 0 ? void 0 : confirmPaymentError.message) || 'Error confirming payment');
|
|
88
|
-
return;
|
|
125
|
+
return showAlert((confirmPaymentError === null || confirmPaymentError === void 0 ? void 0 : confirmPaymentError.message) || 'Error confirming payment');
|
|
89
126
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
const { data: onPaymentSuccessData, error: onPaymentSuccessError } = await postOnPaymentSuccess(hash);
|
|
127
|
+
onCheckoutCompletedSuccess === null || onCheckoutCompletedSuccess === void 0 ? void 0 : onCheckoutCompletedSuccess(checkoutData);
|
|
128
|
+
const { data: onPaymentSuccessData, error: onPaymentSuccessError } = await postOnPaymentSuccess(checkoutData.hash);
|
|
94
129
|
if (onPaymentSuccessError) {
|
|
95
130
|
hideLoading();
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
showAlert(onPaymentSuccessError || 'Error while performing payment');
|
|
100
|
-
return;
|
|
131
|
+
onPaymentError === null || onPaymentError === void 0 ? void 0 : onPaymentError(onPaymentSuccessError);
|
|
132
|
+
return showAlert(onPaymentSuccessError.message || 'Error while performing payment');
|
|
101
133
|
}
|
|
102
134
|
hideLoading();
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
onPaymentSuccess(onPaymentSuccessData);
|
|
106
|
-
}, 200);
|
|
107
|
-
}
|
|
135
|
+
onPaymentSuccess === null || onPaymentSuccess === void 0 ? void 0 : onPaymentSuccess(onPaymentSuccessData);
|
|
136
|
+
await handleFetchOrderDetails();
|
|
108
137
|
};
|
|
109
138
|
//#endregion
|
|
110
139
|
const getConditions = () => _map(conditionsTexts, (conditionTxt, index) => {
|
|
@@ -132,11 +161,10 @@ const Checkout = ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuc
|
|
|
132
161
|
const { error: conditionsError, data: conditionsData } = await fetchEventConditions(eventId.toString());
|
|
133
162
|
if (conditionsError) {
|
|
134
163
|
hideLoading();
|
|
135
|
-
if (
|
|
136
|
-
|
|
164
|
+
if (onFetchEventConditionsError) {
|
|
165
|
+
onFetchEventConditionsError(conditionsError);
|
|
137
166
|
}
|
|
138
|
-
showAlert(conditionsError || 'Error while fetching conditions');
|
|
139
|
-
return;
|
|
167
|
+
return showAlert(conditionsError.message || 'Error while fetching conditions');
|
|
140
168
|
}
|
|
141
169
|
setConditionsValues(_map(conditionsData, () => false));
|
|
142
170
|
setConditionsTexts(conditionsData);
|
|
@@ -147,16 +175,23 @@ const Checkout = ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuc
|
|
|
147
175
|
};
|
|
148
176
|
const fetchOrderReviewAsync = async () => {
|
|
149
177
|
var _a;
|
|
150
|
-
const { data: orderReviewData, error: orderReviewError } = await fetchOrderReview(hash);
|
|
178
|
+
const { data: orderReviewData, error: orderReviewError } = await fetchOrderReview(checkoutData.hash);
|
|
151
179
|
hideLoading();
|
|
152
|
-
if (orderReviewError
|
|
180
|
+
if (orderReviewError) {
|
|
153
181
|
hideLoading();
|
|
154
182
|
setIsStripeConfigMissing(true);
|
|
155
|
-
if (
|
|
156
|
-
|
|
183
|
+
if (onFetchOrderReviewError) {
|
|
184
|
+
onFetchOrderReviewError(orderReviewError);
|
|
185
|
+
}
|
|
186
|
+
return showAlert((orderReviewError === null || orderReviewError === void 0 ? void 0 : orderReviewError.message) || 'Error while getting Order Review');
|
|
187
|
+
}
|
|
188
|
+
if (!orderReviewData) {
|
|
189
|
+
if (onFetchOrderReviewError) {
|
|
190
|
+
onFetchOrderReviewError({
|
|
191
|
+
message: 'No order review data found. Please try again later',
|
|
192
|
+
});
|
|
157
193
|
}
|
|
158
|
-
showAlert(
|
|
159
|
-
return;
|
|
194
|
+
return showAlert('No order review data found. Please try again later');
|
|
160
195
|
}
|
|
161
196
|
hideLoading();
|
|
162
197
|
if (onFetchOrderReviewSuccess) {
|
|
@@ -166,7 +201,10 @@ const Checkout = ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuc
|
|
|
166
201
|
const currency = orderReviewData.reviewData.currency;
|
|
167
202
|
_forEach(tOrderInfo, (item) => {
|
|
168
203
|
_mapKeys(orderReviewData.reviewData, (value, key) => {
|
|
204
|
+
var _a, _b;
|
|
169
205
|
if (item.id === key) {
|
|
206
|
+
//@ts-ignore
|
|
207
|
+
item.title = (_b = (_a = texts === null || texts === void 0 ? void 0 : texts.orderReviewItems) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : item.title;
|
|
170
208
|
if (key === 'price' || key === 'total') {
|
|
171
209
|
item.value = priceWithCurrency(value, currency);
|
|
172
210
|
}
|
|
@@ -224,21 +262,24 @@ const Checkout = ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuc
|
|
|
224
262
|
return isStripeConfigMissing ? (React.createElement(View, { style: [s.missingStripeContainer, (_c = styles === null || styles === void 0 ? void 0 : styles.missingStripeConfig) === null || _c === void 0 ? void 0 : _c.container] },
|
|
225
263
|
React.createElement(Text, { style: [s.missingStripeMessage, (_d = styles === null || styles === void 0 ? void 0 : styles.missingStripeConfig) === null || _d === void 0 ? void 0 : _d.message] }, (texts === null || texts === void 0 ? void 0 : texts.missingStripeConfigMessage) ||
|
|
226
264
|
'Payment handler is missing, please contact support'),
|
|
227
|
-
React.createElement(Button, { styles: (_e = styles === null || styles === void 0 ? void 0 : styles.missingStripeConfig) === null || _e === void 0 ? void 0 : _e.exitButton, text: (texts === null || texts === void 0 ? void 0 : texts.exitButton) || 'Exit', onPress: handleOnPressExit }))) : (React.createElement(KeyboardAwareScrollView, { extraScrollHeight: 32
|
|
265
|
+
React.createElement(Button, { styles: (_e = styles === null || styles === void 0 ? void 0 : styles.missingStripeConfig) === null || _e === void 0 ? void 0 : _e.exitButton, text: (texts === null || texts === void 0 ? void 0 : texts.exitButton) || 'Exit', onPress: handleOnPressExit }))) : (React.createElement(KeyboardAwareScrollView, { extraScrollHeight: 32 },
|
|
228
266
|
React.createElement(View, { style: styles === null || styles === void 0 ? void 0 : styles.rootStyle },
|
|
229
267
|
React.createElement(View, null,
|
|
230
268
|
React.createElement(Text, { style: [s.title, styles === null || styles === void 0 ? void 0 : styles.title] }, (texts === null || texts === void 0 ? void 0 : texts.title) || 'GET YOUR TICKETS'),
|
|
231
269
|
React.createElement(Text, { style: [styles === null || styles === void 0 ? void 0 : styles.subTitle] }, (texts === null || texts === void 0 ? void 0 : texts.subTitle) || 'Order review')),
|
|
232
270
|
React.createElement(OrderReview, { orderItems: orderInfo, styles: styles === null || styles === void 0 ? void 0 : styles.orderReview }),
|
|
233
271
|
isPaymentRequired && !isStripeConfigMissing && (React.createElement(View, { style: (_f = styles === null || styles === void 0 ? void 0 : styles.payment) === null || _f === void 0 ? void 0 : _f.container },
|
|
234
|
-
React.createElement(Text, { style: (_g = styles === null || styles === void 0 ? void 0 : styles.payment) === null || _g === void 0 ? void 0 : _g.title },
|
|
235
|
-
|
|
272
|
+
React.createElement(Text, { style: (_g = styles === null || styles === void 0 ? void 0 : styles.payment) === null || _g === void 0 ? void 0 : _g.title }, (texts === null || texts === void 0 ? void 0 : texts.providePaymentInfo) ||
|
|
273
|
+
'Please provide your payment information'),
|
|
274
|
+
React.createElement(CardForm, { onFormComplete: handleOnChangePaymentInfo, style: [s.card, (_h = styles === null || styles === void 0 ? void 0 : styles.payment) === null || _h === void 0 ? void 0 : _h.cardContainer], cardStyle: ((_j = styles === null || styles === void 0 ? void 0 : styles.payment) === null || _j === void 0 ? void 0 : _j.cardBackgroundColor)
|
|
275
|
+
? { backgroundColor: (_k = styles === null || styles === void 0 ? void 0 : styles.payment) === null || _k === void 0 ? void 0 : _k.cardBackgroundColor }
|
|
276
|
+
: s.cardBackground }))),
|
|
236
277
|
React.createElement(Conditions, { ...getConditions() }),
|
|
237
|
-
isPaymentRequired && !isStripeConfigMissing && (React.createElement(Button, { text: (texts === null || texts === void 0 ? void 0 : texts.payButton) || 'PAY', onPress: handleOnPressPay, isDisabled: !isDataValid, styles: {
|
|
278
|
+
isPaymentRequired && !isStripeConfigMissing && (React.createElement(Button, { text: (texts === null || texts === void 0 ? void 0 : texts.payButton) || 'PAY', onPress: handleOnPressPay, isLoading: isLoading || isLoadingPayment, isDisabled: !isDataValid, styles: {
|
|
238
279
|
container: s.payButton,
|
|
239
280
|
...payButtonStyle,
|
|
240
281
|
} })),
|
|
241
|
-
!isPaymentRequired && (React.createElement(Button, { text: (texts === null || texts === void 0 ? void 0 : texts.freeRegistrationButton) || 'COMPLETE REGISTRATION', onPress: handleOnPressFreeRegistration, isLoading: isLoading, styles: styles === null || styles === void 0 ? void 0 : styles.freeRegistrationButton }))),
|
|
282
|
+
!isPaymentRequired && (React.createElement(Button, { text: (texts === null || texts === void 0 ? void 0 : texts.freeRegistrationButton) || 'COMPLETE REGISTRATION', onPress: handleOnPressFreeRegistration, isLoading: isLoading || isLoadingPayment, styles: styles === null || styles === void 0 ? void 0 : styles.freeRegistrationButton }))),
|
|
242
283
|
isLoading && areLoadingIndicatorsEnabled && React.createElement(Loading, null)));
|
|
243
284
|
};
|
|
244
285
|
export default Checkout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkout.js","sourceRoot":"","sources":["../../../src/containers/checkout/Checkout.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,UAAU,EACV,iBAAiB,GAClB,MAAM,6BAA6B,CAAA;AACpC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAA;AAEjF,OA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AAa,EAAE,GAAI;YAClC,iBAAiB,IAAI,CAAC,qBAAqB,IAAI,CAC9C,oBAAC,MAAM,IACL,IAAI,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,KAAI,KAAK,EAC/B,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,SAAS,IAAI,gBAAgB,EACxC,UAAU,EAAE,CAAC,WAAW,EACxB,MAAM,EAAE;oBACN,SAAS,EAAE,CAAC,CAAC,SAAS;oBACtB,GAAG,cAAc;iBAClB,GACD,CACH;YACA,CAAC,iBAAiB,IAAI,CACrB,oBAAC,MAAM,IACL,IAAI,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,sBAAsB,KAAI,uBAAuB,EAC9D,OAAO,EAAE,6BAA6B,EACtC,SAAS,EAAE,SAAS,IAAI,gBAAgB,EACxC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,sBAAsB,GACtC,CACH,CACI;QACN,SAAS,IAAI,2BAA2B,IAAI,oBAAC,OAAO,OAAG,CAChC,CAC3B,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/containers/checkout/components/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE;QACb,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,EAAE;QAClB,eAAe,EAAE,EAAE;QACnB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,MAAM;KACjB;IACD,kBAAkB,EAAE;QAClB,eAAe,EAAE,CAAC;QAClB,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/containers/checkout/components/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE;QACb,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,EAAE;QAClB,eAAe,EAAE,EAAE;QACnB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,MAAM;KACjB;IACD,kBAAkB,EAAE;QAClB,eAAe,EAAE,CAAC;QAClB,KAAK,EAAE,MAAM;KACd;IACD,cAAc,EAAE;QACd,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,EAAE;KACb;IACD,cAAc,EAAE;QACd,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IAChD,aAAa,EAAE;QACb,cAAc,EAAE,EAAE;KACnB;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/containers/checkout/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEnD,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;KACxB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;KACxB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,cAAc,EAAE,EAAE;QAClB,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI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AC;QACV,SAAS,EAAE,QAAQ;KACpB;IACD,cAAc,EAAE;QACd,eAAe,EAAE,MAAM;KACxB;IACD,sBAAsB,EAAE;QACtB,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,EAAE;KACZ;IACD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK;QACrB,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,EAAE;KACjB;IACD,SAAS,EAAE;QACT,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG;KAC9B;CACF,CAAC,CAAA"}
|
|
@@ -2,6 +2,8 @@ import { CardFormView } from '@stripe/stripe-react-native';
|
|
|
2
2
|
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
3
|
import { IButtonStyles } from '../../components/button/types';
|
|
4
4
|
import { IFormFieldProps } from '../../components/formField/types';
|
|
5
|
+
import { IError } from '../../types';
|
|
6
|
+
import { IOnCheckoutSuccess } from '../billingInfo/types';
|
|
5
7
|
export interface ICheckoutStyles {
|
|
6
8
|
rootStyle?: ViewStyle;
|
|
7
9
|
title?: StyleProp<TextStyle>;
|
|
@@ -22,18 +24,37 @@ export interface ICheckoutStyles {
|
|
|
22
24
|
buttonDisabled?: IButtonStyles;
|
|
23
25
|
};
|
|
24
26
|
}
|
|
27
|
+
export interface IOrderDetailsTicketHolder {
|
|
28
|
+
hash: string;
|
|
29
|
+
ticketType: string;
|
|
30
|
+
holderName?: string;
|
|
31
|
+
holderEmail?: string;
|
|
32
|
+
holderPhone?: string;
|
|
33
|
+
qrData?: string;
|
|
34
|
+
pdfLink?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
descriptionPlain?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IOrderDetails {
|
|
39
|
+
eventId: number;
|
|
40
|
+
ticketName?: string;
|
|
41
|
+
ticketCost?: string;
|
|
42
|
+
numberOfTickets: number;
|
|
43
|
+
eventUserTickets: IOrderDetailsTicketHolder[];
|
|
44
|
+
}
|
|
25
45
|
export interface ICheckoutProps {
|
|
26
46
|
eventId: number;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
onFetchOrderReviewFail?: (error: string) => void;
|
|
47
|
+
checkoutData: IOnCheckoutSuccess;
|
|
48
|
+
onFetchOrderReviewError?: (error: IError) => void;
|
|
30
49
|
onFetchOrderReviewSuccess?: (data: any) => void;
|
|
31
|
-
|
|
50
|
+
onFetchEventConditionsError?: (error: IError) => void;
|
|
32
51
|
onFetchEventConditionsSuccess?: (data: any) => void;
|
|
33
|
-
onCheckoutCompletedSuccess?: (data:
|
|
34
|
-
|
|
52
|
+
onCheckoutCompletedSuccess?: (data: IOnCheckoutSuccess) => void;
|
|
53
|
+
onCheckoutCompletedError?: (error: IError) => void;
|
|
35
54
|
onPaymentSuccess: (data: any) => void;
|
|
36
|
-
onPaymentError?: (error:
|
|
55
|
+
onPaymentError?: (error: IError) => void;
|
|
56
|
+
onFetchOrderDetailsSuccess?: (orderData: IOrderDetails) => void;
|
|
57
|
+
onFetchOrderDetailsError?: (error: IError) => void;
|
|
37
58
|
onStripeInitializeError?: (error: string) => void;
|
|
38
59
|
onPressExit: () => void;
|
|
39
60
|
texts?: {
|
|
@@ -43,6 +64,14 @@ export interface ICheckoutProps {
|
|
|
43
64
|
exitButton?: string;
|
|
44
65
|
payButton?: string;
|
|
45
66
|
freeRegistrationButton?: string;
|
|
67
|
+
providePaymentInfo?: string;
|
|
68
|
+
orderReviewItems?: {
|
|
69
|
+
event?: string;
|
|
70
|
+
ticketType?: string;
|
|
71
|
+
numberOfTickets?: string;
|
|
72
|
+
price?: string;
|
|
73
|
+
total?: string;
|
|
74
|
+
};
|
|
46
75
|
};
|
|
47
76
|
styles?: ICheckoutStyles;
|
|
48
77
|
onLoadingChange?: (isLoading: boolean) => void;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
import { PermissionsAndroid, Platform } from 'react-native';
|
|
3
3
|
import { DocumentDirectoryPath, DownloadDirectoryPath, downloadFile, } from 'react-native-fs';
|
|
4
4
|
import { getData, LocalStorageKeys } from '../../helpers/LocalStorage';
|
|
5
5
|
import MyOrderDetailsView from './MyOrderDetailsView';
|
|
6
|
-
const MyOrderDetails = ({ data, styles, texts }) => {
|
|
6
|
+
const MyOrderDetails = ({ data, styles, texts, config, onDownloadStatusChange, downloadStatusIcons, onAndroidWritePermission, onLinkCopied, }) => {
|
|
7
7
|
const [isWriteStorageEnabled, setIsWriteStorageEnabled] = useState(undefined);
|
|
8
8
|
const [isLinkCopied, setIsLinkCopied] = useState(false);
|
|
9
9
|
const [downloadStatus, setDownloadStatus] = useState(undefined);
|
|
10
|
+
//#region Handlers
|
|
11
|
+
const handleOnDownloadStatusChange = useCallback((status) => {
|
|
12
|
+
onDownloadStatusChange === null || onDownloadStatusChange === void 0 ? void 0 : onDownloadStatusChange(status);
|
|
13
|
+
}, [onDownloadStatusChange]);
|
|
10
14
|
const handleOnPressCopyLink = () => {
|
|
11
15
|
setIsLinkCopied(true);
|
|
16
|
+
onLinkCopied === null || onLinkCopied === void 0 ? void 0 : onLinkCopied(true);
|
|
12
17
|
setTimeout(() => {
|
|
13
18
|
setIsLinkCopied(false);
|
|
19
|
+
onLinkCopied === null || onLinkCopied === void 0 ? void 0 : onLinkCopied(false);
|
|
14
20
|
}, 3000);
|
|
15
21
|
};
|
|
16
22
|
const handleOnPressTicketDownload = async (link, hash) => {
|
|
@@ -45,6 +51,11 @@ const MyOrderDetails = ({ data, styles, texts }) => {
|
|
|
45
51
|
setDownloadStatus(undefined);
|
|
46
52
|
}, 5000);
|
|
47
53
|
};
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region Effects
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
handleOnDownloadStatusChange(downloadStatus);
|
|
58
|
+
}, [downloadStatus, handleOnDownloadStatusChange]);
|
|
48
59
|
useEffect(() => {
|
|
49
60
|
if (Platform.OS === 'ios') {
|
|
50
61
|
return;
|
|
@@ -54,13 +65,20 @@ const MyOrderDetails = ({ data, styles, texts }) => {
|
|
|
54
65
|
});
|
|
55
66
|
}, []);
|
|
56
67
|
useEffect(() => {
|
|
68
|
+
if (Platform.OS === 'android') {
|
|
69
|
+
onAndroidWritePermission === null || onAndroidWritePermission === void 0 ? void 0 : onAndroidWritePermission(isWriteStorageEnabled);
|
|
70
|
+
}
|
|
57
71
|
if (isWriteStorageEnabled === false && Platform.OS === 'android') {
|
|
58
72
|
PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE).then((result) => {
|
|
59
73
|
setIsWriteStorageEnabled(result === 'granted');
|
|
60
74
|
});
|
|
61
75
|
}
|
|
76
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62
77
|
}, [isWriteStorageEnabled]);
|
|
63
|
-
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region Render
|
|
80
|
+
return (React.createElement(MyOrderDetailsView, { data: data, styles: styles, texts: texts, isLinkCopied: isLinkCopied, onPressCopyLink: handleOnPressCopyLink, onPressTicketDownload: handleOnPressTicketDownload, downloadStatus: downloadStatus, config: config, downloadStatusIcons: downloadStatusIcons }));
|
|
81
|
+
//#endregion
|
|
64
82
|
};
|
|
65
83
|
export default MyOrderDetails;
|
|
66
84
|
//# sourceMappingURL=MyOrderDetails.js.map
|