tf-checkout-react 1.3.48-beta.4 → 1.3.48-beta.6
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 -2
- package/dist/components/paymentContainer/index.d.ts +2 -2
- package/dist/components/seatMapContainer/SeatMapComponent.d.ts +5 -0
- package/dist/tf-checkout-react.cjs.development.js +83 -79
- 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 +83 -79
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/orderDetailsContainer/index.tsx +24 -26
- package/src/components/paymentContainer/index.tsx +6 -7
- package/src/components/seatMapContainer/SeatMapComponent.tsx +13 -1
- package/src/components/seatMapContainer/TicketsSection.tsx +7 -6
- package/src/components/seatMapContainer/addToCart.ts +5 -1
- package/src/components/seatMapContainer/index.tsx +9 -3
- package/src/components/seatMapContainer/utils.ts +3 -3
- package/src/components/ticketsContainer/TicketsSection.tsx +1 -3
- package/src/components/ticketsContainer/index.tsx +4 -2
- package/src/types/seatMap.d.ts +2 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import './style.css';
|
|
3
3
|
import { IActionColumns, ITicketTypes } from './ticketsTable';
|
|
4
4
|
interface OrderDetailsTypes {
|
|
5
|
-
|
|
5
|
+
columns: Array<{
|
|
6
6
|
label: string;
|
|
7
7
|
}>;
|
|
8
8
|
onGetOrdersSuccess: (res: any) => void;
|
|
@@ -21,5 +21,5 @@ interface OrderDetailsTypes {
|
|
|
21
21
|
}>;
|
|
22
22
|
ordersPath?: string;
|
|
23
23
|
}
|
|
24
|
-
export declare const OrderDetailsContainer: ({
|
|
24
|
+
export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, ticketsTableColumns, ordersPath, }: OrderDetailsTypes) => JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -6,7 +6,7 @@ import { StripeCardNumberElementOptions, StripeElementsOptions } from '@stripe/s
|
|
|
6
6
|
import { AxiosError } from 'axios';
|
|
7
7
|
import { IPaymentField } from '../../types';
|
|
8
8
|
export interface IPaymentPage {
|
|
9
|
-
|
|
9
|
+
paymentFields: IPaymentField[];
|
|
10
10
|
handlePayment: any;
|
|
11
11
|
checkoutData: any;
|
|
12
12
|
formTitle?: string;
|
|
@@ -29,4 +29,4 @@ export interface IPaymentPage {
|
|
|
29
29
|
paymentInfoLabel?: string;
|
|
30
30
|
orderInfoLabel?: string;
|
|
31
31
|
}
|
|
32
|
-
export declare const PaymentContainer: ({
|
|
32
|
+
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions, onCountdownFinish, enableTimer, enablePaymentPlan, paymentButtonText, orderInfoLabel, paymentInfoLabel, }: IPaymentPage) => JSX.Element;
|
|
@@ -3767,8 +3767,8 @@ var initialReviewValues = {
|
|
|
3767
3767
|
billing_info: {}
|
|
3768
3768
|
};
|
|
3769
3769
|
var PaymentContainer = function PaymentContainer(_ref) {
|
|
3770
|
-
var _ref$
|
|
3771
|
-
|
|
3770
|
+
var _ref$paymentFields = _ref.paymentFields,
|
|
3771
|
+
paymentFields = _ref$paymentFields === void 0 ? [] : _ref$paymentFields,
|
|
3772
3772
|
handlePayment = _ref.handlePayment,
|
|
3773
3773
|
_ref$formTitle = _ref.formTitle,
|
|
3774
3774
|
formTitle = _ref$formTitle === void 0 ? 'Get Your Tickets' : _ref$formTitle,
|
|
@@ -3969,7 +3969,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3969
3969
|
};
|
|
3970
3970
|
}();
|
|
3971
3971
|
var themeMui = styles.createTheme(themeOptions);
|
|
3972
|
-
var
|
|
3972
|
+
var paymentFieldsData = orderData.guest_count ? [{
|
|
3973
3973
|
label: 'Event',
|
|
3974
3974
|
id: 'product_name'
|
|
3975
3975
|
}, {
|
|
@@ -3999,7 +3999,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3999
3999
|
normalizer: function normalizer(value, currency) {
|
|
4000
4000
|
return currencyNormalizerCreator(createFixedFloatNormalizer(2)(parseFloat(value)), currency);
|
|
4001
4001
|
}
|
|
4002
|
-
}] :
|
|
4002
|
+
}] : paymentFields;
|
|
4003
4003
|
return React__default.createElement(styles.ThemeProvider, {
|
|
4004
4004
|
theme: themeMui
|
|
4005
4005
|
}, React__default.createElement("div", {
|
|
@@ -4018,7 +4018,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4018
4018
|
className: "order_info_text"
|
|
4019
4019
|
}, orderInfoLabel), React__default.createElement("div", {
|
|
4020
4020
|
className: "order_info_section"
|
|
4021
|
-
}, _map(
|
|
4021
|
+
}, _map(paymentFieldsData, function (field) {
|
|
4022
4022
|
var id = field.id,
|
|
4023
4023
|
label = field.label,
|
|
4024
4024
|
_field$className = field.className,
|
|
@@ -5032,10 +5032,7 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
5032
5032
|
handleTicketSelect = _ref.handleTicketSelect,
|
|
5033
5033
|
sortBySoldOut = _ref.sortBySoldOut,
|
|
5034
5034
|
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
5035
|
-
|
|
5036
|
-
tableTicketsHeaderComponent = _ref$tableTicketsHead === void 0 ? React__default.createElement("div", {
|
|
5037
|
-
className: "tickets-container-header"
|
|
5038
|
-
}, "RESERVE TABLES") : _ref$tableTicketsHead,
|
|
5035
|
+
tableTicketsHeaderComponent = _ref.tableTicketsHeaderComponent,
|
|
5039
5036
|
hideTicketsHeader = _ref.hideTicketsHeader,
|
|
5040
5037
|
hideTableTicketsHeader = _ref.hideTableTicketsHeader,
|
|
5041
5038
|
showGroupNameBlock = _ref.showGroupNameBlock,
|
|
@@ -5432,7 +5429,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5432
5429
|
var handleBook = /*#__PURE__*/function () {
|
|
5433
5430
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
5434
5431
|
var _product_options, _product_options2, _ticket_types;
|
|
5435
|
-
var ticket, optionName, ticketId, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$hide, _pageConfigsData$has_, _pageConfigsData$free, _pageConfigsData$coll, _pageConfigsData$coll2, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hidePhoneField, hasAddOn, freeTicket, collectOptionalWalletAddress, collectMandatoryWalletAddress, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult, message, _isInvalidLinkError, _isNotInvitedError;
|
|
5432
|
+
var ticket, optionName, ticketId, isTableType, productCartQuantity, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$hide, _pageConfigsData$has_, _pageConfigsData$free, _pageConfigsData$coll, _pageConfigsData$coll2, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hidePhoneField, hasAddOn, freeTicket, collectOptionalWalletAddress, collectMandatoryWalletAddress, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult, message, _isInvalidLinkError, _isNotInvitedError;
|
|
5436
5433
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
5437
5434
|
while (1) switch (_context2.prev = _context2.next) {
|
|
5438
5435
|
case 0:
|
|
@@ -5442,11 +5439,13 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5442
5439
|
}) || {};
|
|
5443
5440
|
optionName = _get(ticket, 'optionName');
|
|
5444
5441
|
ticketId = _get(ticket, 'id');
|
|
5445
|
-
|
|
5442
|
+
isTableType = _get(ticket, 'isTable', false);
|
|
5443
|
+
productCartQuantity = +selectedTickets[ticket.id];
|
|
5444
|
+
ticketQuantity = isTableType ? 1 : +selectedTickets[ticket.id];
|
|
5446
5445
|
data = {
|
|
5447
5446
|
attributes: {
|
|
5448
5447
|
alternative_view_id: null,
|
|
5449
|
-
product_cart_quantity:
|
|
5448
|
+
product_cart_quantity: productCartQuantity,
|
|
5450
5449
|
product_options: (_product_options = {}, _product_options[optionName] = ticketId, _product_options),
|
|
5451
5450
|
product_id: eventId,
|
|
5452
5451
|
ticket_types: (_ticket_types = {}, _ticket_types[ticketId] = {
|
|
@@ -5455,32 +5454,32 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5455
5454
|
}, _ticket_types)
|
|
5456
5455
|
}
|
|
5457
5456
|
};
|
|
5458
|
-
_context2.prev =
|
|
5459
|
-
_context2.next =
|
|
5457
|
+
_context2.prev = 8;
|
|
5458
|
+
_context2.next = 11;
|
|
5460
5459
|
return addToCart(eventId, data);
|
|
5461
|
-
case
|
|
5460
|
+
case 11:
|
|
5462
5461
|
result = _context2.sent;
|
|
5463
5462
|
if (!enableAddOns) {
|
|
5464
|
-
_context2.next =
|
|
5463
|
+
_context2.next = 18;
|
|
5465
5464
|
break;
|
|
5466
5465
|
}
|
|
5467
|
-
_context2.next =
|
|
5466
|
+
_context2.next = 15;
|
|
5468
5467
|
return getCheckoutPageConfigs();
|
|
5469
|
-
case
|
|
5468
|
+
case 15:
|
|
5470
5469
|
_context2.t0 = _context2.sent;
|
|
5471
|
-
_context2.next =
|
|
5470
|
+
_context2.next = 19;
|
|
5472
5471
|
break;
|
|
5473
|
-
case
|
|
5472
|
+
case 18:
|
|
5474
5473
|
_context2.t0 = {
|
|
5475
5474
|
status: 200,
|
|
5476
5475
|
data: {
|
|
5477
5476
|
attributes: _get(result, 'data.data.attributes')
|
|
5478
5477
|
}
|
|
5479
5478
|
};
|
|
5480
|
-
case
|
|
5479
|
+
case 19:
|
|
5481
5480
|
pageConfigsDataResponse = _context2.t0;
|
|
5482
5481
|
if (!(result.status === 200 && pageConfigsDataResponse.status === 200)) {
|
|
5483
|
-
_context2.next =
|
|
5482
|
+
_context2.next = 50;
|
|
5484
5483
|
break;
|
|
5485
5484
|
}
|
|
5486
5485
|
pageConfigsData = _get(pageConfigsDataResponse, 'data.attributes') || {};
|
|
@@ -5498,7 +5497,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5498
5497
|
_isWindowDefined = typeof window !== 'undefined';
|
|
5499
5498
|
_isWindowDefined && window.localStorage.removeItem('add_ons');
|
|
5500
5499
|
if (!(skipBillingPage && !hasAddOn)) {
|
|
5501
|
-
_context2.next =
|
|
5500
|
+
_context2.next = 49;
|
|
5502
5501
|
break;
|
|
5503
5502
|
}
|
|
5504
5503
|
// Get user data for checkout data
|
|
@@ -5506,22 +5505,22 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5506
5505
|
access_token = _isWindowDefined && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
5507
5506
|
checkoutBody = createCheckoutDataBodyWithDefaultHolder(ticketQuantity, userData);
|
|
5508
5507
|
if (!enableBillingInfoAutoCreate) {
|
|
5509
|
-
_context2.next =
|
|
5508
|
+
_context2.next = 45;
|
|
5510
5509
|
break;
|
|
5511
5510
|
}
|
|
5512
|
-
_context2.next =
|
|
5511
|
+
_context2.next = 42;
|
|
5513
5512
|
return postOnCheckout(checkoutBody, access_token, freeTicket);
|
|
5514
|
-
case
|
|
5513
|
+
case 42:
|
|
5515
5514
|
_context2.t1 = _context2.sent;
|
|
5516
|
-
_context2.next =
|
|
5515
|
+
_context2.next = 46;
|
|
5517
5516
|
break;
|
|
5518
|
-
case
|
|
5517
|
+
case 45:
|
|
5519
5518
|
_context2.t1 = null;
|
|
5520
|
-
case
|
|
5519
|
+
case 46:
|
|
5521
5520
|
checkoutResult = _context2.t1;
|
|
5522
5521
|
hash = _get(checkoutResult, 'data.data.attributes.hash');
|
|
5523
5522
|
total = _get(checkoutResult, 'data.data.attributes.total');
|
|
5524
|
-
case
|
|
5523
|
+
case 49:
|
|
5525
5524
|
onAddToCartSuccess({
|
|
5526
5525
|
skip_billing_page: skipBillingPage,
|
|
5527
5526
|
names_required: nameIsRequired,
|
|
@@ -5536,12 +5535,12 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5536
5535
|
total: total,
|
|
5537
5536
|
hasAddOn: hasAddOn
|
|
5538
5537
|
});
|
|
5539
|
-
case 48:
|
|
5540
|
-
_context2.next = 53;
|
|
5541
|
-
break;
|
|
5542
5538
|
case 50:
|
|
5543
|
-
_context2.
|
|
5544
|
-
|
|
5539
|
+
_context2.next = 55;
|
|
5540
|
+
break;
|
|
5541
|
+
case 52:
|
|
5542
|
+
_context2.prev = 52;
|
|
5543
|
+
_context2.t2 = _context2["catch"](8);
|
|
5545
5544
|
if (axios.isAxiosError(_context2.t2)) {
|
|
5546
5545
|
onAddToCartError(_context2.t2);
|
|
5547
5546
|
message = _get(_context2.t2, 'response.data.message', '');
|
|
@@ -5555,15 +5554,15 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5555
5554
|
setError(message);
|
|
5556
5555
|
}
|
|
5557
5556
|
}
|
|
5558
|
-
case
|
|
5559
|
-
_context2.prev =
|
|
5557
|
+
case 55:
|
|
5558
|
+
_context2.prev = 55;
|
|
5560
5559
|
setHandleBookIsLoading(false);
|
|
5561
|
-
return _context2.finish(
|
|
5562
|
-
case
|
|
5560
|
+
return _context2.finish(55);
|
|
5561
|
+
case 58:
|
|
5563
5562
|
case "end":
|
|
5564
5563
|
return _context2.stop();
|
|
5565
5564
|
}
|
|
5566
|
-
}, _callee2, null, [[
|
|
5565
|
+
}, _callee2, null, [[8, 52, 55, 58]]);
|
|
5567
5566
|
}));
|
|
5568
5567
|
return function handleBook() {
|
|
5569
5568
|
return _ref4.apply(this, arguments);
|
|
@@ -6338,8 +6337,8 @@ var getTotal = function getTotal(data) {
|
|
|
6338
6337
|
};
|
|
6339
6338
|
var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
6340
6339
|
var _data$items, _data$items$ticket_ty, _data$items2, _data$items2$add_ons;
|
|
6341
|
-
var _ref$
|
|
6342
|
-
|
|
6340
|
+
var _ref$columns = _ref.columns,
|
|
6341
|
+
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
6343
6342
|
_ref$onGetOrdersSucce = _ref.onGetOrdersSuccess,
|
|
6344
6343
|
onGetOrdersSuccess = _ref$onGetOrdersSucce === void 0 ? _identity : _ref$onGetOrdersSucce,
|
|
6345
6344
|
_ref$onGetOrdersError = _ref.onGetOrdersError,
|
|
@@ -6546,7 +6545,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6546
6545
|
var date = moment.tz(data.date, data.timezone).format('dddd, DD MMMM YYYY');
|
|
6547
6546
|
orderSummery += " " + date;
|
|
6548
6547
|
}
|
|
6549
|
-
var
|
|
6548
|
+
var columnsProps = data.tickets && data.tickets[0].is_table ? [{
|
|
6550
6549
|
label: 'Items'
|
|
6551
6550
|
}, {
|
|
6552
6551
|
label: 'Price'
|
|
@@ -6556,7 +6555,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6556
6555
|
label: 'Deposit paid'
|
|
6557
6556
|
}, {
|
|
6558
6557
|
label: 'Remaining'
|
|
6559
|
-
}] :
|
|
6558
|
+
}] : columns;
|
|
6560
6559
|
return React__default.createElement("div", {
|
|
6561
6560
|
className: "order-details"
|
|
6562
6561
|
}, loading ? React__default.createElement("div", {
|
|
@@ -6603,17 +6602,15 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6603
6602
|
}, React__default.createElement(Table, {
|
|
6604
6603
|
className: "tt-type",
|
|
6605
6604
|
"aria-label": "collapsible table"
|
|
6606
|
-
}, React__default.createElement(TableHead, null, React__default.createElement(TableRow, null, _map(
|
|
6605
|
+
}, React__default.createElement(TableHead, null, React__default.createElement(TableRow, null, _map(columnsProps, function (item) {
|
|
6607
6606
|
return React__default.createElement(TableCell, null, item.label || '');
|
|
6608
|
-
}))), React__default.createElement(TableBody, null,
|
|
6609
|
-
return React__default.createElement(TableRow, {
|
|
6607
|
+
}))), React__default.createElement(TableBody, null, data == null ? void 0 : (_data$items = data.items) == null ? void 0 : (_data$items$ticket_ty = _data$items.ticket_types) == null ? void 0 : _data$items$ticket_ty.map(function (ticket, index) {
|
|
6608
|
+
return data != null && data.tickets && !(data != null && data.tickets[0].is_table) ? React__default.createElement(TableRow, {
|
|
6610
6609
|
key: index
|
|
6611
|
-
}, React__default.createElement(TableCell, null, React__default.createElement("b", null, "Ticket Type:"), " ", ticket.name), React__default.createElement(TableCell, null, ticket.currency + ticket.price), React__default.createElement(TableCell, null, ticket.
|
|
6612
|
-
}) : function (ticket, index) {
|
|
6613
|
-
return React__default.createElement(TableRow, {
|
|
6610
|
+
}, React__default.createElement(TableCell, null, React__default.createElement("b", null, "Ticket Type:"), " ", 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)) : React__default.createElement(TableRow, {
|
|
6614
6611
|
key: index
|
|
6615
|
-
}, React__default.createElement(TableCell, null, React__default.createElement("b", null, "Ticket Type:"), " ", ticket.name), React__default.createElement(TableCell, null, ticket.currency + ticket.price), React__default.createElement(TableCell, null, ticket.
|
|
6616
|
-
}, data == null ? void 0 : (_data$items2 = data.items) == null ? void 0 : (_data$items2$add_ons = _data$items2.add_ons) == null ? void 0 : _data$items2$add_ons.map(function (ticket, index) {
|
|
6612
|
+
}, React__default.createElement(TableCell, null, React__default.createElement("b", null, "Ticket Type:"), " ", ticket.name), React__default.createElement(TableCell, null, ticket.currency + ticket.price), React__default.createElement(TableCell, null, ticket.guests_count), React__default.createElement(TableCell, null, ticket.deposit_paid), React__default.createElement(TableCell, null, ticket.remaining));
|
|
6613
|
+
}), data == null ? void 0 : (_data$items2 = data.items) == null ? void 0 : (_data$items2$add_ons = _data$items2.add_ons) == null ? void 0 : _data$items2$add_ons.map(function (ticket, index) {
|
|
6617
6614
|
return React__default.createElement(TableRow, {
|
|
6618
6615
|
key: index
|
|
6619
6616
|
}, 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));
|
|
@@ -7482,7 +7479,7 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
7482
7479
|
|
|
7483
7480
|
var addToCartFunc = /*#__PURE__*/function () {
|
|
7484
7481
|
var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
7485
|
-
var eventId, data, ticketQuantity, _ref$enableBillingInf, enableBillingInfoAutoCreate, isWindowDefined, result, pageConfigsDataResponse, pageConfigsData, _pageConfigsData$skip, skipBillingPage, _pageConfigsData$name, nameIsRequired, _pageConfigsData$age_, ageIsRequired, _pageConfigsData$phon, phoneIsRequired, _pageConfigsData$hide, hidePhoneField, _pageConfigsData$has_, hasAddOn, _pageConfigsData$free, freeTicket, _pageConfigsData$coll, collectOptionalWalletAddress, _pageConfigsData$coll2, collectMandatoryWalletAddress, hash, total, userData, checkoutBody, checkoutResult;
|
|
7482
|
+
var eventId, data, ticketQuantity, _ref$enableBillingInf, enableBillingInfoAutoCreate, isWindowDefined, result, pageConfigsDataResponse, pageConfigsData, _pageConfigsData$skip, skipBillingPage, _pageConfigsData$name, nameIsRequired, _pageConfigsData$age_, ageIsRequired, _pageConfigsData$phon, phoneIsRequired, _pageConfigsData$hide, hidePhoneField, _pageConfigsData$has_, hasAddOn, _pageConfigsData$free, freeTicket, _pageConfigsData$coll, collectOptionalWalletAddress, _pageConfigsData$coll2, collectMandatoryWalletAddress, hash, total, userData, checkoutBody, adaptedCheckoutBody, ticketHolders, checkoutResult;
|
|
7486
7483
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7487
7484
|
while (1) switch (_context.prev = _context.next) {
|
|
7488
7485
|
case 0:
|
|
@@ -7497,7 +7494,7 @@ var addToCartFunc = /*#__PURE__*/function () {
|
|
|
7497
7494
|
case 7:
|
|
7498
7495
|
pageConfigsDataResponse = _context.sent;
|
|
7499
7496
|
if (!(result.status === 200 && pageConfigsDataResponse.status === 200)) {
|
|
7500
|
-
_context.next =
|
|
7497
|
+
_context.next = 31;
|
|
7501
7498
|
break;
|
|
7502
7499
|
}
|
|
7503
7500
|
pageConfigsData = _get(pageConfigsDataResponse, 'data.attributes') || {};
|
|
@@ -7506,29 +7503,32 @@ var addToCartFunc = /*#__PURE__*/function () {
|
|
|
7506
7503
|
total = '';
|
|
7507
7504
|
isWindowDefined && window.localStorage.removeItem('add_ons');
|
|
7508
7505
|
if (!(skipBillingPage && !hasAddOn)) {
|
|
7509
|
-
_context.next =
|
|
7506
|
+
_context.next = 30;
|
|
7510
7507
|
break;
|
|
7511
7508
|
}
|
|
7512
7509
|
// Get user data for checkout data
|
|
7513
7510
|
userData = isWindowDefined && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
7514
7511
|
checkoutBody = createCheckoutDataBodyWithDefaultHolder(ticketQuantity, userData);
|
|
7512
|
+
adaptedCheckoutBody = _extends({}, checkoutBody);
|
|
7513
|
+
ticketHolders = [adaptedCheckoutBody.attributes.ticket_holders[0]];
|
|
7514
|
+
adaptedCheckoutBody.attributes.ticket_holders = ticketHolders;
|
|
7515
7515
|
if (!enableBillingInfoAutoCreate) {
|
|
7516
|
-
_context.next =
|
|
7516
|
+
_context.next = 26;
|
|
7517
7517
|
break;
|
|
7518
7518
|
}
|
|
7519
|
-
_context.next =
|
|
7520
|
-
return postOnCheckout(
|
|
7521
|
-
case
|
|
7519
|
+
_context.next = 23;
|
|
7520
|
+
return postOnCheckout(adaptedCheckoutBody, undefined, freeTicket);
|
|
7521
|
+
case 23:
|
|
7522
7522
|
_context.t0 = _context.sent;
|
|
7523
|
-
_context.next =
|
|
7523
|
+
_context.next = 27;
|
|
7524
7524
|
break;
|
|
7525
|
-
case
|
|
7525
|
+
case 26:
|
|
7526
7526
|
_context.t0 = null;
|
|
7527
|
-
case
|
|
7527
|
+
case 27:
|
|
7528
7528
|
checkoutResult = _context.t0;
|
|
7529
7529
|
hash = _get(checkoutResult, 'data.data.attributes.hash') || '';
|
|
7530
7530
|
total = _get(checkoutResult, 'data.data.attributes.total') || '';
|
|
7531
|
-
case
|
|
7531
|
+
case 30:
|
|
7532
7532
|
return _context.abrupt("return", {
|
|
7533
7533
|
skip_billing_page: skipBillingPage,
|
|
7534
7534
|
names_required: nameIsRequired,
|
|
@@ -7543,9 +7543,9 @@ var addToCartFunc = /*#__PURE__*/function () {
|
|
|
7543
7543
|
total: total,
|
|
7544
7544
|
hasAddOn: hasAddOn
|
|
7545
7545
|
});
|
|
7546
|
-
case
|
|
7546
|
+
case 31:
|
|
7547
7547
|
return _context.abrupt("return", null);
|
|
7548
|
-
case
|
|
7548
|
+
case 32:
|
|
7549
7549
|
case "end":
|
|
7550
7550
|
return _context.stop();
|
|
7551
7551
|
}
|
|
@@ -7572,11 +7572,11 @@ var getTierIdBasedOnSeatId = function getTierIdBasedOnSeatId(seatId, eventSeats)
|
|
|
7572
7572
|
};
|
|
7573
7573
|
var getButtonLabel = function getButtonLabel(count) {
|
|
7574
7574
|
if (!count) {
|
|
7575
|
-
return "GET
|
|
7575
|
+
return "GET TABLES";
|
|
7576
7576
|
} else if (count === 1) {
|
|
7577
|
-
return "GET " + count + "
|
|
7577
|
+
return "GET " + count + " TABLE";
|
|
7578
7578
|
}
|
|
7579
|
-
return "GET " + count + "
|
|
7579
|
+
return "GET " + count + " TABLES";
|
|
7580
7580
|
};
|
|
7581
7581
|
var getOwnReservationsBasedOnStatuses = function getOwnReservationsBasedOnStatuses(statuses) {
|
|
7582
7582
|
var ownReservations = [];
|
|
@@ -7670,9 +7670,12 @@ var SeatMapComponent = function SeatMapComponent(props) {
|
|
|
7670
7670
|
seatMapEvents = _seatMapProps$seatMap2 === void 0 ? {} : _seatMapProps$seatMap2,
|
|
7671
7671
|
_seatMapProps$ticketT = seatMapProps.ticketTypeTierRelations,
|
|
7672
7672
|
ticketTypeTierRelations = _seatMapProps$ticketT === void 0 ? {} : _seatMapProps$ticketT,
|
|
7673
|
+
tierPrices = seatMapProps.tierPrices,
|
|
7673
7674
|
isReserving = seatMapProps.isReserving;
|
|
7674
7675
|
React.useEffect(function () {
|
|
7675
7676
|
var parentElement = document.getElementById(mapContainerId || CONTAINER_DEFAULT_ID);
|
|
7677
|
+
// Temp solution
|
|
7678
|
+
window.tierPrices = tierPrices;
|
|
7676
7679
|
if (Boolean(parentElement)) {
|
|
7677
7680
|
var mapComponent = React__default.createElement(SeatMapView, {
|
|
7678
7681
|
disabled: isReserving,
|
|
@@ -7682,9 +7685,6 @@ var SeatMapComponent = function SeatMapComponent(props) {
|
|
|
7682
7685
|
seatData: seatData,
|
|
7683
7686
|
statuses: statuses,
|
|
7684
7687
|
ticketTypeTireRelationsArray: getTierRelationsArray(ticketTypeTierRelations),
|
|
7685
|
-
tierPrices: {
|
|
7686
|
-
6: 'Mex$ 2,200.00'
|
|
7687
|
-
},
|
|
7688
7688
|
width: Math.min((parentElement == null ? void 0 : parentElement.clientWidth) || 800, 800),
|
|
7689
7689
|
height: Math.min((parentElement == null ? void 0 : parentElement.clientWidth) || 800, 800),
|
|
7690
7690
|
isBlockMap: seatMapType === 'block',
|
|
@@ -7692,7 +7692,7 @@ var SeatMapComponent = function SeatMapComponent(props) {
|
|
|
7692
7692
|
});
|
|
7693
7693
|
ReactDom.render(mapComponent, parentElement);
|
|
7694
7694
|
}
|
|
7695
|
-
}, [isReserving, mapContainerId, seatData, seatMapEvents, seatMapType, statuses, ticketTypeTierRelations]);
|
|
7695
|
+
}, [isReserving, mapContainerId, seatData, seatMapEvents, seatMapType, tierPrices, statuses, ticketTypeTierRelations]);
|
|
7696
7696
|
return React__default.createElement("div", {
|
|
7697
7697
|
id: CONTAINER_DEFAULT_ID
|
|
7698
7698
|
});
|
|
@@ -7763,7 +7763,7 @@ var TicketsSection$1 = function TicketsSection(props) {
|
|
|
7763
7763
|
}
|
|
7764
7764
|
}, React__default.createElement(MenuItem, {
|
|
7765
7765
|
value: 'default'
|
|
7766
|
-
}, "Please select
|
|
7766
|
+
}, "Please select Table Type"), _map(dropdownData.ticketsData, function (option, index) {
|
|
7767
7767
|
if (option.ticket_type_id !== 'default') {
|
|
7768
7768
|
return React__default.createElement(MenuItem, {
|
|
7769
7769
|
value: option.ticket_type_id,
|
|
@@ -7780,13 +7780,13 @@ var TicketsSection$1 = function TicketsSection(props) {
|
|
|
7780
7780
|
className: "ticketPrice"
|
|
7781
7781
|
}, "Price:", React__default.createElement("span", {
|
|
7782
7782
|
className: "ticketPrice-value"
|
|
7783
|
-
}, currencySymbol + " " + (selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_price))), selectedTicketData.ticket_type_deposit && React__default.createElement("div", {
|
|
7783
|
+
}, currencySymbol + " " + (selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_price))), !_isEmpty(selectedTicketData.ticket_type_deposit) && React__default.createElement("div", {
|
|
7784
7784
|
className: "ticketDeposit"
|
|
7785
7785
|
}, "Deposit:", React__default.createElement("span", {
|
|
7786
7786
|
className: "ticketPrice-value"
|
|
7787
7787
|
}, " " + (selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_deposit) + "%"))));
|
|
7788
7788
|
})), React__default.createElement("div", null, React__default.createElement(reactBootstrap.Button, {
|
|
7789
|
-
className: "book-button\n
|
|
7789
|
+
className: "book-button\n " + (bookButtonIsDisabled ? 'disabled' : '') + "\n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n ",
|
|
7790
7790
|
onClick: !bookButtonIsDisabled ? handleGetTicketClick : _identity
|
|
7791
7791
|
}, getTicketsBtnLabel || getButtonLabel(reservedSeats.length)))));
|
|
7792
7792
|
};
|
|
@@ -7828,7 +7828,7 @@ var SeatMapContainer = function SeatMapContainer(props) {
|
|
|
7828
7828
|
showTimer = _useState7[0],
|
|
7829
7829
|
setShowTimer = _useState7[1];
|
|
7830
7830
|
var fetchSeatMapData = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7831
|
-
var seatMapDataResponse, _seatMapDataResponse$, seatData, ticketTypeTierRelations, eventSeats, seatReservationTime;
|
|
7831
|
+
var seatMapDataResponse, _seatMapDataResponse$, seatData, ticketTypeTierRelations, eventSeats, seatReservationTime, seatMapType, tierPrices;
|
|
7832
7832
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7833
7833
|
while (1) switch (_context.prev = _context.next) {
|
|
7834
7834
|
case 0:
|
|
@@ -7837,12 +7837,14 @@ var SeatMapContainer = function SeatMapContainer(props) {
|
|
|
7837
7837
|
return getSeatMapData(eventId);
|
|
7838
7838
|
case 3:
|
|
7839
7839
|
seatMapDataResponse = _context.sent;
|
|
7840
|
-
_seatMapDataResponse$ = seatMapDataResponse.data.attributes, seatData = _seatMapDataResponse$.seatData, ticketTypeTierRelations = _seatMapDataResponse$.ticketTypeTierRelations, eventSeats = _seatMapDataResponse$.eventSeats, seatReservationTime = _seatMapDataResponse$.seatReservationTime;
|
|
7840
|
+
_seatMapDataResponse$ = seatMapDataResponse.data.attributes, seatData = _seatMapDataResponse$.seatData, ticketTypeTierRelations = _seatMapDataResponse$.ticketTypeTierRelations, eventSeats = _seatMapDataResponse$.eventSeats, seatReservationTime = _seatMapDataResponse$.seatReservationTime, seatMapType = _seatMapDataResponse$.seatMapType, tierPrices = _seatMapDataResponse$.tierPrices;
|
|
7841
7841
|
localStorage.setItem('eventSeats', JSON.stringify(eventSeats));
|
|
7842
7842
|
setSeatMapData({
|
|
7843
7843
|
seatMap: JSON.parse(seatData),
|
|
7844
7844
|
ticketTypeTierRelations: ticketTypeTierRelations,
|
|
7845
|
-
seatReservationTime: seatReservationTime
|
|
7845
|
+
seatReservationTime: seatReservationTime,
|
|
7846
|
+
seatMapType: seatMapType,
|
|
7847
|
+
tierPrices: tierPrices
|
|
7846
7848
|
});
|
|
7847
7849
|
_context.next = 12;
|
|
7848
7850
|
break;
|
|
@@ -7994,7 +7996,7 @@ var SeatMapContainer = function SeatMapContainer(props) {
|
|
|
7994
7996
|
case 0:
|
|
7995
7997
|
_seatInfo$seat = seatInfo.seat, tierId = _seatInfo$seat.tierId, seatId = _seatInfo$seat.seatId, status = _seatInfo$seat.status;
|
|
7996
7998
|
reservationData = JSON.parse(localStorage.getItem('reservationData') || '[]');
|
|
7997
|
-
if (!(status === 'B')) {
|
|
7999
|
+
if (!(status === 'B' || status === 'R' || status === 'BLOCKED')) {
|
|
7998
8000
|
_context5.next = 4;
|
|
7999
8001
|
break;
|
|
8000
8002
|
}
|
|
@@ -8121,6 +8123,8 @@ var SeatMapContainer = function SeatMapContainer(props) {
|
|
|
8121
8123
|
seatMapProps: {
|
|
8122
8124
|
seatData: seatMapData.seatMap,
|
|
8123
8125
|
statuses: seatMapStatuses,
|
|
8126
|
+
tierPrices: seatMapData.tierPrices,
|
|
8127
|
+
seatMapType: seatMapData.seatMapType,
|
|
8124
8128
|
ticketTypeTierRelations: seatMapData.ticketTypeTierRelations,
|
|
8125
8129
|
seatMapEvents: {
|
|
8126
8130
|
onSeatClick: onSeatClick
|