tf-checkout-react 1.3.20 → 1.3.23
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/orderDetailsContainer/index.d.ts +2 -1
- package/dist/components/ticketsContainer/TicketsSection.d.ts +1 -1
- package/dist/tf-checkout-react.cjs.development.js +18 -10
- 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 +18 -10
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/api/index.ts +12 -5
- package/src/components/orderDetailsContainer/index.tsx +4 -2
- package/src/components/orderDetailsContainer/ticketsTable.tsx +1 -1
- package/src/components/ticketsContainer/TicketsSection.tsx +4 -3
|
@@ -19,6 +19,7 @@ interface OrderDetailsTypes {
|
|
|
19
19
|
key: keyof ITicketTypes & keyof IActionColumns;
|
|
20
20
|
label: string | number | null | undefined;
|
|
21
21
|
}>;
|
|
22
|
+
ordersPath?: string;
|
|
22
23
|
}
|
|
23
|
-
export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, ticketsTableColumns, }: OrderDetailsTypes) => JSX.Element;
|
|
24
|
+
export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, ticketsTableColumns, ordersPath, }: OrderDetailsTypes) => JSX.Element;
|
|
24
25
|
export {};
|
|
@@ -1351,11 +1351,16 @@ function getEvent(id, pk) {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
function getTickets(id, promoCode, pk) {
|
|
1353
1353
|
var invitationHash = getQueryVariable('invitation-hash');
|
|
1354
|
+
var params = {
|
|
1355
|
+
pk: pk
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
if (invitationHash) {
|
|
1359
|
+
params['invitation-hash'] = invitationHash;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1354
1362
|
var response = publicRequest.get("v1/event/" + id + "/tickets", {
|
|
1355
|
-
params:
|
|
1356
|
-
pk: pk,
|
|
1357
|
-
'invitation-hash': invitationHash
|
|
1358
|
-
},
|
|
1363
|
+
params: params,
|
|
1359
1364
|
headers: promoCode ? _extends({}, ttfHeaders, {
|
|
1360
1365
|
'Promotion-Event': String(id),
|
|
1361
1366
|
'Promotion-Code': promoCode
|
|
@@ -5438,7 +5443,7 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
5438
5443
|
}
|
|
5439
5444
|
|
|
5440
5445
|
var ticketIsFree = +ticket.price === 0;
|
|
5441
|
-
var ticketPrice = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : "
|
|
5446
|
+
var ticketPrice = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : "\xA3 " + (+ticket.price).toFixed(2);
|
|
5442
5447
|
return React__default.createElement("div", {
|
|
5443
5448
|
key: ticket.id || ticket.name,
|
|
5444
5449
|
className: "event-detail__tier " + (isSoldOut ? 'disabled' : '')
|
|
@@ -5450,7 +5455,7 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
5450
5455
|
className: "event-detail__tier-price"
|
|
5451
5456
|
}, ticketIsDiscounted && React__default.createElement("p", {
|
|
5452
5457
|
className: "old-price"
|
|
5453
|
-
}, "
|
|
5458
|
+
}, "\xA3 ", (+ticket.oldPrice).toFixed(2)), React__default.createElement("p", {
|
|
5454
5459
|
className: isSoldOut ? 'sold-out' : ''
|
|
5455
5460
|
}, ticketPrice), !isSoldOut && !ticketIsFree && React__default.createElement("p", {
|
|
5456
5461
|
className: "fees"
|
|
@@ -6564,7 +6569,9 @@ var TicketsTable = function TicketsTable(_ref) {
|
|
|
6564
6569
|
return _map(columns, function (column, columnIndex) {
|
|
6565
6570
|
if (column.key === 'download') {
|
|
6566
6571
|
var ticketIsDownloading = pdfDownload.loading && pdfDownload.hash === ticket.hash;
|
|
6567
|
-
if (!ticket.pdf_link || ticket.status === 'Sold' || ticket.is_on_sale) return
|
|
6572
|
+
if (!ticket.pdf_link || ticket.status === 'Sold' || ticket.is_on_sale) return React__default.createElement(TableCell, {
|
|
6573
|
+
key: columnIndex
|
|
6574
|
+
}, null);
|
|
6568
6575
|
return React__default.createElement(TableCell, {
|
|
6569
6576
|
key: columnIndex
|
|
6570
6577
|
}, Boolean(icon) && React__default.createElement("img", {
|
|
@@ -6737,7 +6744,8 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6737
6744
|
personalLinkIcon = _ref$personalLinkIcon === void 0 ? '' : _ref$personalLinkIcon,
|
|
6738
6745
|
_ref$displayColumnNam = _ref.displayColumnNameInRow,
|
|
6739
6746
|
displayColumnNameInRow = _ref$displayColumnNam === void 0 ? false : _ref$displayColumnNam,
|
|
6740
|
-
ticketsTableColumns = _ref.ticketsTableColumns
|
|
6747
|
+
ticketsTableColumns = _ref.ticketsTableColumns,
|
|
6748
|
+
ordersPath = _ref.ordersPath;
|
|
6741
6749
|
|
|
6742
6750
|
var _useState = React.useState({}),
|
|
6743
6751
|
data = _useState[0],
|
|
@@ -6996,7 +7004,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6996
7004
|
className: "return-button",
|
|
6997
7005
|
onClick: function onClick() {
|
|
6998
7006
|
if (typeof window !== 'undefined') {
|
|
6999
|
-
window.location.assign('/orders');
|
|
7007
|
+
window.location.assign(ordersPath != null ? ordersPath : '/orders');
|
|
7000
7008
|
}
|
|
7001
7009
|
}
|
|
7002
7010
|
}, "Back to Orders")))), !(data != null && data.disable_referral) && React__default.createElement("div", {
|
|
@@ -7064,7 +7072,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
7064
7072
|
if (onReturnButtonClick) {
|
|
7065
7073
|
onReturnButtonClick(data);
|
|
7066
7074
|
} else if (typeof window !== 'undefined') {
|
|
7067
|
-
window.location.assign('/orders');
|
|
7075
|
+
window.location.assign(ordersPath != null ? ordersPath : '/orders');
|
|
7068
7076
|
}
|
|
7069
7077
|
}
|
|
7070
7078
|
}, "Return to Order History"))), showResaleModal && React__default.createElement(TicketResaleModal, {
|