@qite/tide-booking-component 0.0.2-preview.64 → 0.0.2-preview.66
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/build/build-cjs/booking-wizard/features/summary/summary-booking-option-pax.d.ts +7 -0
- package/build/build-cjs/booking-wizard/features/summary/summary-booking-option-unit.d.ts +7 -0
- package/build/build-cjs/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +7 -0
- package/build/build-cjs/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +7 -0
- package/build/build-cjs/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +7 -0
- package/build/build-cjs/booking-wizard/types.d.ts +1 -0
- package/build/build-cjs/index.js +175 -28
- package/build/build-esm/booking-wizard/features/summary/summary-booking-option-pax.d.ts +7 -0
- package/build/build-esm/booking-wizard/features/summary/summary-booking-option-unit.d.ts +7 -0
- package/build/build-esm/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +7 -0
- package/build/build-esm/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +7 -0
- package/build/build-esm/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +7 -0
- package/build/build-esm/booking-wizard/types.d.ts +1 -0
- package/build/build-esm/index.js +175 -28
- package/package.json +2 -2
- package/src/booking-wizard/features/product-options/option-item.tsx +9 -1
- package/src/booking-wizard/features/product-options/option-room.tsx +28 -17
- package/src/booking-wizard/features/product-options/options-form.tsx +2 -1
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +13 -3
- package/src/booking-wizard/features/summary/summary-booking-option-pax.tsx +25 -0
- package/src/booking-wizard/features/summary/summary-booking-option-unit.tsx +25 -0
- package/src/booking-wizard/features/summary/summary-per-booking-option-group.tsx +55 -0
- package/src/booking-wizard/features/summary/summary-per-pax-option-group.tsx +49 -0
- package/src/booking-wizard/features/summary/summary-per-unit-option-group.tsx +52 -0
- package/src/booking-wizard/features/summary/summary.tsx +21 -4
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +1 -1
- package/src/booking-wizard/settings-context.ts +1 -0
- package/src/booking-wizard/translations/translations.json +10 -8
- package/src/booking-wizard/types.ts +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionPax } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryBookingOptionPaxProps {
|
|
4
|
+
pax: BookingOptionPax;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryBookingOptionPax: React.FC<SummaryBookingOptionPaxProps>;
|
|
7
|
+
export default SummaryBookingOptionPax;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionUnit } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryBookingOptionUnitProps {
|
|
4
|
+
unit: BookingOptionUnit;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryBookingOptionUnit: React.FC<SummaryBookingOptionUnitProps>;
|
|
7
|
+
export default SummaryBookingOptionUnit;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionGroup, PerBookingPackageOption } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryPerBookingOptionGroupProps {
|
|
4
|
+
group: BookingOptionGroup<PerBookingPackageOption>;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryPerBookingOptionGroup: React.FC<SummaryPerBookingOptionGroupProps>;
|
|
7
|
+
export default SummaryPerBookingOptionGroup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionGroup, PerPaxPackageOption } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryPerPaxOptionGroupProps {
|
|
4
|
+
group: BookingOptionGroup<PerPaxPackageOption>;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryPerPaxOptionGroup: React.FC<SummaryPerPaxOptionGroupProps>;
|
|
7
|
+
export default SummaryPerPaxOptionGroup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionGroup, PerUnitPackageOption } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryPerUnitOptionGroupProps {
|
|
4
|
+
group: BookingOptionGroup<PerUnitPackageOption>;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryPerUnitOptionGroup: React.FC<SummaryPerUnitOptionGroupProps>;
|
|
7
|
+
export default SummaryPerUnitOptionGroup;
|
package/build/build-cjs/index.js
CHANGED
|
@@ -324,6 +324,7 @@ var post$1 = function (url, apiKey, body, signal) {
|
|
|
324
324
|
"Content-Type": "application/json",
|
|
325
325
|
"Api-Key": apiKey,
|
|
326
326
|
},
|
|
327
|
+
credentials: "include",
|
|
327
328
|
body: body,
|
|
328
329
|
signal: signal,
|
|
329
330
|
}),
|
|
@@ -6321,6 +6322,8 @@ var ENDPOINT_PRICE_DETAILS = ENDPOINT$5 + "/price-details";
|
|
|
6321
6322
|
var ENDPOINT_BOOK = ENDPOINT$5 + "/book";
|
|
6322
6323
|
var ENDPOINT_AGENTS = ENDPOINT$5 + "/agents";
|
|
6323
6324
|
var ENDPOINT_AVAILABLE_ALLOTMENTS = ENDPOINT$5 + "/get-allotment-availability";
|
|
6325
|
+
var ENDPOINT_FLIGHT_POOL = ENDPOINT$5 + "/flight-pool";
|
|
6326
|
+
var ENDPOINT_BOOKABLE_DATES = ENDPOINT$5 + "/bookable-dates";
|
|
6324
6327
|
var readPackageSearchList = function (config, request, signal) {
|
|
6325
6328
|
var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH_LIST;
|
|
6326
6329
|
var apiKey = config.apiKey;
|
|
@@ -6384,6 +6387,18 @@ var getAllotmentAvailability = function (config, eventId, signal) {
|
|
|
6384
6387
|
var apiKey = config.apiKey;
|
|
6385
6388
|
return get(url, apiKey, signal, true);
|
|
6386
6389
|
};
|
|
6390
|
+
var searchFlightPool = function (config, request, signal) {
|
|
6391
|
+
var url = "" + config.host + ENDPOINT_FLIGHT_POOL;
|
|
6392
|
+
var apiKey = config.apiKey;
|
|
6393
|
+
var body = JSON.stringify(request);
|
|
6394
|
+
return post(url, apiKey, body, signal, true);
|
|
6395
|
+
};
|
|
6396
|
+
var bookableDates = function (config, request, signal) {
|
|
6397
|
+
var url = "" + config.host + ENDPOINT_BOOKABLE_DATES;
|
|
6398
|
+
var apiKey = config.apiKey;
|
|
6399
|
+
var body = JSON.stringify(request);
|
|
6400
|
+
return post(url, apiKey, body, signal, true);
|
|
6401
|
+
};
|
|
6387
6402
|
|
|
6388
6403
|
var ENDPOINT$4 = "/api/member";
|
|
6389
6404
|
var ENDPOINT_LOGIN = ENDPOINT$4 + "/login";
|
|
@@ -6516,6 +6531,7 @@ var agents_1 = build.agents = agents;
|
|
|
6516
6531
|
build.alternateFlights = alternateFlights;
|
|
6517
6532
|
build.alternateHotels = alternateHotels;
|
|
6518
6533
|
var book_1 = build.book = book;
|
|
6534
|
+
build.bookableDates = bookableDates;
|
|
6519
6535
|
build.confirm = confirm;
|
|
6520
6536
|
build.contactForm = contactForm;
|
|
6521
6537
|
build.contactHasTag = contactHasTag;
|
|
@@ -6546,6 +6562,7 @@ var priceDetails_1 = build.priceDetails = priceDetails;
|
|
|
6546
6562
|
build.readPackageSearchList = readPackageSearchList;
|
|
6547
6563
|
build.resetPassword = resetPassword;
|
|
6548
6564
|
build.search = search;
|
|
6565
|
+
build.searchFlightPool = searchFlightPool;
|
|
6549
6566
|
build.searchPackages = searchPackages;
|
|
6550
6567
|
|
|
6551
6568
|
function buildTideClientConfig() {
|
|
@@ -7220,6 +7237,7 @@ var SettingsContext = React__default["default"].createContext({
|
|
|
7220
7237
|
entryStatus: 0,
|
|
7221
7238
|
customEntryStatusId: null,
|
|
7222
7239
|
tagIds: [],
|
|
7240
|
+
hideAgentSelection: false,
|
|
7223
7241
|
agentAdressId: undefined,
|
|
7224
7242
|
affiliateSlug: undefined,
|
|
7225
7243
|
productPath: "/",
|
|
@@ -7322,8 +7340,8 @@ var Message = function (_a) {
|
|
|
7322
7340
|
};
|
|
7323
7341
|
|
|
7324
7342
|
var STEPS = {
|
|
7325
|
-
PERSONAL_DETAILS: "Persoonlijke
|
|
7326
|
-
TRAVEL_OPTIONS: "
|
|
7343
|
+
PERSONAL_DETAILS: "Persoonlijke gegevens",
|
|
7344
|
+
TRAVEL_OPTIONS: "Opties",
|
|
7327
7345
|
SUMMARY: "Overzicht",
|
|
7328
7346
|
CONFIRMATION: "Bevestiging",
|
|
7329
7347
|
ERROR: "Boeken mislukt",
|
|
@@ -7336,10 +7354,10 @@ var MAIN = {
|
|
|
7336
7354
|
PRODUCT_UNAVAILABLE: "Product niet beschikbaar"
|
|
7337
7355
|
};
|
|
7338
7356
|
var SIDEBAR = {
|
|
7339
|
-
OVERVIEW: "
|
|
7357
|
+
OVERVIEW: "Overzicht",
|
|
7340
7358
|
SLIDE_TOTAL_PRICE: "Totaalbedrag: ",
|
|
7341
7359
|
SLIDE_DEPOSIT: "Te betalen voorschot: ",
|
|
7342
|
-
TRAVEL_INFO: "
|
|
7360
|
+
TRAVEL_INFO: "Gegevens",
|
|
7343
7361
|
TRAVELERS: "Personen",
|
|
7344
7362
|
TRAVELERS_ADULTS: "volwassenen",
|
|
7345
7363
|
TRAVELERS_ADULT: "volwassene",
|
|
@@ -7349,9 +7367,9 @@ var SIDEBAR = {
|
|
|
7349
7367
|
DEPARTURE_SINGLE: "Datum",
|
|
7350
7368
|
ARRIVAL: "Terugreis",
|
|
7351
7369
|
FLIGHT: "Vlucht",
|
|
7352
|
-
ACCOMMODATION: "
|
|
7370
|
+
ACCOMMODATION: "Geboekt",
|
|
7353
7371
|
BASE_PRICE: "Basisprijs",
|
|
7354
|
-
OPTIONS: "
|
|
7372
|
+
OPTIONS: "Opties",
|
|
7355
7373
|
INCLUDED_COSTS: "Inbegrepen",
|
|
7356
7374
|
EXTRA_COSTS: "Bijkomende kosten",
|
|
7357
7375
|
TOTAL_PRICE: "Totale prijs",
|
|
@@ -7402,7 +7420,9 @@ var OPTIONS_FORM = {
|
|
|
7402
7420
|
NO_OPTIONS_MESSAGE: "Deze reis heeft geen bijkomende opties.",
|
|
7403
7421
|
UNIT_TITLE: "Gezelschap",
|
|
7404
7422
|
PACKAGE: "Pakket",
|
|
7423
|
+
DAY: "dag",
|
|
7405
7424
|
DAYS: "dagen",
|
|
7425
|
+
NIGHT: "nacht",
|
|
7406
7426
|
NIGHTS: "nachten",
|
|
7407
7427
|
PER_PAX_TITLE: "Per reiziger samenstellen",
|
|
7408
7428
|
PER_BOOKING_TITLE: "Per dossier samenstellen",
|
|
@@ -7410,7 +7430,7 @@ var OPTIONS_FORM = {
|
|
|
7410
7430
|
NONE: "Geen"
|
|
7411
7431
|
};
|
|
7412
7432
|
var SUMMARY = {
|
|
7413
|
-
PERSONAL_DETAILS: "Persoonlijke
|
|
7433
|
+
PERSONAL_DETAILS: "Persoonlijke gegevens",
|
|
7414
7434
|
TRAVELERS: "reizigers",
|
|
7415
7435
|
TRAVELER: "reiziger",
|
|
7416
7436
|
ADULTS: "volwassenen",
|
|
@@ -7421,7 +7441,7 @@ var SUMMARY = {
|
|
|
7421
7441
|
NOTIFICATIONS_TITLE: "Aandacht",
|
|
7422
7442
|
VALIDATE_TITLE: "Controleer je gegevens",
|
|
7423
7443
|
VALIDATE_TEXT: "Je staat op het punt je boeking te bevestigen. Contoleer of alle gegevens correct zijn. Deze zijn definitief en niet meer aanpasbaar.",
|
|
7424
|
-
OPTIONS: "
|
|
7444
|
+
OPTIONS: "Opties"
|
|
7425
7445
|
};
|
|
7426
7446
|
var CONFIRMATION = {
|
|
7427
7447
|
TITLE_TEXT1: "Je boeking met nummer ",
|
|
@@ -7549,7 +7569,15 @@ var getDatePeriodText = function (from, to) {
|
|
|
7549
7569
|
var fromDate = dateFns.parseISO(from);
|
|
7550
7570
|
var toDate = dateFns.parseISO(to);
|
|
7551
7571
|
var dayDifference = dateFns.differenceInDays(toDate, fromDate);
|
|
7552
|
-
|
|
7572
|
+
var daysLabel = dayDifference == 0
|
|
7573
|
+
? "1 ".concat(translations.OPTIONS_FORM.DAY)
|
|
7574
|
+
: "".concat(dayDifference + 1, " ").concat(translations.OPTIONS_FORM.DAYS);
|
|
7575
|
+
if (!dayDifference)
|
|
7576
|
+
return daysLabel;
|
|
7577
|
+
var nightsLabel = dayDifference == 1
|
|
7578
|
+
? "1 ".concat(translations.OPTIONS_FORM.NIGHT)
|
|
7579
|
+
: "".concat(dayDifference, " ").concat(translations.OPTIONS_FORM.NIGHTS);
|
|
7580
|
+
return "".concat(daysLabel, ", ").concat(nightsLabel);
|
|
7553
7581
|
}
|
|
7554
7582
|
catch (_a) {
|
|
7555
7583
|
return undefined;
|
|
@@ -7609,7 +7637,7 @@ var formatPrice = function (price) {
|
|
|
7609
7637
|
};
|
|
7610
7638
|
|
|
7611
7639
|
var OptionRoom = function (_a) {
|
|
7612
|
-
var _b, _c, _d, _e;
|
|
7640
|
+
var _b, _c, _d, _e, _f;
|
|
7613
7641
|
var packageRoom = _a.packageRoom, pax = _a.pax, onRoomChange = _a.onRoomChange;
|
|
7614
7642
|
var selectedOption = packageRoom === null || packageRoom === void 0 ? void 0 : packageRoom.options.find(function (x) { return x.isSelected; });
|
|
7615
7643
|
var daysAndNightsText = "";
|
|
@@ -7748,11 +7776,14 @@ var OptionRoom = function (_a) {
|
|
|
7748
7776
|
getAccommodationPriceDifference(accommodation))); }))))),
|
|
7749
7777
|
React__default["default"].createElement("div", { className: "tree__column" },
|
|
7750
7778
|
React__default["default"].createElement("div", { className: "select-wrapper" },
|
|
7751
|
-
React__default["default"].createElement("div", { className: "select-wrapper__select" },
|
|
7752
|
-
React__default["default"].createElement("select", { defaultValue: selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.regimeCode, onChange: handleRegimeChange
|
|
7779
|
+
regimes.length > 1 && (React__default["default"].createElement("div", { className: "select-wrapper__select" },
|
|
7780
|
+
React__default["default"].createElement("select", { defaultValue: selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.regimeCode, onChange: handleRegimeChange }, regimes.map(function (regime) { return (React__default["default"].createElement("option", { key: regime.regimeCode, value: regime.regimeCode },
|
|
7753
7781
|
regime.regimeName,
|
|
7754
7782
|
" ",
|
|
7755
|
-
getRegimePriceDifference(regime))); }))))
|
|
7783
|
+
getRegimePriceDifference(regime))); })))),
|
|
7784
|
+
regimes.length === 1 && (React__default["default"].createElement(React__default["default"].Fragment, null, (_f = regimes.find(function (x) {
|
|
7785
|
+
return x.regimeCode == (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.regimeCode);
|
|
7786
|
+
})) === null || _f === void 0 ? void 0 : _f.regimeName)))),
|
|
7756
7787
|
React__default["default"].createElement("div", { className: buildClassName([
|
|
7757
7788
|
"tree__column",
|
|
7758
7789
|
"tree__column--price",
|
|
@@ -7807,6 +7838,7 @@ var NoneOption = function (_a) {
|
|
|
7807
7838
|
};
|
|
7808
7839
|
|
|
7809
7840
|
var OptionItem = function (_a) {
|
|
7841
|
+
var _b;
|
|
7810
7842
|
var option = _a.option, parentId = _a.parentId, index = _a.index, selectedPrice = _a.selectedPrice, onOptionChange = _a.onOptionChange;
|
|
7811
7843
|
var priceDifference = option.requirementType === 1
|
|
7812
7844
|
? option.isSelected
|
|
@@ -7936,11 +7968,13 @@ var OptionItem = function (_a) {
|
|
|
7936
7968
|
" ",
|
|
7937
7969
|
getAccommodationPriceDifference(accommodation))); }))))),
|
|
7938
7970
|
React__default["default"].createElement("div", { className: "tree__column" },
|
|
7939
|
-
React__default["default"].createElement("div", { className: "select-wrapper" },
|
|
7940
|
-
|
|
7941
|
-
regime.
|
|
7942
|
-
|
|
7943
|
-
|
|
7971
|
+
React__default["default"].createElement("div", { className: "select-wrapper" },
|
|
7972
|
+
(regimes === null || regimes === void 0 ? void 0 : regimes.length) > 1 && (React__default["default"].createElement("div", { className: "select-wrapper__select" },
|
|
7973
|
+
React__default["default"].createElement("select", { defaultValue: option.line.regimeCode, onChange: handleRegimeChange }, regimes.map(function (regime) { return (React__default["default"].createElement("option", { key: regime.regimeCode, value: regime.regimeCode },
|
|
7974
|
+
regime.regimeName,
|
|
7975
|
+
" ",
|
|
7976
|
+
getRegimePriceDifference(regime))); })))),
|
|
7977
|
+
regimes.length === 1 && (React__default["default"].createElement(React__default["default"].Fragment, null, (_b = regimes.find(function (x) { return x.regimeCode == option.line.regimeCode; })) === null || _b === void 0 ? void 0 : _b.regimeName)))))),
|
|
7944
7978
|
React__default["default"].createElement("div", { className: buildClassName(["tree__column", "tree__column--price"]) }, !option.isSelected && (React__default["default"].createElement("span", { className: buildClassName([
|
|
7945
7979
|
"price",
|
|
7946
7980
|
priceDifference > 0 && "price--increase",
|
|
@@ -8332,7 +8366,7 @@ var OptionsForm = function () {
|
|
|
8332
8366
|
React__default["default"].createElement("div", { className: "booking-card__header" },
|
|
8333
8367
|
React__default["default"].createElement("h2", { className: "booking-card__header-heading" }, translations.OPTIONS_FORM.PER_BOOKING_TITLE)),
|
|
8334
8368
|
React__default["default"].createElement("div", { className: "booking-card__body" },
|
|
8335
|
-
React__default["default"].createElement("div", { className: "tree__body" }, groups.map(function (group) { return (React__default["default"].createElement(OptionBookingGroup, { group: group, firstClassName: "tree__level", secondClassName: "tree__level-heading", parentId: "booking_".concat(group.name), onGroupChange: handleOnGroupChange })); })))))),
|
|
8369
|
+
React__default["default"].createElement("div", { className: "tree__body" }, groups.map(function (group, i) { return (React__default["default"].createElement(OptionBookingGroup, { key: "".concat(group.name, "_").concat(i), group: group, firstClassName: "tree__level", secondClassName: "tree__level-heading", parentId: "booking_".concat(group.name), onGroupChange: handleOnGroupChange })); })))))),
|
|
8336
8370
|
lodash.isEmpty(groups) && lodash.isEmpty(optionUnits) && lodash.isEmpty(optionPax) && (React__default["default"].createElement(NoOptions, null)))),
|
|
8337
8371
|
React__default["default"].createElement("div", { className: "booking__navigator" },
|
|
8338
8372
|
React__default["default"].createElement(router.Link, { to: "".concat(basePath, "?").concat(bookingQueryString), title: translations.STEPS.PREVIOUS, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS),
|
|
@@ -8569,6 +8603,109 @@ var SummaryFlight = function (_a) {
|
|
|
8569
8603
|
flight.flightMetaData.luggageIncluded && (React__default["default"].createElement("p", null, translations.SIDEBAR.LUGGAGE_INCLUDED))));
|
|
8570
8604
|
};
|
|
8571
8605
|
|
|
8606
|
+
var SummaryPerPaxOptionGroup = function (_a) {
|
|
8607
|
+
var group = _a.group;
|
|
8608
|
+
var groupOptions = group.options.filter(function (x) { return x.isSelected; });
|
|
8609
|
+
return (React__default["default"].createElement("li", { className: "list__item" },
|
|
8610
|
+
React__default["default"].createElement("h6", null, group.title),
|
|
8611
|
+
React__default["default"].createElement("ul", { className: "list" }, groupOptions.map(function (opt) {
|
|
8612
|
+
var _a;
|
|
8613
|
+
return (React__default["default"].createElement("li", { key: opt.line.entryLineGuid, className: "list__item" },
|
|
8614
|
+
opt.line.productName,
|
|
8615
|
+
": ",
|
|
8616
|
+
opt.line.accommodationName,
|
|
8617
|
+
!lodash.isNil((_a = opt.line) === null || _a === void 0 ? void 0 : _a.regimeName) && ", ",
|
|
8618
|
+
opt.line.regimeName,
|
|
8619
|
+
React__default["default"].createElement("br", null),
|
|
8620
|
+
getDateText(opt.line.startDate),
|
|
8621
|
+
opt.line.startDate != opt.line.endDate ? " > ".concat(getDateText(opt.line.endDate)) : "",
|
|
8622
|
+
React__default["default"].createElement("ul", { className: "list" }, !lodash.isEmpty(opt === null || opt === void 0 ? void 0 : opt.groups) &&
|
|
8623
|
+
(opt === null || opt === void 0 ? void 0 : opt.groups.map(function (x) {
|
|
8624
|
+
if (!x.options.some(function (y) { return y.isSelected; }))
|
|
8625
|
+
return;
|
|
8626
|
+
return React__default["default"].createElement(SummaryPerPaxOptionGroup, { group: x });
|
|
8627
|
+
})))));
|
|
8628
|
+
}))));
|
|
8629
|
+
};
|
|
8630
|
+
|
|
8631
|
+
var SummaryBookingOptionPax = function (_a) {
|
|
8632
|
+
var pax = _a.pax;
|
|
8633
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, pax.groups.map(function (y) {
|
|
8634
|
+
var paxOptions = y.options.filter(function (y) { return y.isSelected; });
|
|
8635
|
+
if (lodash.isEmpty(paxOptions))
|
|
8636
|
+
return;
|
|
8637
|
+
return React__default["default"].createElement(SummaryPerPaxOptionGroup, { group: y });
|
|
8638
|
+
})));
|
|
8639
|
+
};
|
|
8640
|
+
|
|
8641
|
+
var SummaryPerUnitOptionGroup = function (_a) {
|
|
8642
|
+
var group = _a.group;
|
|
8643
|
+
var groupOptions = group.options.filter(function (x) { return x.isSelected; });
|
|
8644
|
+
return (React__default["default"].createElement("li", { className: "list__item" },
|
|
8645
|
+
React__default["default"].createElement("h6", null, group.title),
|
|
8646
|
+
React__default["default"].createElement("ul", { className: "list" }, groupOptions.map(function (opt) {
|
|
8647
|
+
var _a;
|
|
8648
|
+
return (React__default["default"].createElement("li", { key: opt.line.entryLineGuid, className: "list__item" },
|
|
8649
|
+
opt.line.productName,
|
|
8650
|
+
": ",
|
|
8651
|
+
opt.line.accommodationName,
|
|
8652
|
+
!lodash.isNil((_a = opt.line) === null || _a === void 0 ? void 0 : _a.regimeName) && ", ",
|
|
8653
|
+
opt.line.regimeName,
|
|
8654
|
+
React__default["default"].createElement("br", null),
|
|
8655
|
+
getDateText(opt.line.startDate),
|
|
8656
|
+
opt.line.startDate != opt.line.endDate ? " > ".concat(getDateText(opt.line.endDate)) : "",
|
|
8657
|
+
React__default["default"].createElement("ul", null,
|
|
8658
|
+
!lodash.isEmpty(opt === null || opt === void 0 ? void 0 : opt.groups) &&
|
|
8659
|
+
(opt === null || opt === void 0 ? void 0 : opt.groups.map(function (x) {
|
|
8660
|
+
if (!x.options.some(function (y) { return y.isSelected; }))
|
|
8661
|
+
return;
|
|
8662
|
+
return React__default["default"].createElement(SummaryPerUnitOptionGroup, { group: x });
|
|
8663
|
+
})),
|
|
8664
|
+
!lodash.isEmpty(opt === null || opt === void 0 ? void 0 : opt.pax) &&
|
|
8665
|
+
(opt === null || opt === void 0 ? void 0 : opt.pax.map(function (x) { return React__default["default"].createElement(SummaryBookingOptionPax, { pax: x }); })))));
|
|
8666
|
+
}))));
|
|
8667
|
+
};
|
|
8668
|
+
|
|
8669
|
+
var SummaryBookingOptionUnit = function (_a) {
|
|
8670
|
+
var unit = _a.unit;
|
|
8671
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, unit.groups.map(function (y) {
|
|
8672
|
+
var unitOptions = y.options.filter(function (y) { return y.isSelected; });
|
|
8673
|
+
if (lodash.isEmpty(unitOptions))
|
|
8674
|
+
return;
|
|
8675
|
+
return React__default["default"].createElement(SummaryPerUnitOptionGroup, { group: y });
|
|
8676
|
+
})));
|
|
8677
|
+
};
|
|
8678
|
+
|
|
8679
|
+
var SummaryPerBookingOptionGroup = function (_a) {
|
|
8680
|
+
var group = _a.group;
|
|
8681
|
+
var groupOptions = group.options.filter(function (x) { return x.isSelected; });
|
|
8682
|
+
return (React__default["default"].createElement("li", { className: "list__item" },
|
|
8683
|
+
React__default["default"].createElement("h6", null, group.title),
|
|
8684
|
+
React__default["default"].createElement("ul", { className: "list" }, groupOptions.map(function (opt) {
|
|
8685
|
+
var _a;
|
|
8686
|
+
return (React__default["default"].createElement("li", { key: opt.line.entryLineGuid, className: "list__item" },
|
|
8687
|
+
opt.line.productName,
|
|
8688
|
+
": ",
|
|
8689
|
+
opt.line.accommodationName,
|
|
8690
|
+
!lodash.isNil((_a = opt.line) === null || _a === void 0 ? void 0 : _a.regimeName) && ", ",
|
|
8691
|
+
opt.line.regimeName,
|
|
8692
|
+
React__default["default"].createElement("br", null),
|
|
8693
|
+
getDateText(opt.line.startDate),
|
|
8694
|
+
opt.line.startDate != opt.line.endDate ? " > ".concat(getDateText(opt.line.endDate)) : "",
|
|
8695
|
+
React__default["default"].createElement("ul", null,
|
|
8696
|
+
!lodash.isEmpty(opt === null || opt === void 0 ? void 0 : opt.groups) &&
|
|
8697
|
+
(opt === null || opt === void 0 ? void 0 : opt.groups.map(function (x) {
|
|
8698
|
+
if (!x.options.some(function (y) { return y.isSelected; }))
|
|
8699
|
+
return;
|
|
8700
|
+
return React__default["default"].createElement(SummaryPerBookingOptionGroup, { group: x });
|
|
8701
|
+
})),
|
|
8702
|
+
!lodash.isEmpty(opt === null || opt === void 0 ? void 0 : opt.units) &&
|
|
8703
|
+
(opt === null || opt === void 0 ? void 0 : opt.units.map(function (x) { return React__default["default"].createElement(SummaryBookingOptionUnit, { unit: x }); })),
|
|
8704
|
+
!lodash.isEmpty(opt === null || opt === void 0 ? void 0 : opt.pax) &&
|
|
8705
|
+
(opt === null || opt === void 0 ? void 0 : opt.pax.map(function (x) { return React__default["default"].createElement(SummaryBookingOptionPax, { pax: x }); })))));
|
|
8706
|
+
}))));
|
|
8707
|
+
};
|
|
8708
|
+
|
|
8572
8709
|
var Summary = function () {
|
|
8573
8710
|
var dispatch = useAppDispatch();
|
|
8574
8711
|
var settings = React.useContext(SettingsContext);
|
|
@@ -8712,20 +8849,30 @@ var Summary = function () {
|
|
|
8712
8849
|
React__default["default"].createElement("ul", { className: "list list--booking-summary" },
|
|
8713
8850
|
React__default["default"].createElement("li", null,
|
|
8714
8851
|
React__default["default"].createElement("h6", null, activeOption === null || activeOption === void 0 ? void 0 : activeOption.name),
|
|
8715
|
-
React__default["default"].createElement("p", null,
|
|
8716
|
-
"(",
|
|
8717
|
-
getDateText(activeOption === null || activeOption === void 0 ? void 0 : activeOption.fromDate),
|
|
8718
|
-
" >",
|
|
8719
|
-
" ",
|
|
8720
|
-
getDateText(activeOption === null || activeOption === void 0 ? void 0 : activeOption.toDate),
|
|
8721
|
-
")"),
|
|
8722
8852
|
React__default["default"].createElement("ul", null, activeOption === null || activeOption === void 0 ? void 0 : activeOption.rooms.map(function (r, ri) {
|
|
8723
8853
|
var roomOption = r.options.find(function (x) { return x.isSelected; });
|
|
8724
8854
|
return (React__default["default"].createElement("li", { key: ri, className: "list__item" }, roomOption === null || roomOption === void 0 ? void 0 :
|
|
8725
8855
|
roomOption.accommodationName,
|
|
8726
8856
|
!lodash.isNil(roomOption === null || roomOption === void 0 ? void 0 : roomOption.regimeName) && ", ", roomOption === null || roomOption === void 0 ? void 0 :
|
|
8727
8857
|
roomOption.regimeName));
|
|
8728
|
-
}))
|
|
8858
|
+
})),
|
|
8859
|
+
React__default["default"].createElement("p", null,
|
|
8860
|
+
"(",
|
|
8861
|
+
getDateText(activeOption === null || activeOption === void 0 ? void 0 : activeOption.fromDate),
|
|
8862
|
+
" >",
|
|
8863
|
+
" ",
|
|
8864
|
+
getDateText(activeOption === null || activeOption === void 0 ? void 0 : activeOption.toDate),
|
|
8865
|
+
")")),
|
|
8866
|
+
!lodash.isEmpty(activeOption === null || activeOption === void 0 ? void 0 : activeOption.groups) &&
|
|
8867
|
+
(activeOption === null || activeOption === void 0 ? void 0 : activeOption.groups.map(function (x) {
|
|
8868
|
+
if (!x.options.some(function (y) { return y.isSelected; }))
|
|
8869
|
+
return;
|
|
8870
|
+
return React__default["default"].createElement(SummaryPerBookingOptionGroup, { group: x });
|
|
8871
|
+
})),
|
|
8872
|
+
!lodash.isEmpty(activeOption === null || activeOption === void 0 ? void 0 : activeOption.optionUnits) &&
|
|
8873
|
+
(activeOption === null || activeOption === void 0 ? void 0 : activeOption.optionUnits.map(function (x) { return (React__default["default"].createElement(SummaryBookingOptionUnit, { unit: x })); })),
|
|
8874
|
+
!lodash.isEmpty(activeOption === null || activeOption === void 0 ? void 0 : activeOption.optionPax) &&
|
|
8875
|
+
(activeOption === null || activeOption === void 0 ? void 0 : activeOption.optionPax.map(function (x) { return (React__default["default"].createElement(SummaryBookingOptionPax, { pax: x })); })),
|
|
8729
8876
|
(packageDetails === null || packageDetails === void 0 ? void 0 : packageDetails.outwardFlights) &&
|
|
8730
8877
|
packageDetails.outwardFlights
|
|
8731
8878
|
.filter(function (x) { return x.isSelected; })
|
|
@@ -8977,7 +9124,7 @@ var TravelersForm = function () {
|
|
|
8977
9124
|
var agentAdressId = reactRedux.useSelector(selectAgentAdressId);
|
|
8978
9125
|
var initialValues = (_a = reactRedux.useSelector(selectTravelersFormValues)) !== null && _a !== void 0 ? _a : createInitialValues(adultIds, childIds, startDate, agentAdressId);
|
|
8979
9126
|
var _c = React.useState(false), showAgents = _c[0], setShowAgents = _c[1];
|
|
8980
|
-
var _d = React.useState(!settings.agentAdressId), showAgentSelection = _d[0], setShowAgentSelection = _d[1];
|
|
9127
|
+
var _d = React.useState(!settings.agentAdressId && !settings.hideAgentSelection), showAgentSelection = _d[0], setShowAgentSelection = _d[1];
|
|
8981
9128
|
var typeaheadAgents = (_b = lodash.sortBy(agents === null || agents === void 0 ? void 0 : agents.map(function (x) { return ({
|
|
8982
9129
|
key: "".concat(x.id),
|
|
8983
9130
|
value: "".concat(x.name, " (").concat(x.postalCode, " ").concat(x.location, ")"),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionPax } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryBookingOptionPaxProps {
|
|
4
|
+
pax: BookingOptionPax;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryBookingOptionPax: React.FC<SummaryBookingOptionPaxProps>;
|
|
7
|
+
export default SummaryBookingOptionPax;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionUnit } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryBookingOptionUnitProps {
|
|
4
|
+
unit: BookingOptionUnit;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryBookingOptionUnit: React.FC<SummaryBookingOptionUnitProps>;
|
|
7
|
+
export default SummaryBookingOptionUnit;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionGroup, PerBookingPackageOption } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryPerBookingOptionGroupProps {
|
|
4
|
+
group: BookingOptionGroup<PerBookingPackageOption>;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryPerBookingOptionGroup: React.FC<SummaryPerBookingOptionGroupProps>;
|
|
7
|
+
export default SummaryPerBookingOptionGroup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionGroup, PerPaxPackageOption } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryPerPaxOptionGroupProps {
|
|
4
|
+
group: BookingOptionGroup<PerPaxPackageOption>;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryPerPaxOptionGroup: React.FC<SummaryPerPaxOptionGroupProps>;
|
|
7
|
+
export default SummaryPerPaxOptionGroup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookingOptionGroup, PerUnitPackageOption } from "@qite/tide-client/build/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface SummaryPerUnitOptionGroupProps {
|
|
4
|
+
group: BookingOptionGroup<PerUnitPackageOption>;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryPerUnitOptionGroup: React.FC<SummaryPerUnitOptionGroupProps>;
|
|
7
|
+
export default SummaryPerUnitOptionGroup;
|