tf-checkout-react 1.0.63 → 1.0.64
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 +1 -1
- package/dist/components/billing-info-container/index.d.ts +2 -1
- package/dist/components/myTicketsContainer/index.d.ts +2 -1
- package/dist/components/orderDetailsContainer/index.d.ts +1 -1
- package/dist/components/paymentContainer/index.d.ts +2 -1
- package/dist/env.d.ts +2 -2
- package/dist/tf-checkout-react.cjs.development.js +97 -63
- 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 +98 -64
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +2 -3
- package/src/api/index.ts +6 -0
- package/src/components/billing-info-container/index.tsx +24 -3
- package/src/components/common/CustomField.tsx +10 -25
- package/src/components/common/SelectField.tsx +0 -13
- package/src/components/myTicketsContainer/index.tsx +22 -10
- package/src/components/orderDetailsContainer/index.tsx +63 -29
- package/src/components/orderDetailsContainer/style.css +27 -8
- package/src/components/paymentContainer/index.tsx +58 -45
- package/src/components/ticketsContainer/TicketRow.tsx +3 -0
- package/src/env.ts +2 -2
package/dist/api/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const getAccessToken: (data: FormData) => Promise<import("axios")
|
|
|
16
16
|
export declare const getPaymentData: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
17
17
|
export declare const handlePaymentData: (orderHash: string, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
18
18
|
export declare const handlePaymentSuccess: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
19
|
-
export declare const getProfileData: (accessToken: any) => Promise<
|
|
19
|
+
export declare const getProfileData: (accessToken: any) => Promise<any>;
|
|
20
20
|
export declare const getCountries: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
21
21
|
export declare const getConfirmationData: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
22
22
|
export declare const getStates: (countryId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -29,5 +29,6 @@ export interface IBillingInfoPage {
|
|
|
29
29
|
buttonName?: string;
|
|
30
30
|
theme?: 'light' | 'dark';
|
|
31
31
|
isLoggedIn?: boolean;
|
|
32
|
+
fontFamily?: string;
|
|
32
33
|
}
|
|
33
|
-
export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, }: IBillingInfoPage) => JSX.Element;
|
|
34
|
+
export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, fontFamily }: IBillingInfoPage) => JSX.Element;
|
|
@@ -4,6 +4,7 @@ interface MyTicketsTypes {
|
|
|
4
4
|
handleDetailsInfo: (id: string) => void;
|
|
5
5
|
onGetOrdersSuccess: (res: any) => void;
|
|
6
6
|
onGetOrdersError: (err: any) => void;
|
|
7
|
+
theme?: 'light' | 'dark';
|
|
7
8
|
}
|
|
8
|
-
export declare const MyTicketsContainer: ({ handleDetailsInfo, onGetOrdersSuccess, onGetOrdersError }: MyTicketsTypes) => JSX.Element;
|
|
9
|
+
export declare const MyTicketsContainer: ({ handleDetailsInfo, onGetOrdersSuccess, onGetOrdersError, theme, }: MyTicketsTypes) => JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -4,5 +4,5 @@ interface OrderDetailsTypes {
|
|
|
4
4
|
onGetOrdersSuccess: (res: any) => void;
|
|
5
5
|
onGetOrdersError: (err: any) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const OrderDetailsContainer: ({ onGetOrdersSuccess, onGetOrdersError }: OrderDetailsTypes) => JSX.Element;
|
|
7
|
+
export declare const OrderDetailsContainer: ({ onGetOrdersSuccess, onGetOrdersError, }: OrderDetailsTypes) => JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -14,5 +14,6 @@ export interface IPaymentPage {
|
|
|
14
14
|
onGetPaymentDataError: (value: AxiosError) => void;
|
|
15
15
|
onPaymentError: (value: AxiosError) => void;
|
|
16
16
|
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
17
|
+
fontFamily?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, }: IPaymentPage) => JSX.Element;
|
|
19
|
+
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, fontFamily, }: IPaymentPage) => JSX.Element;
|
package/dist/env.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const ENV: {
|
|
2
2
|
EVENT_ID: number;
|
|
3
3
|
BASE_URL: string;
|
|
4
4
|
CLIENT_ID: string;
|
|
5
5
|
CLIENT_SECRET: string;
|
|
6
6
|
STRIPE_PUBLISHABLE_KEY: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const ENV_PROD: {
|
|
9
9
|
EVENT_ID: number;
|
|
10
10
|
BASE_URL: string;
|
|
11
11
|
CLIENT_ID: string;
|
|
@@ -21,11 +21,11 @@ var _flatMapDeep = _interopDefault(require('lodash/flatMapDeep'));
|
|
|
21
21
|
var _isArray = _interopDefault(require('lodash/isArray'));
|
|
22
22
|
var nanoid = require('nanoid');
|
|
23
23
|
var TextField = _interopDefault(require('@mui/material/TextField'));
|
|
24
|
-
var styles = require('@mui/styles');
|
|
25
24
|
var FormGroup = _interopDefault(require('@mui/material/FormGroup'));
|
|
26
25
|
var FormControlLabel = _interopDefault(require('@mui/material/FormControlLabel'));
|
|
27
26
|
var Checkbox = _interopDefault(require('@mui/material/Checkbox'));
|
|
28
27
|
var Select = _interopDefault(require('@mui/material/Select'));
|
|
28
|
+
var styles = require('@mui/material/styles');
|
|
29
29
|
var Container = _interopDefault(require('@mui/material/Container'));
|
|
30
30
|
var Alert = _interopDefault(require('@mui/material/Alert'));
|
|
31
31
|
var reactStripeJs = require('@stripe/react-stripe-js');
|
|
@@ -924,14 +924,13 @@ var emailValidator = function emailValidator(email) {
|
|
|
924
924
|
};
|
|
925
925
|
|
|
926
926
|
// preview1
|
|
927
|
-
|
|
928
927
|
var ENV = {
|
|
929
|
-
EVENT_ID:
|
|
930
|
-
BASE_URL: 'https://
|
|
931
|
-
CLIENT_ID: '
|
|
928
|
+
EVENT_ID: 3483,
|
|
929
|
+
BASE_URL: 'https://preview1.ttf.fluxtech.me/api',
|
|
930
|
+
CLIENT_ID: '4792a61f2fcb49197ab4c2d2f44df570',
|
|
932
931
|
CLIENT_SECRET: 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9',
|
|
933
|
-
STRIPE_PUBLISHABLE_KEY: '
|
|
934
|
-
};
|
|
932
|
+
STRIPE_PUBLISHABLE_KEY: 'pk_test_51H4BkOGqveRD6EShliLrT9vd7mPOBPvQSuqmvc3wIinDqxWsCLeS2N7HonPPn6MhjU35ayYy5v4I6MLlD4jNWrd000NSgAF6UL'
|
|
933
|
+
}; // prod
|
|
935
934
|
|
|
936
935
|
var isWindowDefined = typeof window !== 'undefined';
|
|
937
936
|
var ttfHeaders = {
|
|
@@ -1087,6 +1086,13 @@ var getProfileData = function getProfileData(accessToken) {
|
|
|
1087
1086
|
headers: _extends({}, ttfHeaders, {
|
|
1088
1087
|
Authorization: "Bearer " + accessToken
|
|
1089
1088
|
})
|
|
1089
|
+
})["catch"](function (e) {
|
|
1090
|
+
if (isWindowDefined) {
|
|
1091
|
+
var event = new window.CustomEvent('auth_error', e);
|
|
1092
|
+
window.document.dispatchEvent(event);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
return e;
|
|
1090
1096
|
});
|
|
1091
1097
|
};
|
|
1092
1098
|
var getCountries = function getCountries() {
|
|
@@ -1689,13 +1695,6 @@ var assingUniqueIds = function assingUniqueIds(data) {
|
|
|
1689
1695
|
});
|
|
1690
1696
|
};
|
|
1691
1697
|
|
|
1692
|
-
var useStyles = /*#__PURE__*/styles.makeStyles({
|
|
1693
|
-
input: {
|
|
1694
|
-
'&::placeholder': {
|
|
1695
|
-
color: 'gray'
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
});
|
|
1699
1698
|
var CustomField = function CustomField(_ref) {
|
|
1700
1699
|
var label = _ref.label,
|
|
1701
1700
|
_ref$type = _ref.type,
|
|
@@ -1713,7 +1712,6 @@ var CustomField = function CustomField(_ref) {
|
|
|
1713
1712
|
var error = _get(errors, field.name);
|
|
1714
1713
|
|
|
1715
1714
|
var isTouched = Boolean(_get(touched, field.name)) || _includes(field.name, 'holder') && !!error && !!submitCount;
|
|
1716
|
-
var classes = useStyles();
|
|
1717
1715
|
return React__default.createElement(TextField, Object.assign({
|
|
1718
1716
|
id: field.name,
|
|
1719
1717
|
label: label,
|
|
@@ -1722,11 +1720,6 @@ var CustomField = function CustomField(_ref) {
|
|
|
1722
1720
|
fullWidth: true,
|
|
1723
1721
|
error: !!error && isTouched,
|
|
1724
1722
|
helperText: isTouched && error,
|
|
1725
|
-
InputProps: {
|
|
1726
|
-
classes: {
|
|
1727
|
-
input: classes.input
|
|
1728
|
-
}
|
|
1729
|
-
},
|
|
1730
1723
|
SelectProps: {
|
|
1731
1724
|
"native": true,
|
|
1732
1725
|
className: theme,
|
|
@@ -1772,13 +1765,6 @@ var getQueryVariable = function getQueryVariable(variable) {
|
|
|
1772
1765
|
return false;
|
|
1773
1766
|
};
|
|
1774
1767
|
|
|
1775
|
-
var useStyles$1 = /*#__PURE__*/styles.makeStyles({
|
|
1776
|
-
input: {
|
|
1777
|
-
'&::placeholder': {
|
|
1778
|
-
color: 'gray'
|
|
1779
|
-
}
|
|
1780
|
-
}
|
|
1781
|
-
});
|
|
1782
1768
|
var SelectField = function SelectField(_ref) {
|
|
1783
1769
|
var label = _ref.label,
|
|
1784
1770
|
_ref$type = _ref.type,
|
|
@@ -1794,7 +1780,6 @@ var SelectField = function SelectField(_ref) {
|
|
|
1794
1780
|
|
|
1795
1781
|
var error = _get(errors, field.name);
|
|
1796
1782
|
|
|
1797
|
-
var classes = useStyles$1();
|
|
1798
1783
|
return React__default.createElement(material.FormControl, {
|
|
1799
1784
|
fullWidth: true
|
|
1800
1785
|
}, React__default.createElement(material.InputLabel, {
|
|
@@ -1808,10 +1793,7 @@ var SelectField = function SelectField(_ref) {
|
|
|
1808
1793
|
fullWidth: true,
|
|
1809
1794
|
error: !!error && isTouched,
|
|
1810
1795
|
inputProps: {
|
|
1811
|
-
id: field.name
|
|
1812
|
-
classes: {
|
|
1813
|
-
input: classes.input
|
|
1814
|
-
}
|
|
1796
|
+
id: field.name
|
|
1815
1797
|
},
|
|
1816
1798
|
"native": true,
|
|
1817
1799
|
className: theme,
|
|
@@ -2027,7 +2009,15 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2027
2009
|
_ref3$onLoginSuccess = _ref3.onLoginSuccess,
|
|
2028
2010
|
onLoginSuccess = _ref3$onLoginSuccess === void 0 ? function () {} : _ref3$onLoginSuccess,
|
|
2029
2011
|
_ref3$isLoggedIn = _ref3.isLoggedIn,
|
|
2030
|
-
pIsLoggedIn = _ref3$isLoggedIn === void 0 ? false : _ref3$isLoggedIn
|
|
2012
|
+
pIsLoggedIn = _ref3$isLoggedIn === void 0 ? false : _ref3$isLoggedIn,
|
|
2013
|
+
fontFamily = _ref3.fontFamily;
|
|
2014
|
+
var themeMui = styles.createTheme({
|
|
2015
|
+
typography: {
|
|
2016
|
+
allVariants: {
|
|
2017
|
+
fontFamily: fontFamily
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
});
|
|
2031
2021
|
var isWindowDefined = typeof window !== 'undefined';
|
|
2032
2022
|
var userData = isWindowDefined && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
2033
2023
|
var access_token = isWindowDefined && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
@@ -2119,6 +2109,15 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2119
2109
|
return qty;
|
|
2120
2110
|
};
|
|
2121
2111
|
|
|
2112
|
+
var handleAuthErrors = React.useCallback(function () {
|
|
2113
|
+
setIsLoggedIn(false);
|
|
2114
|
+
}, []);
|
|
2115
|
+
React.useEffect(function () {
|
|
2116
|
+
isWindowDefined && window.document.addEventListener("auth_error", handleAuthErrors);
|
|
2117
|
+
return function () {
|
|
2118
|
+
isWindowDefined && window.document.removeEventListener("auth_error", handleAuthErrors);
|
|
2119
|
+
};
|
|
2120
|
+
}, [handleAuthErrors]);
|
|
2122
2121
|
React.useEffect(function () {
|
|
2123
2122
|
if ((pIsLoggedIn || access_token) && !isLoggedIn) {
|
|
2124
2123
|
setIsLoggedIn(true);
|
|
@@ -2276,7 +2275,9 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2276
2275
|
React.useEffect(function () {
|
|
2277
2276
|
fetchUserData(access_token);
|
|
2278
2277
|
}, [access_token]);
|
|
2279
|
-
return React__default.createElement(
|
|
2278
|
+
return React__default.createElement(styles.ThemeProvider, {
|
|
2279
|
+
theme: themeMui
|
|
2280
|
+
}, React__default.createElement(formik.Formik, {
|
|
2280
2281
|
initialValues: getInitialValues(dataWithUniqueIds, _extends({}, initialValues, {
|
|
2281
2282
|
email: emailLogged,
|
|
2282
2283
|
firstName: firstNameLogged,
|
|
@@ -2941,7 +2942,8 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2941
2942
|
_ref$onPaymentError = _ref.onPaymentError,
|
|
2942
2943
|
onPaymentError = _ref$onPaymentError === void 0 ? function () {} : _ref$onPaymentError,
|
|
2943
2944
|
_ref$stripeCardOption = _ref.stripeCardOptions,
|
|
2944
|
-
stripeCardOptions = _ref$stripeCardOption === void 0 ? {} : _ref$stripeCardOption
|
|
2945
|
+
stripeCardOptions = _ref$stripeCardOption === void 0 ? {} : _ref$stripeCardOption,
|
|
2946
|
+
fontFamily = _ref.fontFamily;
|
|
2945
2947
|
|
|
2946
2948
|
var _useState = React.useState(initialReviewValues),
|
|
2947
2949
|
reviewData = _useState[0],
|
|
@@ -3116,7 +3118,16 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3116
3118
|
};
|
|
3117
3119
|
}();
|
|
3118
3120
|
|
|
3119
|
-
|
|
3121
|
+
var themeMui = styles.createTheme({
|
|
3122
|
+
typography: {
|
|
3123
|
+
allVariants: {
|
|
3124
|
+
fontFamily: fontFamily
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
});
|
|
3128
|
+
return React__default.createElement(styles.ThemeProvider, {
|
|
3129
|
+
theme: themeMui
|
|
3130
|
+
}, React__default.createElement("div", {
|
|
3120
3131
|
className: "payment_page"
|
|
3121
3132
|
}, error && React__default.createElement(Alert, {
|
|
3122
3133
|
severity: "error",
|
|
@@ -3164,7 +3175,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3164
3175
|
},
|
|
3165
3176
|
conditions: conditions,
|
|
3166
3177
|
stripeCardOptions: stripeCardOptions
|
|
3167
|
-
}))))));
|
|
3178
|
+
})))))));
|
|
3168
3179
|
};
|
|
3169
3180
|
|
|
3170
3181
|
var defaultSvg = 'https://img.icons8.com/ios-filled/50/000000/facebook-new.svg';
|
|
@@ -3375,6 +3386,9 @@ var TicketRow = function TicketRow(_ref) {
|
|
|
3375
3386
|
}, React__default.createElement(FormControl, {
|
|
3376
3387
|
fullWidth: true
|
|
3377
3388
|
}, React__default.createElement(Select, {
|
|
3389
|
+
sx: {
|
|
3390
|
+
borderRadius: 0
|
|
3391
|
+
},
|
|
3378
3392
|
value: selectedTickets[ticketTier.id] ? selectedTickets[ticketTier.id] : 0,
|
|
3379
3393
|
onChange: handleTicketSelect,
|
|
3380
3394
|
displayEmpty: true,
|
|
@@ -3969,7 +3983,9 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
3969
3983
|
_ref$onGetOrdersSucce = _ref.onGetOrdersSuccess,
|
|
3970
3984
|
onGetOrdersSuccess = _ref$onGetOrdersSucce === void 0 ? function () {} : _ref$onGetOrdersSucce,
|
|
3971
3985
|
_ref$onGetOrdersError = _ref.onGetOrdersError,
|
|
3972
|
-
onGetOrdersError = _ref$onGetOrdersError === void 0 ? function () {} : _ref$onGetOrdersError
|
|
3986
|
+
onGetOrdersError = _ref$onGetOrdersError === void 0 ? function () {} : _ref$onGetOrdersError,
|
|
3987
|
+
_ref$theme = _ref.theme,
|
|
3988
|
+
theme = _ref$theme === void 0 ? 'dark' : _ref$theme;
|
|
3973
3989
|
|
|
3974
3990
|
var _useState = React.useState(null),
|
|
3975
3991
|
data = _useState[0],
|
|
@@ -4052,9 +4068,9 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
4052
4068
|
};
|
|
4053
4069
|
|
|
4054
4070
|
return React__default.createElement("div", {
|
|
4055
|
-
className:
|
|
4071
|
+
className: "my-ticket " + theme
|
|
4056
4072
|
}, loading && React__default.createElement("div", {
|
|
4057
|
-
className:
|
|
4073
|
+
className: "loading"
|
|
4058
4074
|
}, React__default.createElement(CircularProgress, null)), data && React__default.createElement(React__default.Fragment, null, React__default.createElement(Autocomplete, {
|
|
4059
4075
|
disablePortal: true,
|
|
4060
4076
|
id: "combo-box-demo",
|
|
@@ -4073,7 +4089,7 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
4073
4089
|
}
|
|
4074
4090
|
}), React__default.createElement(TableContainer, {
|
|
4075
4091
|
component: Paper,
|
|
4076
|
-
className:
|
|
4092
|
+
className: "my-ticket-table"
|
|
4077
4093
|
}, React__default.createElement(Table, {
|
|
4078
4094
|
"aria-label": "collapsible table"
|
|
4079
4095
|
}, React__default.createElement(TableHead, null, React__default.createElement(TableRow, null, tableConfig().header.map(function (column, index) {
|
|
@@ -4142,7 +4158,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
4142
4158
|
_ref$onGetOrdersError = _ref.onGetOrdersError,
|
|
4143
4159
|
onGetOrdersError = _ref$onGetOrdersError === void 0 ? function () {} : _ref$onGetOrdersError;
|
|
4144
4160
|
|
|
4145
|
-
var _useState = React.useState(
|
|
4161
|
+
var _useState = React.useState({}),
|
|
4146
4162
|
data = _useState[0],
|
|
4147
4163
|
setData = _useState[1];
|
|
4148
4164
|
|
|
@@ -4152,7 +4168,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
4152
4168
|
|
|
4153
4169
|
React.useEffect(function () {
|
|
4154
4170
|
_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
4155
|
-
var orderId, response, _data;
|
|
4171
|
+
var orderId, params, response, _data;
|
|
4156
4172
|
|
|
4157
4173
|
return runtime_1.wrap(function _callee$(_context) {
|
|
4158
4174
|
while (1) {
|
|
@@ -4160,50 +4176,58 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
4160
4176
|
case 0:
|
|
4161
4177
|
_context.prev = 0;
|
|
4162
4178
|
setLoading(true);
|
|
4163
|
-
orderId =
|
|
4164
|
-
|
|
4179
|
+
orderId = '';
|
|
4180
|
+
|
|
4181
|
+
if (typeof window !== 'undefined') {
|
|
4182
|
+
params = new URL("" + window.location).searchParams;
|
|
4183
|
+
orderId = params.get('o') || '';
|
|
4184
|
+
}
|
|
4185
|
+
|
|
4186
|
+
_context.next = 6;
|
|
4165
4187
|
return getOrderDetails(orderId);
|
|
4166
4188
|
|
|
4167
|
-
case
|
|
4189
|
+
case 6:
|
|
4168
4190
|
response = _context.sent;
|
|
4169
4191
|
onGetOrdersSuccess(response);
|
|
4170
4192
|
_data = _get(response, 'data.data.attributes');
|
|
4171
4193
|
setData(_data);
|
|
4172
|
-
_context.next =
|
|
4194
|
+
_context.next = 15;
|
|
4173
4195
|
break;
|
|
4174
4196
|
|
|
4175
|
-
case
|
|
4176
|
-
_context.prev =
|
|
4197
|
+
case 12:
|
|
4198
|
+
_context.prev = 12;
|
|
4177
4199
|
_context.t0 = _context["catch"](0);
|
|
4178
4200
|
onGetOrdersError(_context.t0);
|
|
4179
4201
|
|
|
4180
|
-
case
|
|
4181
|
-
_context.prev =
|
|
4202
|
+
case 15:
|
|
4203
|
+
_context.prev = 15;
|
|
4182
4204
|
setLoading(false);
|
|
4183
|
-
return _context.finish(
|
|
4205
|
+
return _context.finish(15);
|
|
4184
4206
|
|
|
4185
|
-
case
|
|
4207
|
+
case 18:
|
|
4186
4208
|
case "end":
|
|
4187
4209
|
return _context.stop();
|
|
4188
4210
|
}
|
|
4189
4211
|
}
|
|
4190
|
-
}, _callee, null, [[0,
|
|
4212
|
+
}, _callee, null, [[0, 12, 15, 18]]);
|
|
4191
4213
|
}))();
|
|
4192
4214
|
}, []);
|
|
4193
4215
|
return React__default.createElement("div", {
|
|
4194
4216
|
className: "order-details"
|
|
4195
4217
|
}, loading ? React__default.createElement("div", {
|
|
4196
|
-
className:
|
|
4218
|
+
className: "loading"
|
|
4197
4219
|
}, React__default.createElement(CircularProgress, null)) : React__default.createElement(React__default.Fragment, null, React__default.createElement("h1", {
|
|
4198
|
-
className:
|
|
4220
|
+
className: "layout-title"
|
|
4199
4221
|
}, "Order Details"), React__default.createElement("div", {
|
|
4200
|
-
className:
|
|
4222
|
+
className: "order-summary-box"
|
|
4201
4223
|
}, React__default.createElement("h4", {
|
|
4202
|
-
className:
|
|
4203
|
-
}, "Order Summary"), React__default.createElement("div",
|
|
4224
|
+
className: "sub-title"
|
|
4225
|
+
}, "Order Summary"), React__default.createElement("div", {
|
|
4226
|
+
className: "personal-link"
|
|
4227
|
+
}, React__default.createElement("b", null, "Your personal share link for this event is: "), React__default.createElement("a", {
|
|
4204
4228
|
href: data == null ? void 0 : data.personal_share_link,
|
|
4205
|
-
target:
|
|
4206
|
-
rel:
|
|
4229
|
+
target: "_blank",
|
|
4230
|
+
rel: "noreferrer"
|
|
4207
4231
|
}, data == null ? void 0 : data.personal_share_link)), React__default.createElement(TableContainer, {
|
|
4208
4232
|
component: Paper
|
|
4209
4233
|
}, React__default.createElement(Table, {
|
|
@@ -4217,10 +4241,20 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
4217
4241
|
key: index
|
|
4218
4242
|
}, React__default.createElement(TableCell, null, React__default.createElement("b", null, "Add-On: "), ticket.name), React__default.createElement(TableCell, null, ticket.currency + ticket.price), React__default.createElement(TableCell, null, ticket.quantity), React__default.createElement(TableCell, null, ticket.currency + ticket.total));
|
|
4219
4243
|
}), React__default.createElement(TableRow, {
|
|
4220
|
-
className:
|
|
4244
|
+
className: "total-row"
|
|
4221
4245
|
}, React__default.createElement(TableCell, null), React__default.createElement(TableCell, null), React__default.createElement(TableCell, null, "Total"), React__default.createElement(TableCell, null, getTotal(data))))))), React__default.createElement(TicketsTable, {
|
|
4222
4246
|
tickets: data.tickets
|
|
4223
|
-
})
|
|
4247
|
+
}), React__default.createElement("div", {
|
|
4248
|
+
className: "return-button-container"
|
|
4249
|
+
}, React__default.createElement("button", {
|
|
4250
|
+
type: "button",
|
|
4251
|
+
className: "return-button",
|
|
4252
|
+
onClick: function onClick() {
|
|
4253
|
+
if (typeof window !== 'undefined') {
|
|
4254
|
+
window.location.assign('/orders');
|
|
4255
|
+
}
|
|
4256
|
+
}
|
|
4257
|
+
}, "Return to Order History"))));
|
|
4224
4258
|
};
|
|
4225
4259
|
|
|
4226
4260
|
exports.BillingInfoContainer = BillingInfoContainer;
|