tf-checkout-react 1.7.30 → 1.7.32-beta.0
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/adapters/customFields.d.ts +1 -0
- package/dist/components/billing-info-container/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +128 -39
- 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 +128 -39
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/types/billing-info-data.d.ts +4 -0
- package/dist/utils/customFields.d.ts +20 -0
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/adapters/customFields.test.ts +69 -0
- package/src/adapters/customFields.ts +10 -0
- package/src/components/billing-info-container/index.tsx +79 -35
- package/src/components/ticketsContainer/TicketsSection.tsx +4 -4
- package/src/components/ticketsContainer/TimeSlotTicketRow.tsx +2 -2
- package/src/hoc/CustomFields/index.tsx +17 -2
- package/src/types/billing-info-data.ts +4 -0
- package/src/utils/customFields.test.ts +41 -0
- package/src/utils/customFields.ts +39 -0
- package/src/utils/index.ts +6 -1
|
@@ -4,6 +4,7 @@ export declare const optionsAdapter: (options: any) => {
|
|
|
4
4
|
label: any;
|
|
5
5
|
value: any;
|
|
6
6
|
}[];
|
|
7
|
+
export declare const ticketTypeIdsAdapter: (ticketTypes: unknown) => string[] | null;
|
|
7
8
|
export declare const fieldDataAdapter: (field: IGroupItem) => IGroupItem;
|
|
8
9
|
export declare const customFieldsDataAdapter: (data: any) => {
|
|
9
10
|
ticketsFields: IGroupItem[];
|
|
@@ -57,6 +57,8 @@ export interface IBillingInfoPage {
|
|
|
57
57
|
isCountryCodeEditable?: boolean;
|
|
58
58
|
customFieldsOrderKeys?: string[];
|
|
59
59
|
customFieldsTicketHolderKeys?: string[];
|
|
60
|
+
/** Event to load custom fields for. Defaults to `?event_id`, then the cart's event. */
|
|
61
|
+
customFieldsEventId?: string | number;
|
|
60
62
|
onPendingVerification?: () => void;
|
|
61
63
|
includeAddons?: boolean;
|
|
62
64
|
addonsProps?: IAddonContainterProps;
|
|
@@ -17,6 +17,7 @@ var _identity = _interopDefault(require('lodash/identity'));
|
|
|
17
17
|
var _isEmpty = _interopDefault(require('lodash/isEmpty'));
|
|
18
18
|
var _isEqual = _interopDefault(require('lodash/isEqual'));
|
|
19
19
|
var _map = _interopDefault(require('lodash/map'));
|
|
20
|
+
var _omit = _interopDefault(require('lodash/omit'));
|
|
20
21
|
var nanoid = require('nanoid');
|
|
21
22
|
var React = require('react');
|
|
22
23
|
var React__default = _interopDefault(React);
|
|
@@ -931,6 +932,25 @@ var getFieldsKeys = function getFieldsKeys(customFields) {
|
|
|
931
932
|
return field.name;
|
|
932
933
|
});
|
|
933
934
|
};
|
|
935
|
+
var getHolderTicketTypeIds = function getHolderTicketTypeIds(ticketsPriceBreakdown, holdersCount) {
|
|
936
|
+
if (!Array.isArray(ticketsPriceBreakdown)) return [];
|
|
937
|
+
var slots = [];
|
|
938
|
+
_forEach(ticketsPriceBreakdown, function (line) {
|
|
939
|
+
for (var i = 0; i < Number((line == null ? void 0 : line.quantity) || 0); i++) {
|
|
940
|
+
var _line$ticket_type_id;
|
|
941
|
+
slots.push(String((_line$ticket_type_id = line == null ? void 0 : line.ticket_type_id) != null ? _line$ticket_type_id : ''));
|
|
942
|
+
}
|
|
943
|
+
});
|
|
944
|
+
return slots.length === holdersCount ? slots : [];
|
|
945
|
+
};
|
|
946
|
+
/**
|
|
947
|
+
* Whether a ticket-holder custom field applies to a ticket of `ticketTypeId`.
|
|
948
|
+
* Unscoped fields apply to every ticket; an unknown ticket type fails open so a
|
|
949
|
+
* required field is never silently dropped.
|
|
950
|
+
*/
|
|
951
|
+
var customFieldAppliesToTicketType = function customFieldAppliesToTicketType(field, ticketTypeId) {
|
|
952
|
+
return !ticketTypeId || _isEmpty(field.ticketTypeIds) || (field.ticketTypeIds || []).includes(String(ticketTypeId));
|
|
953
|
+
};
|
|
934
954
|
|
|
935
955
|
var isJson = function isJson(value) {
|
|
936
956
|
try {
|
|
@@ -1006,6 +1026,11 @@ var optionsAdapter = function optionsAdapter(options) {
|
|
|
1006
1026
|
});
|
|
1007
1027
|
return adaptedOptions;
|
|
1008
1028
|
};
|
|
1029
|
+
// `settings.ticketTypes` scopes a ticket field to those ticket types; absent or
|
|
1030
|
+
// empty means it applies to every ticket. Ids arrive as numbers, compare as strings.
|
|
1031
|
+
var ticketTypeIdsAdapter = function ticketTypeIdsAdapter(ticketTypes) {
|
|
1032
|
+
return Array.isArray(ticketTypes) && ticketTypes.length ? ticketTypes.map(String) : null;
|
|
1033
|
+
};
|
|
1009
1034
|
var fieldDataAdapter = function fieldDataAdapter(field) {
|
|
1010
1035
|
var name = field.name,
|
|
1011
1036
|
label = field.label,
|
|
@@ -1023,6 +1048,10 @@ var fieldDataAdapter = function fieldDataAdapter(field) {
|
|
|
1023
1048
|
className: _get(restValues, 'settings.className', ''),
|
|
1024
1049
|
value: _get(restValues, 'defaultValue')
|
|
1025
1050
|
};
|
|
1051
|
+
var ticketTypeIds = ticketTypeIdsAdapter(_get(restValues, 'settings.ticketTypes'));
|
|
1052
|
+
if (ticketTypeIds) {
|
|
1053
|
+
adaptedField.ticketTypeIds = ticketTypeIds;
|
|
1054
|
+
}
|
|
1026
1055
|
switch (type) {
|
|
1027
1056
|
case 'textarea':
|
|
1028
1057
|
adaptedField.type = 'text';
|
|
@@ -2237,7 +2266,7 @@ var checkCustomerOrder = /*#__PURE__*/function () {
|
|
|
2237
2266
|
};
|
|
2238
2267
|
}();
|
|
2239
2268
|
|
|
2240
|
-
var _excluded$1 = ["data", "ticketHoldersFields", "skipCustomFields", "onGetCustomFieldsError", "onGetCustomFieldsSuccess"];
|
|
2269
|
+
var _excluded$1 = ["data", "ticketHoldersFields", "skipCustomFields", "customFieldsEventId", "onGetCustomFieldsError", "onGetCustomFieldsSuccess"];
|
|
2241
2270
|
var withCustomFields = function withCustomFields(Children) {
|
|
2242
2271
|
return function (props) {
|
|
2243
2272
|
var _props$data = props.data,
|
|
@@ -2249,6 +2278,7 @@ var withCustomFields = function withCustomFields(Children) {
|
|
|
2249
2278
|
} : _props$ticketHoldersF,
|
|
2250
2279
|
_props$skipCustomFiel = props.skipCustomFields,
|
|
2251
2280
|
skipCustomFields = _props$skipCustomFiel === void 0 ? true : _props$skipCustomFiel,
|
|
2281
|
+
eventIdProp = props.customFieldsEventId,
|
|
2252
2282
|
_props$onGetCustomFie = props.onGetCustomFieldsError,
|
|
2253
2283
|
onGetCustomFieldsError = _props$onGetCustomFie === void 0 ? _identity : _props$onGetCustomFie,
|
|
2254
2284
|
_props$onGetCustomFie2 = props.onGetCustomFieldsSuccess,
|
|
@@ -2269,18 +2299,59 @@ var withCustomFields = function withCustomFields(Children) {
|
|
|
2269
2299
|
var _useState5 = React.useState([]),
|
|
2270
2300
|
customFieldsAddOnKeys = _useState5[0],
|
|
2271
2301
|
setCustomFieldsAddOnKeys = _useState5[1];
|
|
2272
|
-
|
|
2302
|
+
// The billing page URL often carries no event id (path routes, single-page
|
|
2303
|
+
// checkouts), so fall back to the event the cart session belongs to. Without
|
|
2304
|
+
// any id, the request would hit `/v1/event//custom_fields` and fail.
|
|
2305
|
+
var resolveEventId = /*#__PURE__*/function () {
|
|
2273
2306
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2274
|
-
var
|
|
2307
|
+
var fromUrl, configs, fromCart;
|
|
2275
2308
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2276
2309
|
while (1) switch (_context.prev = _context.next) {
|
|
2277
2310
|
case 0:
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2311
|
+
fromUrl = getQueryVariable('event_id') || getQueryVariable('eventId');
|
|
2312
|
+
if (!(eventIdProp || fromUrl)) {
|
|
2313
|
+
_context.next = 3;
|
|
2314
|
+
break;
|
|
2315
|
+
}
|
|
2316
|
+
return _context.abrupt("return", String(eventIdProp || fromUrl));
|
|
2317
|
+
case 3:
|
|
2318
|
+
_context.next = 5;
|
|
2319
|
+
return getCheckoutPageConfigs();
|
|
2320
|
+
case 5:
|
|
2321
|
+
configs = _context.sent;
|
|
2322
|
+
fromCart = _get(configs, 'data.attributes.event_id');
|
|
2323
|
+
return _context.abrupt("return", fromCart ? String(fromCart) : '');
|
|
2324
|
+
case 8:
|
|
2325
|
+
case "end":
|
|
2326
|
+
return _context.stop();
|
|
2327
|
+
}
|
|
2328
|
+
}, _callee);
|
|
2329
|
+
}));
|
|
2330
|
+
return function resolveEventId() {
|
|
2331
|
+
return _ref.apply(this, arguments);
|
|
2332
|
+
};
|
|
2333
|
+
}();
|
|
2334
|
+
var getFields = /*#__PURE__*/function () {
|
|
2335
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2336
|
+
var eventId, customFields, orderFieldsKeys, ticketHoldersFieldsKeys, addOnFieldsKeys;
|
|
2337
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2338
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
2339
|
+
case 0:
|
|
2340
|
+
_context2.prev = 0;
|
|
2341
|
+
_context2.next = 3;
|
|
2342
|
+
return resolveEventId();
|
|
2343
|
+
case 3:
|
|
2344
|
+
eventId = _context2.sent;
|
|
2345
|
+
if (eventId) {
|
|
2346
|
+
_context2.next = 6;
|
|
2347
|
+
break;
|
|
2348
|
+
}
|
|
2349
|
+
return _context2.abrupt("return");
|
|
2350
|
+
case 6:
|
|
2351
|
+
_context2.next = 8;
|
|
2281
2352
|
return getCustomFields(eventId);
|
|
2282
|
-
case
|
|
2283
|
-
customFields =
|
|
2353
|
+
case 8:
|
|
2354
|
+
customFields = _context2.sent;
|
|
2284
2355
|
orderFieldsKeys = getFieldsKeys(_get(customFields, 'orderFields', []));
|
|
2285
2356
|
ticketHoldersFieldsKeys = getFieldsKeys(_get(customFields, 'ticketsFields', []));
|
|
2286
2357
|
addOnFieldsKeys = getFieldsKeys(_get(customFields, 'addOnFields', []));
|
|
@@ -2289,24 +2360,24 @@ var withCustomFields = function withCustomFields(Children) {
|
|
|
2289
2360
|
setCustomFieldsData(customFields);
|
|
2290
2361
|
setCustomFieldsAddOnKeys(addOnFieldsKeys);
|
|
2291
2362
|
onGetCustomFieldsSuccess(customFields);
|
|
2292
|
-
|
|
2363
|
+
_context2.next = 22;
|
|
2293
2364
|
break;
|
|
2294
|
-
case
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
onGetCustomFieldsError(
|
|
2298
|
-
case
|
|
2299
|
-
|
|
2365
|
+
case 19:
|
|
2366
|
+
_context2.prev = 19;
|
|
2367
|
+
_context2.t0 = _context2["catch"](0);
|
|
2368
|
+
onGetCustomFieldsError(_context2.t0);
|
|
2369
|
+
case 22:
|
|
2370
|
+
_context2.prev = 22;
|
|
2300
2371
|
setLoading(false);
|
|
2301
|
-
return
|
|
2302
|
-
case
|
|
2372
|
+
return _context2.finish(22);
|
|
2373
|
+
case 25:
|
|
2303
2374
|
case "end":
|
|
2304
|
-
return
|
|
2375
|
+
return _context2.stop();
|
|
2305
2376
|
}
|
|
2306
|
-
},
|
|
2377
|
+
}, _callee2, null, [[0, 19, 22, 25]]);
|
|
2307
2378
|
}));
|
|
2308
2379
|
return function getFields() {
|
|
2309
|
-
return
|
|
2380
|
+
return _ref2.apply(this, arguments);
|
|
2310
2381
|
};
|
|
2311
2382
|
}();
|
|
2312
2383
|
React.useEffect(function () {
|
|
@@ -7112,6 +7183,11 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
7112
7183
|
checkoutUpdateData = _useState24[0],
|
|
7113
7184
|
setCheckoutUpdateData = _useState24[1];
|
|
7114
7185
|
var prevData = React.useRef(data);
|
|
7186
|
+
// Ticket type of each holder slot — scopes ticket custom fields that list
|
|
7187
|
+
// `ticketTypes` in their settings to the holders of those ticket types.
|
|
7188
|
+
var holderTicketTypeIds = React.useMemo(function () {
|
|
7189
|
+
return getHolderTicketTypeIds(_get(checkoutUpdateData, 'cart_price_breakdown.tickets_price_breakdown'), ticketsQuantity.length);
|
|
7190
|
+
}, [checkoutUpdateData, ticketsQuantity.length]);
|
|
7115
7191
|
var addAddOnsInAttributes = React.useCallback(function (checkoutBody) {
|
|
7116
7192
|
var selectedAddOns = window.localStorage.getItem('add_ons') || '{}';
|
|
7117
7193
|
var addOnDataCapture = window.localStorage.getItem('add_on_data_capture') || '{}';
|
|
@@ -7427,12 +7503,20 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
7427
7503
|
(_checkoutBody$attribu = checkoutBody.attributes) == null ? true : delete _checkoutBody$attribu[attributeKey];
|
|
7428
7504
|
});
|
|
7429
7505
|
// Collect data_capture for Ticket Holders Fields
|
|
7506
|
+
var ticketCustomGroup = _find(ticketHoldersFields.fields, 'customFields');
|
|
7507
|
+
var ticketCustomFields = (ticketCustomGroup == null ? void 0 : ticketCustomGroup.groupItems) || [];
|
|
7430
7508
|
_forEach(checkoutBody.attributes.ticket_holders, function (holder, holderIndex) {
|
|
7431
7509
|
var holderDataCapture = {};
|
|
7432
7510
|
_forEach(customFieldsTicketHolderKeys, function (customFieldKey) {
|
|
7433
7511
|
var customFieldHolderName = customFieldKey + "-" + holderIndex;
|
|
7434
|
-
var
|
|
7435
|
-
|
|
7512
|
+
var field = _find(ticketCustomFields, function (_ref12) {
|
|
7513
|
+
var name = _ref12.name;
|
|
7514
|
+
return name === customFieldKey;
|
|
7515
|
+
});
|
|
7516
|
+
// Fields scoped to other ticket types were never shown to this holder.
|
|
7517
|
+
if (!field || customFieldAppliesToTicketType(field, holderTicketTypeIds[+holderIndex])) {
|
|
7518
|
+
holderDataCapture[customFieldKey] = values[customFieldHolderName] || '';
|
|
7519
|
+
}
|
|
7436
7520
|
// Delete holder specific value from values list
|
|
7437
7521
|
delete checkoutBody.attributes[customFieldHolderName];
|
|
7438
7522
|
});
|
|
@@ -7482,7 +7566,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
7482
7566
|
return {
|
|
7483
7567
|
attributes: mergedAttributes
|
|
7484
7568
|
};
|
|
7485
|
-
}, [showDOB, showTicketHolders, canSkipHolderNames, customFieldsOrderKeys, ticketsQuantity.length, emailLogged, firstNameLogged, lastNameLogged, phoneLogged, customFieldsTicketHolderKeys]);
|
|
7569
|
+
}, [showDOB, showTicketHolders, canSkipHolderNames, customFieldsOrderKeys, ticketsQuantity.length, emailLogged, firstNameLogged, lastNameLogged, phoneLogged, customFieldsTicketHolderKeys, ticketHoldersFields, holderTicketTypeIds]);
|
|
7486
7570
|
var removeReferralKey = React.useCallback(function () {
|
|
7487
7571
|
localStorage.removeItem('referral_key');
|
|
7488
7572
|
}, []);
|
|
@@ -7512,7 +7596,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
7512
7596
|
}),
|
|
7513
7597
|
processPayment = _useStripePayment.processPayment;
|
|
7514
7598
|
var updateCheckoutWithAddOns = React.useCallback( /*#__PURE__*/function () {
|
|
7515
|
-
var
|
|
7599
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(addOns) {
|
|
7516
7600
|
var mergedAddOns, _checkoutUpdateData, checkoutResponse, checkoutDataObj, updatedAttributes, errorMessage;
|
|
7517
7601
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
7518
7602
|
while (1) switch (_context8.prev = _context8.next) {
|
|
@@ -7527,9 +7611,9 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
7527
7611
|
return _context8.abrupt("return");
|
|
7528
7612
|
case 3:
|
|
7529
7613
|
mergedAddOns = _extends({}, singleCheckoutAddons); // Update existing entries and add new ones
|
|
7530
|
-
Object.entries(addOns).forEach(function (
|
|
7531
|
-
var key =
|
|
7532
|
-
value =
|
|
7614
|
+
Object.entries(addOns).forEach(function (_ref14) {
|
|
7615
|
+
var key = _ref14[0],
|
|
7616
|
+
value = _ref14[1];
|
|
7533
7617
|
var amount = Number(value);
|
|
7534
7618
|
if (amount) {
|
|
7535
7619
|
mergedAddOns[key] = amount;
|
|
@@ -7573,11 +7657,11 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
7573
7657
|
}, _callee8, null, [[5, 13]]);
|
|
7574
7658
|
}));
|
|
7575
7659
|
return function (_x) {
|
|
7576
|
-
return
|
|
7660
|
+
return _ref13.apply(this, arguments);
|
|
7577
7661
|
};
|
|
7578
7662
|
}(), [eventId, isSinglePageCheckout, onCheckoutUpdateError, onCheckoutUpdateSuccess]);
|
|
7579
7663
|
var handleAddOnSelect = React.useCallback( /*#__PURE__*/function () {
|
|
7580
|
-
var
|
|
7664
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(selectedAddOns) {
|
|
7581
7665
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
7582
7666
|
while (1) switch (_context9.prev = _context9.next) {
|
|
7583
7667
|
case 0:
|
|
@@ -7590,7 +7674,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
7590
7674
|
}, _callee9);
|
|
7591
7675
|
}));
|
|
7592
7676
|
return function (_x2) {
|
|
7593
|
-
return
|
|
7677
|
+
return _ref15.apply(this, arguments);
|
|
7594
7678
|
};
|
|
7595
7679
|
}(), [updateCheckoutWithAddOns]);
|
|
7596
7680
|
var onAddOnSelect = React.useCallback(function (id, value, _addon, fieldUpdates) {
|
|
@@ -8045,13 +8129,18 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
8045
8129
|
key: _item
|
|
8046
8130
|
}, React__default.createElement("h5", null, "Ticket ", index + 1), _map(ticketHoldersFields.fields, function (group) {
|
|
8047
8131
|
var id = group.id,
|
|
8048
|
-
groupClassname = group.groupClassname
|
|
8049
|
-
|
|
8132
|
+
groupClassname = group.groupClassname;
|
|
8133
|
+
var groupItems = group.customFields ? group.groupItems.filter(function (item) {
|
|
8134
|
+
return customFieldAppliesToTicketType(item, holderTicketTypeIds[index]);
|
|
8135
|
+
}) : group.groupItems;
|
|
8136
|
+
if (_isEmpty(groupItems)) return null;
|
|
8050
8137
|
return React__default.createElement("div", {
|
|
8051
8138
|
key: id
|
|
8052
8139
|
}, React__default.createElement("div", {
|
|
8053
8140
|
className: groupClassname
|
|
8054
|
-
}, _map(groupItems, function (
|
|
8141
|
+
}, _map(groupItems, function (item) {
|
|
8142
|
+
// Scoping metadata, not a Field prop.
|
|
8143
|
+
var element = _omit(item, 'ticketTypeIds');
|
|
8055
8144
|
return React__default.createElement("div", {
|
|
8056
8145
|
className: element.className,
|
|
8057
8146
|
key: element.name
|
|
@@ -10377,9 +10466,9 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
10377
10466
|
var ticketOldPriceWithFees = priceSymbol + " " + (+ticket.oldBasePrice).toFixed(2);
|
|
10378
10467
|
var ticketOldPriceWithoutFees = priceSymbol + " " + (+ticket.oldCost).toFixed(2);
|
|
10379
10468
|
var ticketFinalPrice = ticket.feeIncluded && !ticket.isForward ? +(ticket.x_face_value || ticket.basePrice) : ticket.feeIncluded ? +ticket.basePrice : +ticket.cost;
|
|
10380
|
-
var ticketFinalPriceFormatted = priceSymbol + " " +
|
|
10469
|
+
var ticketFinalPriceFormatted = priceSymbol + " " + parseFloat(ticketFinalPrice.toFixed(2));
|
|
10381
10470
|
var ticketOldFinalPrice = ticket.feeIncluded && !ticket.isForward ? +(ticket.x_face_value || ticket.basePrice) : ticket.feeIncluded ? +ticket.oldBasePrice : +ticket.oldCost;
|
|
10382
|
-
var ticketOldFinalPriceFormatted = priceSymbol + " " +
|
|
10471
|
+
var ticketOldFinalPriceFormatted = priceSymbol + " " + parseFloat(ticketOldFinalPrice.toFixed(2));
|
|
10383
10472
|
var ticketFeeAmount = (+ticket.basePrice - +ticket.cost).toFixed(2);
|
|
10384
10473
|
var ticketBreakdown = !ticket.feeIncluded ? '(+ fees at checkout)' : !ticket.isForward ? null : parseFloat(ticketFeeAmount) > 0 ? "(" + priceSymbol + " " + (+ticket.cost).toFixed(2) + " + " + priceSymbol + " " + ticketFeeAmount + " fee)" : null;
|
|
10385
10474
|
var isSoldOut = ticket.sold_out || !(ticket.displayTicket || ticket.slotGroupId) || ticket.soldOut;
|
|
@@ -10461,9 +10550,9 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
10461
10550
|
var ticketOldPriceWithFees = priceSymbol + " " + (+ticket.oldBasePrice).toFixed(2);
|
|
10462
10551
|
var ticketOldPriceWithoutFees = priceSymbol + " " + (+ticket.oldCost).toFixed(2);
|
|
10463
10552
|
var ticketFinalPrice = ticket.feeIncluded && !ticket.isForward ? +(ticket.x_face_value || ticket.basePrice) : ticket.feeIncluded ? +ticket.basePrice : +ticket.cost;
|
|
10464
|
-
var ticketFinalPriceFormatted = priceSymbol + " " +
|
|
10553
|
+
var ticketFinalPriceFormatted = priceSymbol + " " + parseFloat(ticketFinalPrice.toFixed(2));
|
|
10465
10554
|
var ticketOldFinalPrice = ticket.feeIncluded && !ticket.isForward ? +(ticket.x_face_value || ticket.basePrice) : ticket.feeIncluded ? +ticket.oldBasePrice : +ticket.oldCost;
|
|
10466
|
-
var ticketOldFinalPriceFormatted = priceSymbol + " " +
|
|
10555
|
+
var ticketOldFinalPriceFormatted = priceSymbol + " " + parseFloat(ticketOldFinalPrice.toFixed(2));
|
|
10467
10556
|
var ticketFeeAmount = (+ticket.basePrice - +ticket.cost).toFixed(2);
|
|
10468
10557
|
var ticketBreakdown = !ticket.feeIncluded ? '(+ fees at checkout)' : !ticket.isForward ? null : parseFloat(ticketFeeAmount) > 0 ? "(" + priceSymbol + " " + (+ticket.cost).toFixed(2) + " + " + priceSymbol + " " + ticketFeeAmount + " fee)" : null;
|
|
10469
10558
|
var isSoldOut = ticket.sold_out || !(ticket.displayTicket || ticket.slotGroupId) || ticket.soldOut;
|
|
@@ -10579,9 +10668,9 @@ var TimeSlotTicketRow = function TimeSlotTicketRow(_ref) {
|
|
|
10579
10668
|
var ticketOldPriceWithFees = priceSymbol + " " + (+ticket.oldBasePrice).toFixed(2);
|
|
10580
10669
|
var ticketOldPriceWithoutFees = priceSymbol + " " + (+ticket.oldCost).toFixed(2);
|
|
10581
10670
|
var ticketFinalPrice = ticket.feeIncluded && !ticket.isForward ? +(ticket.x_face_value || ticket.basePrice) : ticket.feeIncluded ? +ticket.basePrice : +ticket.cost;
|
|
10582
|
-
var ticketFinalPriceFormatted = priceSymbol + " " +
|
|
10671
|
+
var ticketFinalPriceFormatted = priceSymbol + " " + parseFloat(ticketFinalPrice.toFixed(2));
|
|
10583
10672
|
var ticketOldFinalPrice = ticket.feeIncluded && !ticket.isForward ? +(ticket.x_face_value || ticket.basePrice) : ticket.feeIncluded ? +ticket.oldBasePrice : +ticket.oldCost;
|
|
10584
|
-
var ticketOldFinalPriceFormatted = priceSymbol + " " +
|
|
10673
|
+
var ticketOldFinalPriceFormatted = priceSymbol + " " + parseFloat(ticketOldFinalPrice.toFixed(2));
|
|
10585
10674
|
var ticketFeeAmount = (+ticket.basePrice - +ticket.cost).toFixed(2);
|
|
10586
10675
|
var ticketBreakdown = !ticket.feeIncluded ? '(+ fees at checkout)' : !ticket.isForward ? null : parseFloat(ticketFeeAmount) > 0 ? "(" + priceSymbol + " " + (+ticket.cost).toFixed(2) + " + " + priceSymbol + " " + ticketFeeAmount + " fee)" : null;
|
|
10587
10676
|
var ticketIsDiscounted = false;
|