@qite/tide-booking-component 1.1.3 → 1.2.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/build/build-cjs/booking-product/components/multi-range-filter.d.ts +12 -0
- package/build/build-cjs/booking-wizard/features/booking/api.d.ts +4 -1
- package/build/build-cjs/booking-wizard/features/booking/booking-slice.d.ts +7 -3
- package/build/build-cjs/booking-wizard/features/booking/selectors.d.ts +23 -17
- package/build/build-cjs/booking-wizard/features/flight-options/flight-filter.d.ts +9 -0
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option-flight.d.ts +8 -0
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option-modal.d.ts +3 -0
- package/build/build-cjs/booking-wizard/features/flight-options/flight-option.d.ts +4 -9
- package/build/build-cjs/booking-wizard/features/flight-options/flight-utils.d.ts +6 -0
- package/build/build-cjs/booking-wizard/features/room-options/room-utils.d.ts +9 -0
- package/build/build-cjs/booking-wizard/features/room-options/room.d.ts +12 -0
- package/build/build-cjs/booking-wizard/features/room-options/traveler-rooms.d.ts +9 -0
- package/build/build-cjs/booking-wizard/types.d.ts +101 -0
- package/build/build-cjs/index.js +1563 -606
- package/build/build-cjs/shared/utils/localization-util.d.ts +30 -2
- package/build/build-esm/booking-product/components/multi-range-filter.d.ts +12 -0
- package/build/build-esm/booking-wizard/features/booking/api.d.ts +4 -1
- package/build/build-esm/booking-wizard/features/booking/booking-slice.d.ts +7 -3
- package/build/build-esm/booking-wizard/features/booking/selectors.d.ts +23 -17
- package/build/build-esm/booking-wizard/features/flight-options/flight-filter.d.ts +9 -0
- package/build/build-esm/booking-wizard/features/flight-options/flight-option-flight.d.ts +8 -0
- package/build/build-esm/booking-wizard/features/flight-options/flight-option-modal.d.ts +3 -0
- package/build/build-esm/booking-wizard/features/flight-options/flight-option.d.ts +4 -9
- package/build/build-esm/booking-wizard/features/flight-options/flight-utils.d.ts +6 -0
- package/build/build-esm/booking-wizard/features/room-options/room-utils.d.ts +9 -0
- package/build/build-esm/booking-wizard/features/room-options/room.d.ts +12 -0
- package/build/build-esm/booking-wizard/features/room-options/traveler-rooms.d.ts +9 -0
- package/build/build-esm/booking-wizard/types.d.ts +101 -0
- package/build/build-esm/index.js +1564 -607
- package/build/build-esm/shared/utils/localization-util.d.ts +30 -2
- package/package.json +3 -3
- package/rollup.config.js +23 -23
- package/src/booking-product/components/multi-range-filter.css +115 -0
- package/src/booking-product/components/multi-range-filter.tsx +114 -0
- package/src/booking-wizard/components/labeled-input.tsx +64 -64
- package/src/booking-wizard/components/labeled-select.tsx +69 -69
- package/src/booking-wizard/components/step-indicator.tsx +3 -3
- package/src/booking-wizard/features/booking/api.ts +12 -1
- package/src/booking-wizard/features/booking/booking-self-contained.tsx +50 -20
- package/src/booking-wizard/features/booking/booking-slice.ts +45 -9
- package/src/booking-wizard/features/booking/booking.tsx +67 -56
- package/src/booking-wizard/features/booking/selectors.ts +38 -11
- package/src/booking-wizard/features/flight-options/flight-filter.tsx +343 -0
- package/src/booking-wizard/features/flight-options/flight-option-flight.tsx +350 -0
- package/src/booking-wizard/features/flight-options/flight-option.tsx +30 -759
- package/src/booking-wizard/features/flight-options/flight-utils.ts +401 -0
- package/src/booking-wizard/features/flight-options/index.tsx +55 -368
- package/src/booking-wizard/features/price-details/util.ts +6 -6
- package/src/booking-wizard/features/product-options/option-room.tsx +3 -5
- package/src/booking-wizard/features/product-options/options-form.tsx +46 -54
- package/src/booking-wizard/features/room-options/index.tsx +48 -144
- package/src/booking-wizard/features/room-options/room-utils.ts +143 -0
- package/src/booking-wizard/features/room-options/room.tsx +124 -0
- package/src/booking-wizard/features/room-options/traveler-rooms.tsx +63 -0
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +2 -2
- package/src/booking-wizard/features/summary/summary.tsx +2 -2
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +1 -1
- package/src/booking-wizard/types.ts +116 -0
- package/src/shared/components/rating.tsx +21 -21
- package/src/shared/translations/fr-BE.json +222 -192
- package/src/shared/translations/nl-BE.json +222 -192
- package/src/shared/utils/class-util.ts +9 -9
- package/tsconfig.json +24 -24
package/build/build-esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import React, { useContext, useState, useEffect } from 'react';
|
|
3
3
|
import JsonURL from '@jsonurl/jsonurl';
|
|
4
|
-
import { isToday, getDate, getYear, getMonth, startOfWeek, startOfMonth, endOfWeek, addWeeks, endOfMonth, eachDayOfInterval, format as format$1, getISOWeek, getISODay, isSameMonth, startOfDay, isAfter, isEqual, isWithinInterval, endOfDay, isBefore, addMonths, addDays, formatISO, differenceInYears, parseISO, differenceInCalendarDays, parse } from 'date-fns';
|
|
4
|
+
import { isToday, getDate, getYear, getMonth, startOfWeek, startOfMonth, endOfWeek, addWeeks, endOfMonth, eachDayOfInterval, format as format$1, getISOWeek, getISODay, isSameMonth, startOfDay, isAfter, isEqual, isWithinInterval, endOfDay, isBefore, addMonths, addDays, formatISO, differenceInYears, parseISO, differenceInMinutes, differenceInCalendarDays, parse } from 'date-fns';
|
|
5
5
|
import { isNil, isArray, compact, isEmpty, range, chunk, isFunction, clamp, omit, sum, first, orderBy, uniq, uniqBy, sortBy, last, findIndex, set, get as get$2 } from 'lodash';
|
|
6
6
|
import { nlBE, fr } from 'date-fns/locale';
|
|
7
7
|
import { usePopper } from 'react-popper';
|
|
@@ -49,8 +49,8 @@ function __awaiter$1(thisArg, _arguments, P, generator) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
function __generator$1(thisArg, body) {
|
|
52
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
53
|
-
return g =
|
|
52
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
53
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
54
54
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
55
55
|
function step(op) {
|
|
56
56
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -110,10 +110,33 @@ var INPUT$1 = {
|
|
|
110
110
|
};
|
|
111
111
|
var FLIGHTS_FORM$1 = {
|
|
112
112
|
OUTWARD_FLIGHTS: "",
|
|
113
|
+
OUTWARD_FLIGHT: "",
|
|
113
114
|
RETURN_FLIGHTS: "",
|
|
115
|
+
RETURN_FLIGHT: "",
|
|
114
116
|
DIRECT_FLIGHT: "",
|
|
117
|
+
STOP: "",
|
|
118
|
+
STOPS: "",
|
|
115
119
|
FLIGHT_STOPS: "",
|
|
116
|
-
DIFFERENT_OPTION_WARNING: ""
|
|
120
|
+
DIFFERENT_OPTION_WARNING: "",
|
|
121
|
+
FILTER_OPTIONS: "",
|
|
122
|
+
AIRLINES: "",
|
|
123
|
+
AIRPORTS: "",
|
|
124
|
+
NUMBER_OF_STOPS: "",
|
|
125
|
+
FLIGHT_OUTWARD: "",
|
|
126
|
+
DEPARTURE_TIME: "",
|
|
127
|
+
TRAVEL_DURATION: "",
|
|
128
|
+
CHANGE_TIME: "",
|
|
129
|
+
FLIGHT_RETURN: "",
|
|
130
|
+
NO_FLIGHTS_FOUND: "",
|
|
131
|
+
STARTING: "",
|
|
132
|
+
LOWEST_PRICE: "",
|
|
133
|
+
CHOOSE_YOUR_CLASS: "",
|
|
134
|
+
PLUS_ONE_DAY: "",
|
|
135
|
+
STOP_TIME: "",
|
|
136
|
+
NIGHT_DEPARTURE: "",
|
|
137
|
+
MORNING_DEPARTURE: "",
|
|
138
|
+
AFTERNOON_DEPARTURE: "",
|
|
139
|
+
EVENING_DEPARTURE: ""
|
|
117
140
|
};
|
|
118
141
|
var PRODUCT$1 = {
|
|
119
142
|
STAY_INCLUDED: "",
|
|
@@ -146,7 +169,9 @@ var SHARED$1 = {
|
|
|
146
169
|
ROOMS: "Chambres",
|
|
147
170
|
TOTAL_PRICE: "Prix total",
|
|
148
171
|
ADULTS: "Adultes",
|
|
149
|
-
CHILDREN: "Enfants"
|
|
172
|
+
CHILDREN: "Enfants",
|
|
173
|
+
SELECT: "Selecteer",
|
|
174
|
+
SELECTED: "Geselecteerd"
|
|
150
175
|
};
|
|
151
176
|
var SIDEBAR$1 = {
|
|
152
177
|
OVERVIEW: "Aperçu",
|
|
@@ -228,6 +253,11 @@ var TRAVELERS_FORM$1 = {
|
|
|
228
253
|
AGENT_IS_REQUIRED: "Agent de voyage est requis"
|
|
229
254
|
}
|
|
230
255
|
};
|
|
256
|
+
var ROOM_OPTIONS_FORM$1 = {
|
|
257
|
+
TRAVELER_GROUP: "",
|
|
258
|
+
ALTERNATIVES_TRAVELER_GROUP: "",
|
|
259
|
+
SHOW_ALTERNATIVES: ""
|
|
260
|
+
};
|
|
231
261
|
var OPTIONS_FORM$1 = {
|
|
232
262
|
NO_OPTIONS_TITLE: "Aucune option",
|
|
233
263
|
NO_OPTIONS_MESSAGE: "Ce voyage n'a pas d'options supplémentaires.",
|
|
@@ -290,6 +320,7 @@ var frJson = {
|
|
|
290
320
|
SHARED: SHARED$1,
|
|
291
321
|
SIDEBAR: SIDEBAR$1,
|
|
292
322
|
TRAVELERS_FORM: TRAVELERS_FORM$1,
|
|
323
|
+
ROOM_OPTIONS_FORM: ROOM_OPTIONS_FORM$1,
|
|
293
324
|
OPTIONS_FORM: OPTIONS_FORM$1,
|
|
294
325
|
SUMMARY: SUMMARY$1,
|
|
295
326
|
CONFIRMATION: CONFIRMATION$1,
|
|
@@ -315,10 +346,33 @@ var INPUT = {
|
|
|
315
346
|
};
|
|
316
347
|
var FLIGHTS_FORM = {
|
|
317
348
|
OUTWARD_FLIGHTS: "Heenvluchten",
|
|
349
|
+
OUTWARD_FLIGHT: "Heenvlucht",
|
|
318
350
|
RETURN_FLIGHTS: "Retourvluchten",
|
|
351
|
+
RETURN_FLIGHT: "Retourvlucht",
|
|
319
352
|
DIRECT_FLIGHT: "Directe vlucht",
|
|
353
|
+
STOP: "stop",
|
|
354
|
+
STOPS: "stops",
|
|
320
355
|
FLIGHT_STOPS: "tussenstop(s)",
|
|
321
|
-
DIFFERENT_OPTION_WARNING: "Opgelet: Met deze vlucht veranderd de verblijfsduur."
|
|
356
|
+
DIFFERENT_OPTION_WARNING: "Opgelet: Met deze vlucht veranderd de verblijfsduur.",
|
|
357
|
+
FILTER_OPTIONS: "Filter opties",
|
|
358
|
+
AIRLINES: "Luchtvaartmaatschappijen",
|
|
359
|
+
AIRPORTS: "Luchthavens",
|
|
360
|
+
NUMBER_OF_STOPS: "Aantal stops",
|
|
361
|
+
FLIGHT_OUTWARD: "Vlucht heenrijs",
|
|
362
|
+
DEPARTURE_TIME: "Vertrektijd",
|
|
363
|
+
TRAVEL_DURATION: "Reisduur",
|
|
364
|
+
CHANGE_TIME: "Overstaptijd",
|
|
365
|
+
FLIGHT_RETURN: "Vlucht terugreis",
|
|
366
|
+
NO_FLIGHTS_FOUND: "Geen vluchten gevonden.",
|
|
367
|
+
STARTING: "Vanaf",
|
|
368
|
+
LOWEST_PRICE: "Laagste prijs",
|
|
369
|
+
CHOOSE_YOUR_CLASS: "Kies uw klasse:",
|
|
370
|
+
PLUS_ONE_DAY: "+1 dag",
|
|
371
|
+
STOP_TIME: "Stoptijd",
|
|
372
|
+
NIGHT_DEPARTURE: "Nacht (00:00 - 05:00)",
|
|
373
|
+
MORNING_DEPARTURE: "Ochtend (05:00 - 12:00)",
|
|
374
|
+
AFTERNOON_DEPARTURE: "Namiddag (12:00 - 18:00)",
|
|
375
|
+
EVENING_DEPARTURE: "Avond (18:00 - 00:00)"
|
|
322
376
|
};
|
|
323
377
|
var PRODUCT = {
|
|
324
378
|
STAY_INCLUDED: "Inclusief verblijf",
|
|
@@ -351,7 +405,9 @@ var SHARED = {
|
|
|
351
405
|
ROOMS: "Kamers",
|
|
352
406
|
TOTAL_PRICE: "Totale prijs",
|
|
353
407
|
ADULTS: "Volwassenen",
|
|
354
|
-
CHILDREN: "Kinderen"
|
|
408
|
+
CHILDREN: "Kinderen",
|
|
409
|
+
SELECT: "Selecteer",
|
|
410
|
+
SELECTED: "Geselecteerd"
|
|
355
411
|
};
|
|
356
412
|
var SIDEBAR = {
|
|
357
413
|
OVERVIEW: "Overzicht",
|
|
@@ -447,6 +503,11 @@ var OPTIONS_FORM = {
|
|
|
447
503
|
PER_UNIT_TITLE: "Opties per gezelschap selecteren",
|
|
448
504
|
NONE: "Geen"
|
|
449
505
|
};
|
|
506
|
+
var ROOM_OPTIONS_FORM = {
|
|
507
|
+
TRAVELER_GROUP: "Reisgezelschap",
|
|
508
|
+
ALTERNATIVES_TRAVELER_GROUP: "Alternatieve kameropties voor reisgezelschap",
|
|
509
|
+
SHOW_ALTERNATIVES: "Toon alternatieve kameropties"
|
|
510
|
+
};
|
|
450
511
|
var SUMMARY = {
|
|
451
512
|
PERSONAL_DETAILS: "Persoonlijke gegevens",
|
|
452
513
|
TRAVELERS: "reizigers",
|
|
@@ -496,6 +557,7 @@ var nlJson = {
|
|
|
496
557
|
SIDEBAR: SIDEBAR,
|
|
497
558
|
TRAVELERS_FORM: TRAVELERS_FORM,
|
|
498
559
|
OPTIONS_FORM: OPTIONS_FORM,
|
|
560
|
+
ROOM_OPTIONS_FORM: ROOM_OPTIONS_FORM,
|
|
499
561
|
SUMMARY: SUMMARY,
|
|
500
562
|
CONFIRMATION: CONFIRMATION,
|
|
501
563
|
ERROR: ERROR
|
|
@@ -729,9 +791,12 @@ var ServiceType = {
|
|
|
729
791
|
restaurant: 23,
|
|
730
792
|
event: 24,
|
|
731
793
|
training: 25,
|
|
794
|
+
voucher: 26,
|
|
795
|
+
reduction: 27,
|
|
796
|
+
rocket: 28,
|
|
732
797
|
};
|
|
733
798
|
|
|
734
|
-
|
|
799
|
+
/******************************************************************************
|
|
735
800
|
Copyright (c) Microsoft Corporation.
|
|
736
801
|
|
|
737
802
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -791,9 +856,13 @@ function __generator(thisArg, body) {
|
|
|
791
856
|
f,
|
|
792
857
|
y,
|
|
793
858
|
t,
|
|
794
|
-
g
|
|
859
|
+
g = Object.create(
|
|
860
|
+
(typeof Iterator === "function" ? Iterator : Object).prototype
|
|
861
|
+
);
|
|
795
862
|
return (
|
|
796
|
-
(g =
|
|
863
|
+
(g.next = verb(0)),
|
|
864
|
+
(g["throw"] = verb(1)),
|
|
865
|
+
(g["return"] = verb(2)),
|
|
797
866
|
typeof Symbol === "function" &&
|
|
798
867
|
(g[Symbol.iterator] = function () {
|
|
799
868
|
return this;
|
|
@@ -807,7 +876,7 @@ function __generator(thisArg, body) {
|
|
|
807
876
|
}
|
|
808
877
|
function step(op) {
|
|
809
878
|
if (f) throw new TypeError("Generator is already executing.");
|
|
810
|
-
while (_)
|
|
879
|
+
while ((g && ((g = 0), op[0] && (_ = 0)), _))
|
|
811
880
|
try {
|
|
812
881
|
if (
|
|
813
882
|
((f = 1),
|
|
@@ -877,6 +946,18 @@ function __generator(thisArg, body) {
|
|
|
877
946
|
}
|
|
878
947
|
}
|
|
879
948
|
|
|
949
|
+
typeof SuppressedError === "function"
|
|
950
|
+
? SuppressedError
|
|
951
|
+
: function (error, suppressed, message) {
|
|
952
|
+
var e = new Error(message);
|
|
953
|
+
return (
|
|
954
|
+
(e.name = "SuppressedError"),
|
|
955
|
+
(e.error = error),
|
|
956
|
+
(e.suppressed = suppressed),
|
|
957
|
+
e
|
|
958
|
+
);
|
|
959
|
+
};
|
|
960
|
+
|
|
880
961
|
var post$1 = function (url, apiKey, body, token, signal, languageCode) {
|
|
881
962
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
882
963
|
var response;
|
|
@@ -908,7 +989,38 @@ var post$1 = function (url, apiKey, body, token, signal, languageCode) {
|
|
|
908
989
|
});
|
|
909
990
|
});
|
|
910
991
|
};
|
|
911
|
-
var
|
|
992
|
+
var patch$1 = function (url, apiKey, body, token, signal, languageCode) {
|
|
993
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
994
|
+
var response;
|
|
995
|
+
return __generator(this, function (_a) {
|
|
996
|
+
switch (_a.label) {
|
|
997
|
+
case 0:
|
|
998
|
+
return [
|
|
999
|
+
4 /*yield*/,
|
|
1000
|
+
fetch(url, {
|
|
1001
|
+
method: "PATCH",
|
|
1002
|
+
headers: {
|
|
1003
|
+
"Content-Type": "application/json",
|
|
1004
|
+
"Api-Key": apiKey,
|
|
1005
|
+
Language: languageCode || "nl-BE",
|
|
1006
|
+
Authorization: token ? "Bearer " + token : "",
|
|
1007
|
+
},
|
|
1008
|
+
credentials: "include",
|
|
1009
|
+
body: body,
|
|
1010
|
+
signal: signal,
|
|
1011
|
+
}),
|
|
1012
|
+
];
|
|
1013
|
+
case 1:
|
|
1014
|
+
response = _a.sent();
|
|
1015
|
+
if (!response.ok) {
|
|
1016
|
+
throw new Error(response.statusText);
|
|
1017
|
+
}
|
|
1018
|
+
return [2 /*return*/, response];
|
|
1019
|
+
}
|
|
1020
|
+
});
|
|
1021
|
+
});
|
|
1022
|
+
};
|
|
1023
|
+
var get$1 = function (url, apiKey, token, signal, languageCode) {
|
|
912
1024
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
913
1025
|
var response;
|
|
914
1026
|
return __generator(this, function (_a) {
|
|
@@ -921,6 +1033,8 @@ var get$1 = function (url, apiKey, token, signal) {
|
|
|
921
1033
|
headers: {
|
|
922
1034
|
"Content-Type": "application/json",
|
|
923
1035
|
"Api-Key": apiKey,
|
|
1036
|
+
Language: languageCode || "nl-BE",
|
|
1037
|
+
"Accept-Language": languageCode || "nl-BE",
|
|
924
1038
|
Authorization: token ? "Bearer " + token : "",
|
|
925
1039
|
},
|
|
926
1040
|
credentials: "include",
|
|
@@ -6626,20 +6740,6 @@ var reviver = function (_, value) {
|
|
|
6626
6740
|
}
|
|
6627
6741
|
return value;
|
|
6628
6742
|
};
|
|
6629
|
-
var replacer = function (_, value) {
|
|
6630
|
-
if (typeof value === "string") {
|
|
6631
|
-
if (Date.parse(value)) {
|
|
6632
|
-
var date = new Date(value);
|
|
6633
|
-
if (date.toISOString() === value) {
|
|
6634
|
-
var year = date.getFullYear();
|
|
6635
|
-
var month = date.getMonth() + 1;
|
|
6636
|
-
var day = date.getDate();
|
|
6637
|
-
return year + "-" + month + "-" + day;
|
|
6638
|
-
}
|
|
6639
|
-
}
|
|
6640
|
-
}
|
|
6641
|
-
return value;
|
|
6642
|
-
};
|
|
6643
6743
|
|
|
6644
6744
|
var post = function (
|
|
6645
6745
|
url,
|
|
@@ -6665,29 +6765,31 @@ var post = function (
|
|
|
6665
6765
|
case 2:
|
|
6666
6766
|
responseBody = _a.sent();
|
|
6667
6767
|
result = skipReviver
|
|
6668
|
-
? JSON.parse(
|
|
6669
|
-
|
|
6670
|
-
? responseBody
|
|
6671
|
-
: ""
|
|
6672
|
-
)
|
|
6673
|
-
: JSON.parse(
|
|
6674
|
-
responseBody !== null && responseBody !== void 0
|
|
6675
|
-
? responseBody
|
|
6676
|
-
: "",
|
|
6677
|
-
reviver
|
|
6678
|
-
);
|
|
6768
|
+
? JSON.parse(responseBody)
|
|
6769
|
+
: JSON.parse(responseBody, reviver);
|
|
6679
6770
|
return [2 /*return*/, result];
|
|
6680
6771
|
}
|
|
6681
6772
|
});
|
|
6682
6773
|
});
|
|
6683
6774
|
};
|
|
6684
|
-
var
|
|
6775
|
+
var patch = function (
|
|
6776
|
+
url,
|
|
6777
|
+
apiKey,
|
|
6778
|
+
body,
|
|
6779
|
+
token,
|
|
6780
|
+
signal,
|
|
6781
|
+
skipReviver,
|
|
6782
|
+
languageCode
|
|
6783
|
+
) {
|
|
6685
6784
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
6686
6785
|
var response, responseBody, result;
|
|
6687
6786
|
return __generator(this, function (_a) {
|
|
6688
6787
|
switch (_a.label) {
|
|
6689
6788
|
case 0:
|
|
6690
|
-
return [
|
|
6789
|
+
return [
|
|
6790
|
+
4 /*yield*/,
|
|
6791
|
+
patch$1(url, apiKey, body, token, signal, languageCode),
|
|
6792
|
+
];
|
|
6691
6793
|
case 1:
|
|
6692
6794
|
response = _a.sent();
|
|
6693
6795
|
return [4 /*yield*/, response.text()];
|
|
@@ -6701,234 +6803,98 @@ var get = function (url, apiKey, token, signal, skipReviver) {
|
|
|
6701
6803
|
});
|
|
6702
6804
|
});
|
|
6703
6805
|
};
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
var
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
var url = "" + config.host + ENDPOINT_AVAILABLE_PRODUCTS;
|
|
6724
|
-
var apiKey = config.apiKey;
|
|
6725
|
-
var body = JSON.stringify(request);
|
|
6726
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6727
|
-
};
|
|
6728
|
-
/**
|
|
6729
|
-
* api/web/booking/package-search
|
|
6730
|
-
* @param config
|
|
6731
|
-
* @param request
|
|
6732
|
-
* @returns Travel options (excursions etc) for a specified product, accommodation and regime.
|
|
6733
|
-
* @depracted Use V2: Search
|
|
6734
|
-
*/
|
|
6735
|
-
var searchPackages = function (config, request, signal) {
|
|
6736
|
-
var url = "" + config.host + ENDPOINT_PACKAGE_SEARCH;
|
|
6737
|
-
var apiKey = config.apiKey;
|
|
6738
|
-
var body = JSON.stringify(request);
|
|
6739
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6740
|
-
};
|
|
6741
|
-
/**
|
|
6742
|
-
* api/web/booking/package-price-details
|
|
6743
|
-
* @param config
|
|
6744
|
-
* @param request
|
|
6745
|
-
* @returns A price breakdown for a specified Package (= product and selected options).
|
|
6746
|
-
* @deprecated Use V2: Price details
|
|
6747
|
-
*/
|
|
6748
|
-
var getPackagePriceDetails = function (config, request, signal) {
|
|
6749
|
-
var url = "" + config.host + ENDPOINT_PACKAGE_PRICE_DETAILS;
|
|
6750
|
-
var apiKey = config.apiKey;
|
|
6751
|
-
var body = JSON.stringify(request);
|
|
6752
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6753
|
-
};
|
|
6754
|
-
/**
|
|
6755
|
-
* api/web/booking/offer-entry
|
|
6756
|
-
* Creates an Tide Offer, based on the request.
|
|
6757
|
-
* @param config
|
|
6758
|
-
* @param request
|
|
6759
|
-
* @returns The (full) created offer Entry.
|
|
6760
|
-
* @deprecated Use V2: Book
|
|
6761
|
-
*/
|
|
6762
|
-
var createOffer = function (config, request, signal) {
|
|
6763
|
-
// Update request to use full response
|
|
6764
|
-
request.useShortResponse = false;
|
|
6765
|
-
var url = "" + config.host + ENDPOINT_CREATE_OFFER;
|
|
6766
|
-
var apiKey = config.apiKey;
|
|
6767
|
-
var body = JSON.stringify(request);
|
|
6768
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6769
|
-
};
|
|
6770
|
-
/**
|
|
6771
|
-
* api/web/booking/offer-entry
|
|
6772
|
-
* Creates a Tide Offer, based on the request.
|
|
6773
|
-
* @param config
|
|
6774
|
-
* @param request
|
|
6775
|
-
* @returns The (short) created offer Entry.
|
|
6776
|
-
* @deprecated Use V2: Book
|
|
6777
|
-
*/
|
|
6778
|
-
var createOfferWithShortResponse = function (config, request, signal) {
|
|
6779
|
-
// Update request to use short response
|
|
6780
|
-
request.useShortResponse = true;
|
|
6781
|
-
var url = "" + config.host + ENDPOINT_CREATE_OFFER;
|
|
6782
|
-
var apiKey = config.apiKey;
|
|
6783
|
-
var body = JSON.stringify(request, replacer);
|
|
6784
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6785
|
-
};
|
|
6786
|
-
/**
|
|
6787
|
-
* api/web/booking/entry-multiroom
|
|
6788
|
-
* Creates a Tide Booking, based on the request.
|
|
6789
|
-
* @param config
|
|
6790
|
-
* @param request
|
|
6791
|
-
* @returns The (full) created booking Entry.
|
|
6792
|
-
* @deprecated Use V2: Book
|
|
6793
|
-
*/
|
|
6794
|
-
var createEntry = function (config, request, signal) {
|
|
6795
|
-
// Update request to use full response
|
|
6796
|
-
request.useShortResponse = false;
|
|
6797
|
-
var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
|
|
6798
|
-
var apiKey = config.apiKey;
|
|
6799
|
-
var body = JSON.stringify(request, replacer);
|
|
6800
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6801
|
-
};
|
|
6802
|
-
/**
|
|
6803
|
-
* api/web/booking/entry-multiroom
|
|
6804
|
-
* Creates a Tide Booking, based on the request.
|
|
6805
|
-
* @param config
|
|
6806
|
-
* @param request
|
|
6807
|
-
* @returns The (short) created booking Entry.
|
|
6808
|
-
* @deprecated Use V2: Book
|
|
6809
|
-
*/
|
|
6810
|
-
var createEntryWithShortResponse = function (config, request, signal) {
|
|
6811
|
-
// Update request to use short response
|
|
6812
|
-
request.useShortResponse = true;
|
|
6813
|
-
var url = "" + config.host + ENDPOINT_CREATE_ENTRY;
|
|
6814
|
-
var apiKey = config.apiKey;
|
|
6815
|
-
var body = JSON.stringify(request, replacer);
|
|
6816
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6817
|
-
};
|
|
6818
|
-
/**
|
|
6819
|
-
* api/web/booking/package-offer-entry
|
|
6820
|
-
* Creates a Tide Offer, based on the request.
|
|
6821
|
-
* @param config
|
|
6822
|
-
* @param request
|
|
6823
|
-
* @returns The (full) created offer Entry.
|
|
6824
|
-
* @depracted Use V2: Book
|
|
6825
|
-
*/
|
|
6826
|
-
var createPackageOffer = function (config, request, signal) {
|
|
6827
|
-
// Update request to use full response
|
|
6828
|
-
request.useShortResponse = false;
|
|
6829
|
-
var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
|
|
6830
|
-
var apiKey = config.apiKey;
|
|
6831
|
-
var body = JSON.stringify(request, replacer);
|
|
6832
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6833
|
-
};
|
|
6834
|
-
/**
|
|
6835
|
-
* api/web/booking/package-offer-entry
|
|
6836
|
-
* Creates a Tide Offer, based on the request.
|
|
6837
|
-
* @param config
|
|
6838
|
-
* @param request
|
|
6839
|
-
* @returns The (short) created offer Entry.
|
|
6840
|
-
* @deprecated Use V2: Book
|
|
6841
|
-
*/
|
|
6842
|
-
var createPackageOfferWithShortResponse = function (config, request, signal) {
|
|
6843
|
-
// Update request to use short response
|
|
6844
|
-
request.useShortResponse = true;
|
|
6845
|
-
var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_OFFER;
|
|
6846
|
-
var apiKey = config.apiKey;
|
|
6847
|
-
var body = JSON.stringify(request, replacer);
|
|
6848
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6849
|
-
};
|
|
6850
|
-
/**
|
|
6851
|
-
* api/web/booking/package-entry
|
|
6852
|
-
* Create a Tide Booking, based on the request.
|
|
6853
|
-
* @param config
|
|
6854
|
-
* @param request
|
|
6855
|
-
* @returns The (full) created booking Entry.
|
|
6856
|
-
* @deprecated Use V2: book
|
|
6857
|
-
*/
|
|
6858
|
-
var createPackageEntry = function (config, request, signal) {
|
|
6859
|
-
// Update request to use full response
|
|
6860
|
-
request.useShortResponse = false;
|
|
6861
|
-
var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
|
|
6862
|
-
var apiKey = config.apiKey;
|
|
6863
|
-
var body = JSON.stringify(request, replacer);
|
|
6864
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6865
|
-
};
|
|
6866
|
-
/**
|
|
6867
|
-
* api/web/booking/package-entry
|
|
6868
|
-
* Create a Tide Booking, based on the request.
|
|
6869
|
-
* @param config
|
|
6870
|
-
* @param request
|
|
6871
|
-
* @returns The (short) created booking Entry.
|
|
6872
|
-
* @deprecated Use V2: Book
|
|
6873
|
-
*/
|
|
6874
|
-
var createPackageEntryWithShortResponse = function (config, request, signal) {
|
|
6875
|
-
// Update request to use short response
|
|
6876
|
-
request.useShortResponse = true;
|
|
6877
|
-
var url = "" + config.host + ENDPOINT_CREATE_PACKAGE_ENTRY;
|
|
6878
|
-
var apiKey = config.apiKey;
|
|
6879
|
-
var body = JSON.stringify(request, replacer);
|
|
6880
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6881
|
-
};
|
|
6882
|
-
/**
|
|
6883
|
-
* api/web/booking/base-prices
|
|
6884
|
-
* Get base prices of a specific product and accommodation in a defined period.
|
|
6885
|
-
* @param config
|
|
6886
|
-
* @param request
|
|
6887
|
-
* @returns The base prices of a specific product and accommodation during the defined period.
|
|
6888
|
-
* @deprecated Use V2: Prices
|
|
6889
|
-
*/
|
|
6890
|
-
var getBasePrices = function (config, request, signal) {
|
|
6891
|
-
var url = "" + config.host + ENDPOINT_GET_BASE_PRICES;
|
|
6892
|
-
var apiKey = config.apiKey;
|
|
6893
|
-
var body = JSON.stringify(request, replacer);
|
|
6894
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6895
|
-
};
|
|
6896
|
-
/**
|
|
6897
|
-
* api/web/booking/base-prices-from-date
|
|
6898
|
-
* Get base prices of a specific product and accommodation starting from a specific date.
|
|
6899
|
-
* @param config
|
|
6900
|
-
* @param request
|
|
6901
|
-
* @returns The base prices of a specific product and accommodationg starting from a specific date.
|
|
6902
|
-
*/
|
|
6903
|
-
var getBasePricesFromDate = function (config, request, signal) {
|
|
6904
|
-
var url = "" + config.host + ENDPOINT_GET_BASE_PRICES_FROM_DATE;
|
|
6905
|
-
var apiKey = config.apiKey;
|
|
6906
|
-
var body = JSON.stringify(request, replacer);
|
|
6907
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6806
|
+
var get = function (url, apiKey, token, signal, skipReviver, languageCode) {
|
|
6807
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
6808
|
+
var response, responseBody, result;
|
|
6809
|
+
return __generator(this, function (_a) {
|
|
6810
|
+
switch (_a.label) {
|
|
6811
|
+
case 0:
|
|
6812
|
+
return [4 /*yield*/, get$1(url, apiKey, token, signal, languageCode)];
|
|
6813
|
+
case 1:
|
|
6814
|
+
response = _a.sent();
|
|
6815
|
+
return [4 /*yield*/, response.text()];
|
|
6816
|
+
case 2:
|
|
6817
|
+
responseBody = _a.sent();
|
|
6818
|
+
result = skipReviver
|
|
6819
|
+
? JSON.parse(responseBody)
|
|
6820
|
+
: JSON.parse(responseBody, reviver);
|
|
6821
|
+
return [2 /*return*/, result];
|
|
6822
|
+
}
|
|
6823
|
+
});
|
|
6824
|
+
});
|
|
6908
6825
|
};
|
|
6909
6826
|
|
|
6910
6827
|
var ENDPOINT$7 = "/api/web/booking/v2";
|
|
6911
|
-
var
|
|
6828
|
+
var ENDPOINT_AVAILABLE_FLIGHTS = ENDPOINT$7 + "/available-flights";
|
|
6829
|
+
var ENDPOINT_TRANSPORT_DATES = ENDPOINT$7 + "/transport-dates";
|
|
6830
|
+
var ENDPOINT_PRICES = ENDPOINT$7 + "/prices";
|
|
6831
|
+
var ENDPOINT_AVAILABLE_COUNTRIES = ENDPOINT$7 + "/available-countries";
|
|
6912
6832
|
var ENDPOINT_SEARCH = ENDPOINT$7 + "/search";
|
|
6913
6833
|
var ENDPOINT_SEARCH_WITH_ERROR_MAPPING =
|
|
6914
6834
|
ENDPOINT$7 + "/search-with-error-mapping";
|
|
6835
|
+
// const ENDPOINT_ELASTIC = `${ENDPOINT}/elastic`; // TODO
|
|
6915
6836
|
var ENDPOINT_DETAILS = ENDPOINT$7 + "/details";
|
|
6916
6837
|
var ENDPOINT_VALIDATE_VOUCHER = ENDPOINT$7 + "/validate-voucher";
|
|
6917
|
-
var ENDPOINT_ALTERNATE_HOTELS =
|
|
6918
|
-
|
|
6838
|
+
var ENDPOINT_ALTERNATE_HOTELS = function (transactionId, optionId) {
|
|
6839
|
+
return (
|
|
6840
|
+
ENDPOINT$7 + "/details/" + transactionId + "/alternate-hotels/" + optionId
|
|
6841
|
+
);
|
|
6842
|
+
};
|
|
6843
|
+
var ENDPOINT_ALTERNATE_FLIGHTS = function (transactionId) {
|
|
6844
|
+
return ENDPOINT$7 + "/details/" + transactionId + "/alternate-flights";
|
|
6845
|
+
};
|
|
6846
|
+
var ENDPOINT_BOOKABLE_DATES = ENDPOINT$7 + "/bookable-dates";
|
|
6919
6847
|
var ENDPOINT_PRICE_DETAILS = ENDPOINT$7 + "/price-details";
|
|
6920
6848
|
var ENDPOINT_BOOK = ENDPOINT$7 + "/book";
|
|
6921
6849
|
var ENDPOINT_UPDATE = ENDPOINT$7 + "/update";
|
|
6922
6850
|
var ENDPOINT_AGENTS = ENDPOINT$7 + "/agents";
|
|
6923
|
-
var ENDPOINT_AVAILABLE_ALLOTMENTS =
|
|
6851
|
+
var ENDPOINT_AVAILABLE_ALLOTMENTS = function (eventId, productCode) {
|
|
6852
|
+
return (
|
|
6853
|
+
ENDPOINT$7 + "/get-allotment-availability/" + eventId + "/" + productCode
|
|
6854
|
+
);
|
|
6855
|
+
};
|
|
6924
6856
|
var ENDPOINT_FLIGHT_POOL = ENDPOINT$7 + "/flight-pool";
|
|
6925
|
-
var ENDPOINT_BOOKABLE_DATES = ENDPOINT$7 + "/bookable-dates";
|
|
6926
6857
|
var ENDPOINT_TOUR_CODES = ENDPOINT$7 + "/tourcodes";
|
|
6927
|
-
var
|
|
6928
|
-
|
|
6858
|
+
var ENDPOINT_CUSTOM_ENTRY_STATUS$1 = function (
|
|
6859
|
+
dossierNumber,
|
|
6860
|
+
customEntryStatusId
|
|
6861
|
+
) {
|
|
6862
|
+
return (
|
|
6863
|
+
ENDPOINT$7 +
|
|
6864
|
+
"/custom-entry-status/" +
|
|
6865
|
+
dossierNumber +
|
|
6866
|
+
"/" +
|
|
6867
|
+
customEntryStatusId
|
|
6868
|
+
);
|
|
6869
|
+
};
|
|
6870
|
+
var ENDPOINT_ENTRY_STATUS = function (dossierNumber, entryStatus) {
|
|
6871
|
+
return (
|
|
6872
|
+
ENDPOINT$7 + "/custom-entry-status/" + dossierNumber + "/" + entryStatus
|
|
6873
|
+
);
|
|
6874
|
+
};
|
|
6875
|
+
var availableFlights = function (config, request, signal) {
|
|
6876
|
+
var url = "" + config.host + ENDPOINT_AVAILABLE_FLIGHTS;
|
|
6929
6877
|
var apiKey = config.apiKey;
|
|
6930
6878
|
var body = JSON.stringify(request);
|
|
6931
|
-
return post(url, apiKey, body, config.token, signal);
|
|
6879
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
6880
|
+
};
|
|
6881
|
+
var transportDates = function (config, request, signal) {
|
|
6882
|
+
var url = "" + config.host + ENDPOINT_TRANSPORT_DATES;
|
|
6883
|
+
var apiKey = config.apiKey;
|
|
6884
|
+
var body = JSON.stringify(request);
|
|
6885
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
6886
|
+
};
|
|
6887
|
+
var prices = function (config, request, signal) {
|
|
6888
|
+
var url = "" + config.host + ENDPOINT_PRICES;
|
|
6889
|
+
var apiKey = config.apiKey;
|
|
6890
|
+
var body = JSON.stringify(request);
|
|
6891
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
6892
|
+
};
|
|
6893
|
+
var availableCountries = function (config, request, signal) {
|
|
6894
|
+
var url = "" + config.host + ENDPOINT_AVAILABLE_COUNTRIES;
|
|
6895
|
+
var apiKey = config.apiKey;
|
|
6896
|
+
var body = JSON.stringify(request);
|
|
6897
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
6932
6898
|
};
|
|
6933
6899
|
// PACKAGE SEARCH
|
|
6934
6900
|
var search = function (config, request, signal) {
|
|
@@ -6955,28 +6921,23 @@ var validateVoucher = function (config, request, signal) {
|
|
|
6955
6921
|
var body = JSON.stringify(request);
|
|
6956
6922
|
return post(url, apiKey, body, config.token, signal, true);
|
|
6957
6923
|
};
|
|
6958
|
-
var alternateHotels = function (config, transactionId, signal) {
|
|
6924
|
+
var alternateHotels = function (config, transactionId, optionId, signal) {
|
|
6959
6925
|
var url =
|
|
6960
|
-
"" +
|
|
6961
|
-
config.host +
|
|
6962
|
-
ENDPOINT_DETAILS +
|
|
6963
|
-
"/" +
|
|
6964
|
-
transactionId +
|
|
6965
|
-
ENDPOINT_ALTERNATE_HOTELS;
|
|
6926
|
+
"" + config.host + ENDPOINT_ALTERNATE_HOTELS(transactionId, optionId);
|
|
6966
6927
|
var apiKey = config.apiKey;
|
|
6967
6928
|
return get(url, apiKey, config.token, signal, true);
|
|
6968
6929
|
};
|
|
6969
6930
|
var alternateFlights = function (config, transactionId, signal) {
|
|
6970
|
-
var url =
|
|
6971
|
-
"" +
|
|
6972
|
-
config.host +
|
|
6973
|
-
ENDPOINT_DETAILS +
|
|
6974
|
-
"/" +
|
|
6975
|
-
transactionId +
|
|
6976
|
-
ENDPOINT_ALTERNATE_FLIGHTS;
|
|
6931
|
+
var url = "" + config.host + ENDPOINT_ALTERNATE_FLIGHTS(transactionId);
|
|
6977
6932
|
var apiKey = config.apiKey;
|
|
6978
6933
|
return get(url, apiKey, config.token, signal, true);
|
|
6979
6934
|
};
|
|
6935
|
+
var bookableDates = function (config, request, signal) {
|
|
6936
|
+
var url = "" + config.host + ENDPOINT_BOOKABLE_DATES;
|
|
6937
|
+
var apiKey = config.apiKey;
|
|
6938
|
+
var body = JSON.stringify(request);
|
|
6939
|
+
return post(url, apiKey, body, config.token, signal, true);
|
|
6940
|
+
};
|
|
6980
6941
|
var priceDetails = function (config, request, signal, languageCode) {
|
|
6981
6942
|
var url = "" + config.host + ENDPOINT_PRICE_DETAILS;
|
|
6982
6943
|
var apiKey = config.apiKey;
|
|
@@ -7002,13 +6963,7 @@ var agents = function (config, signal) {
|
|
|
7002
6963
|
};
|
|
7003
6964
|
var getAllotmentAvailability = function (config, eventId, productCode, signal) {
|
|
7004
6965
|
var url =
|
|
7005
|
-
"" +
|
|
7006
|
-
config.host +
|
|
7007
|
-
ENDPOINT_AVAILABLE_ALLOTMENTS +
|
|
7008
|
-
"/" +
|
|
7009
|
-
eventId +
|
|
7010
|
-
"/" +
|
|
7011
|
-
productCode;
|
|
6966
|
+
"" + config.host + ENDPOINT_AVAILABLE_ALLOTMENTS(eventId, productCode);
|
|
7012
6967
|
var apiKey = config.apiKey;
|
|
7013
6968
|
return get(url, apiKey, config.token, signal, true);
|
|
7014
6969
|
};
|
|
@@ -7018,18 +6973,31 @@ var searchFlightPool = function (config, request, signal) {
|
|
|
7018
6973
|
var body = JSON.stringify(request);
|
|
7019
6974
|
return post(url, apiKey, body, config.token, signal, true);
|
|
7020
6975
|
};
|
|
7021
|
-
var bookableDates = function (config, request, signal) {
|
|
7022
|
-
var url = "" + config.host + ENDPOINT_BOOKABLE_DATES;
|
|
7023
|
-
var apiKey = config.apiKey;
|
|
7024
|
-
var body = JSON.stringify(request);
|
|
7025
|
-
return post(url, apiKey, body, config.token, signal, true);
|
|
7026
|
-
};
|
|
7027
6976
|
var tourCodes = function (config, request, signal) {
|
|
7028
6977
|
var url = "" + config.host + ENDPOINT_TOUR_CODES;
|
|
7029
6978
|
var apiKey = config.apiKey;
|
|
7030
6979
|
var body = JSON.stringify(request);
|
|
7031
6980
|
return post(url, apiKey, body, config.token, signal, true);
|
|
7032
6981
|
};
|
|
6982
|
+
var setCustomEntryStatus = function (
|
|
6983
|
+
config,
|
|
6984
|
+
dossierNumber,
|
|
6985
|
+
customEntryStatusId,
|
|
6986
|
+
signal
|
|
6987
|
+
) {
|
|
6988
|
+
var url =
|
|
6989
|
+
"" +
|
|
6990
|
+
config.host +
|
|
6991
|
+
ENDPOINT_CUSTOM_ENTRY_STATUS$1(dossierNumber, customEntryStatusId);
|
|
6992
|
+
var apiKey = config.apiKey;
|
|
6993
|
+
return get(url, apiKey, config.token, signal, true);
|
|
6994
|
+
};
|
|
6995
|
+
var setEntryStatus = function (config, dossierNumber, entryStatus, signal) {
|
|
6996
|
+
var url =
|
|
6997
|
+
"" + config.host + ENDPOINT_ENTRY_STATUS(dossierNumber, entryStatus);
|
|
6998
|
+
var apiKey = config.apiKey;
|
|
6999
|
+
return patch(url, apiKey, null, config.token, signal, true);
|
|
7000
|
+
};
|
|
7033
7001
|
|
|
7034
7002
|
var ENDPOINT$6 = "/api/member";
|
|
7035
7003
|
var ENDPOINT_LOGIN = ENDPOINT$6 + "/login";
|
|
@@ -7259,6 +7227,8 @@ var ENDPOINT_GET_PRINT_ACTIONS = ENDPOINT$3 + "/print-action";
|
|
|
7259
7227
|
var ENDPOINT_PRINT = ENDPOINT$3 + "/print-action";
|
|
7260
7228
|
var ENDPOINT_CUSTOM_ENTRY_STATUS = ENDPOINT$3 + "/custom-entry-status";
|
|
7261
7229
|
var ENDPOINT_ENUM_ENTRY_STATUS = ENDPOINT$3 + "/enum/entry-status";
|
|
7230
|
+
var ENDPOINT_CHANGE_ENTRY_AGENT_SURCHARGE =
|
|
7231
|
+
ENDPOINT$3 + "/entry/change-agent-surcharge";
|
|
7262
7232
|
/**
|
|
7263
7233
|
* api/web/agent/print-action/{print-action-group}
|
|
7264
7234
|
* @param config
|
|
@@ -7318,20 +7288,28 @@ var getInvoiceList = function (config, filterItem, gridColumns, signal) {
|
|
|
7318
7288
|
var apiKey = config.apiKey;
|
|
7319
7289
|
return get(url, apiKey, config.token, signal, true);
|
|
7320
7290
|
};
|
|
7321
|
-
var getCustomEntryStatus = function (config, signal) {
|
|
7291
|
+
var getCustomEntryStatus = function (config, signal, languageCode) {
|
|
7322
7292
|
var url = "" + config.host + ENDPOINT_CUSTOM_ENTRY_STATUS;
|
|
7323
7293
|
var apiKey = config.apiKey;
|
|
7324
|
-
return get(url, apiKey, config.token, signal, true);
|
|
7294
|
+
return get(url, apiKey, config.token, signal, true, languageCode);
|
|
7325
7295
|
};
|
|
7326
|
-
var getEntryStatus = function (config, signal) {
|
|
7296
|
+
var getEntryStatus = function (config, signal, languageCode) {
|
|
7327
7297
|
var url = "" + config.host + ENDPOINT_ENUM_ENTRY_STATUS;
|
|
7328
7298
|
var apiKey = config.apiKey;
|
|
7329
|
-
return get(url, apiKey, config.token, signal, true);
|
|
7299
|
+
return get(url, apiKey, config.token, signal, true, languageCode);
|
|
7300
|
+
};
|
|
7301
|
+
var changeEntryAgentSurcharge = function (config, request, signal) {
|
|
7302
|
+
var url = "" + config.host + ENDPOINT_CHANGE_ENTRY_AGENT_SURCHARGE;
|
|
7303
|
+
var apiKey = config.apiKey;
|
|
7304
|
+
var body = JSON.stringify(request);
|
|
7305
|
+
return post$1(url, apiKey, body, config.token, signal);
|
|
7330
7306
|
};
|
|
7331
7307
|
|
|
7332
7308
|
var ENDPOINT$2 = "/api/web";
|
|
7333
7309
|
var ENDPOINT_CREATE_CRM_CONTACT = ENDPOINT$2 + "/crmcontact";
|
|
7334
7310
|
var ENDPOINT_CREATE_AFFILIATES = ENDPOINT$2 + "/affiliates";
|
|
7311
|
+
var ENDPOINT_TRANSLATION_DICTIONARY = ENDPOINT$2 + "/translation-dictionary";
|
|
7312
|
+
var ENDPOINT_BOOKING_ACCOMMODATION = ENDPOINT$2 + "/booking-accommodation";
|
|
7335
7313
|
/**
|
|
7336
7314
|
* api/web/crmcontact
|
|
7337
7315
|
* Creates a CRM contact.
|
|
@@ -7344,7 +7322,7 @@ var createCrmContact = function (config, request, signal) {
|
|
|
7344
7322
|
var url = "" + config.host + ENDPOINT_CREATE_CRM_CONTACT;
|
|
7345
7323
|
var apiKey = config.apiKey;
|
|
7346
7324
|
var body = JSON.stringify(request);
|
|
7347
|
-
return post
|
|
7325
|
+
return post(url, apiKey, body, config.token, signal);
|
|
7348
7326
|
};
|
|
7349
7327
|
/**
|
|
7350
7328
|
* api/web/affiliates
|
|
@@ -7358,6 +7336,18 @@ var getAffiliates = function (config, signal) {
|
|
|
7358
7336
|
var apiKey = config.apiKey;
|
|
7359
7337
|
return get(url, apiKey, config.token, signal, true);
|
|
7360
7338
|
};
|
|
7339
|
+
var getTranslationDictionary = function (config, segmentKey, signal) {
|
|
7340
|
+
var url =
|
|
7341
|
+
"" + config.host + ENDPOINT_TRANSLATION_DICTIONARY + "/" + segmentKey;
|
|
7342
|
+
var apiKey = config.apiKey;
|
|
7343
|
+
return get(url, apiKey, undefined, signal);
|
|
7344
|
+
};
|
|
7345
|
+
var generateBookingAccommodations = function (config, request, signal) {
|
|
7346
|
+
var url = "" + config.host + ENDPOINT_BOOKING_ACCOMMODATION;
|
|
7347
|
+
var apiKey = config.apiKey;
|
|
7348
|
+
var body = JSON.stringify(request);
|
|
7349
|
+
return post(url, apiKey, body, config.token, signal);
|
|
7350
|
+
};
|
|
7361
7351
|
|
|
7362
7352
|
var ENDPOINT$1 = "/api/web/contact";
|
|
7363
7353
|
var ENDPOINT_CONTACT_FORM = ENDPOINT$1 + "/contact-form";
|
|
@@ -7408,31 +7398,22 @@ build.ServiceType = ServiceType;
|
|
|
7408
7398
|
var agents_1 = build.agents = agents;
|
|
7409
7399
|
build.alternateFlights = alternateFlights;
|
|
7410
7400
|
build.alternateHotels = alternateHotels;
|
|
7401
|
+
build.availableCountries = availableCountries;
|
|
7402
|
+
build.availableFlights = availableFlights;
|
|
7411
7403
|
var book_1 = build.book = book;
|
|
7412
7404
|
build.bookableDates = bookableDates;
|
|
7405
|
+
build.changeEntryAgentSurcharge = changeEntryAgentSurcharge;
|
|
7413
7406
|
build.confirm = confirm;
|
|
7414
7407
|
build.contactForm = contactForm;
|
|
7415
7408
|
build.contactHasTag = contactHasTag;
|
|
7416
7409
|
build.createCrmContact = createCrmContact;
|
|
7417
|
-
build.createEntry = createEntry;
|
|
7418
|
-
build.createEntryWithShortResponse = createEntryWithShortResponse;
|
|
7419
|
-
build.createOffer = createOffer;
|
|
7420
|
-
build.createOfferWithShortResponse = createOfferWithShortResponse;
|
|
7421
|
-
build.createPackageEntry = createPackageEntry;
|
|
7422
|
-
build.createPackageEntryWithShortResponse =
|
|
7423
|
-
createPackageEntryWithShortResponse;
|
|
7424
|
-
build.createPackageOffer = createPackageOffer;
|
|
7425
|
-
build.createPackageOfferWithShortResponse =
|
|
7426
|
-
createPackageOfferWithShortResponse;
|
|
7427
7410
|
build.createParams = createParams;
|
|
7428
7411
|
var details_1 = build.details = details;
|
|
7429
7412
|
build.feedXml = feedXml;
|
|
7430
7413
|
build.forgotPassword = forgotPassword;
|
|
7414
|
+
var generateBookingAccommodations_1 = build.generateBookingAccommodations = generateBookingAccommodations;
|
|
7431
7415
|
build.getAffiliates = getAffiliates;
|
|
7432
7416
|
build.getAllotmentAvailability = getAllotmentAvailability;
|
|
7433
|
-
build.getAvailableProducts = getAvailableProducts;
|
|
7434
|
-
build.getBasePrices = getBasePrices;
|
|
7435
|
-
build.getBasePricesFromDate = getBasePricesFromDate;
|
|
7436
7417
|
build.getCountries = getCountries;
|
|
7437
7418
|
build.getCustomEntryStatus = getCustomEntryStatus;
|
|
7438
7419
|
build.getEntryList = getEntryList;
|
|
@@ -7440,19 +7421,21 @@ build.getEntryStatus = getEntryStatus;
|
|
|
7440
7421
|
build.getEntryTotals = getEntryTotals;
|
|
7441
7422
|
build.getInvoiceList = getInvoiceList;
|
|
7442
7423
|
build.getMolliePayment = getMolliePayment;
|
|
7443
|
-
build.getPackagePriceDetails = getPackagePriceDetails;
|
|
7444
7424
|
build.getPrintActions = getPrintActions;
|
|
7425
|
+
build.getTranslationDictionary = getTranslationDictionary;
|
|
7445
7426
|
build.login = login;
|
|
7446
7427
|
build.logout = logout;
|
|
7447
7428
|
var priceDetails_1 = build.priceDetails = priceDetails;
|
|
7429
|
+
build.prices = prices;
|
|
7448
7430
|
build.print = print;
|
|
7449
|
-
build.readPackageSearchList = readPackageSearchList;
|
|
7450
7431
|
build.resetPassword = resetPassword;
|
|
7451
7432
|
build.search = search;
|
|
7452
7433
|
build.searchFlightPool = searchFlightPool;
|
|
7453
|
-
build.searchPackages = searchPackages;
|
|
7454
7434
|
build.searchWithErrorMapping = searchWithErrorMapping;
|
|
7435
|
+
build.setCustomEntryStatus = setCustomEntryStatus;
|
|
7436
|
+
build.setEntryStatus = setEntryStatus;
|
|
7455
7437
|
build.tourCodes = tourCodes;
|
|
7438
|
+
build.transportDates = transportDates;
|
|
7456
7439
|
build.update = update;
|
|
7457
7440
|
var validateVoucher_1 = build.validateVoucher = validateVoucher;
|
|
7458
7441
|
|
|
@@ -8279,14 +8262,26 @@ var fetchAgents$1 = function (signal, apiSettings) { return __awaiter$1(void 0,
|
|
|
8279
8262
|
}
|
|
8280
8263
|
});
|
|
8281
8264
|
}); };
|
|
8282
|
-
var
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8265
|
+
var fetchAccommodationViews$1 = function (request, signal, apiSettings) { return __awaiter$1(void 0, void 0, void 0, function () {
|
|
8266
|
+
var tideClientConfig;
|
|
8267
|
+
return __generator$1(this, function (_a) {
|
|
8268
|
+
switch (_a.label) {
|
|
8269
|
+
case 0:
|
|
8270
|
+
tideClientConfig = buildTideClientConfig(apiSettings);
|
|
8271
|
+
return [4 /*yield*/, generateBookingAccommodations_1(tideClientConfig, request, signal)];
|
|
8272
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
8273
|
+
}
|
|
8274
|
+
});
|
|
8275
|
+
}); };
|
|
8276
|
+
var packageApi = {
|
|
8277
|
+
fetchDetails: fetchDetails,
|
|
8278
|
+
fetchAgents: fetchAgents$1,
|
|
8279
|
+
fetchAccommodationViews: fetchAccommodationViews$1
|
|
8280
|
+
};
|
|
8281
|
+
|
|
8282
|
+
var ROOM_OPTIONS_FORM_STEP = 1;
|
|
8283
|
+
var FLIGHT_OPTIONS_FORM_STEP = 2;
|
|
8284
|
+
var OPTIONS_FORM_STEP = 3;
|
|
8290
8285
|
var TRAVELERS_FORM_STEP = 4;
|
|
8291
8286
|
var SUMMARY_STEP = 5;
|
|
8292
8287
|
var CONFIRMATION_STEP = 6;
|
|
@@ -8477,6 +8472,7 @@ var selectIsFetchingProductOptions = function (state) {
|
|
|
8477
8472
|
var selectDepartureFlight = function (state) { var _a, _b; return (_b = (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.outwardFlights) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.isSelected; }); };
|
|
8478
8473
|
var selectReturnFlight = function (state) { var _a, _b; return (_b = (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.returnFlights) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.isSelected; }); };
|
|
8479
8474
|
var selectPackageRooms = function (state) { var _a, _b; return (_b = (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.options.find(function (x) { return x.isSelected; })) === null || _b === void 0 ? void 0 : _b.rooms; };
|
|
8475
|
+
var selectAvailabilities = function (state) { var _a, _b; return (_b = (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.options.find(function (x) { return x.isSelected; })) === null || _b === void 0 ? void 0 : _b.availabilities; };
|
|
8480
8476
|
var selectPackageTags = function (state) { var _a; return (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.tags; };
|
|
8481
8477
|
var selectIsOnRequest = function (state) { var _a, _b; return (_b = (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.options.find(function (x) { return x.isSelected; })) === null || _b === void 0 ? void 0 : _b.isOnRequest; };
|
|
8482
8478
|
var selectPackageOptionUnits = function (state) { var _a, _b; return (_b = (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.options.find(function (x) { return x.isSelected; })) === null || _b === void 0 ? void 0 : _b.optionUnits; };
|
|
@@ -8541,6 +8537,20 @@ var selectCalculateDeposit = function (state) {
|
|
|
8541
8537
|
var selectIsRetry = function (state) { return state.booking.isRetry; };
|
|
8542
8538
|
var selectStartDate = function (state) { var _a, _b; return (_b = (_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.options.find(function (x) { return x.isSelected; })) === null || _b === void 0 ? void 0 : _b.fromDate; };
|
|
8543
8539
|
var selectAgents = function (state) { return state.booking.agents; };
|
|
8540
|
+
var selectProductCode = function (state) { var _a; return (_a = state.booking.productAttributes) === null || _a === void 0 ? void 0 : _a.productCode; };
|
|
8541
|
+
var selectAccommodationCodes = function (state) {
|
|
8542
|
+
var _a;
|
|
8543
|
+
var accommodationCodes = [];
|
|
8544
|
+
(_a = state.booking.package) === null || _a === void 0 ? void 0 : _a.options.forEach(function (o) {
|
|
8545
|
+
o.rooms.forEach(function (r) { return r.options.forEach(function (ro) {
|
|
8546
|
+
if (!accommodationCodes.some(function (y) { return y === ro.accommodationCode; })) {
|
|
8547
|
+
accommodationCodes.push(ro.accommodationCode);
|
|
8548
|
+
}
|
|
8549
|
+
}); });
|
|
8550
|
+
});
|
|
8551
|
+
return accommodationCodes;
|
|
8552
|
+
};
|
|
8553
|
+
var selectAccommodationViews = function (state) { return state.booking.accommodationViews; };
|
|
8544
8554
|
var selectBookingQuery = function (state) {
|
|
8545
8555
|
var bookingAttributes = state.booking.bookingAttributes;
|
|
8546
8556
|
if (!bookingAttributes) {
|
|
@@ -8557,11 +8567,16 @@ var selectBookingQuery = function (state) {
|
|
|
8557
8567
|
AQF: true,
|
|
8558
8568
|
});
|
|
8559
8569
|
}
|
|
8560
|
-
if (key === "
|
|
8570
|
+
if (key === "allotmentIds" && !value.length) {
|
|
8571
|
+
value = undefined;
|
|
8572
|
+
}
|
|
8573
|
+
if (key === "flight" && value) {
|
|
8561
8574
|
var flightInfo = value;
|
|
8562
8575
|
value = JsonURL.stringify(flightInfo, { AQF: true });
|
|
8563
8576
|
}
|
|
8564
|
-
|
|
8577
|
+
if (value) {
|
|
8578
|
+
params[key] = value;
|
|
8579
|
+
}
|
|
8565
8580
|
});
|
|
8566
8581
|
return params;
|
|
8567
8582
|
};
|
|
@@ -8753,6 +8768,9 @@ var fetchPackage = createAsyncThunk("booking/fetchPackage", function (_, _a) {
|
|
|
8753
8768
|
_b.sent();
|
|
8754
8769
|
return [4 /*yield*/, dispatch(fetchPackageDetails())];
|
|
8755
8770
|
case 2:
|
|
8771
|
+
_b.sent();
|
|
8772
|
+
return [4 /*yield*/, dispatch(fetchAccommodationViews())];
|
|
8773
|
+
case 3:
|
|
8756
8774
|
_b.sent();
|
|
8757
8775
|
dispatch(setFetchingPackage(false));
|
|
8758
8776
|
return [2 /*return*/];
|
|
@@ -8837,6 +8855,34 @@ var fetchPackageDetails = createAsyncThunk("booking/details", function (_, _a) {
|
|
|
8837
8855
|
});
|
|
8838
8856
|
});
|
|
8839
8857
|
});
|
|
8858
|
+
var fetchAccommodationViews = createAsyncThunk("booking/accommodationViews", function (_, _a) {
|
|
8859
|
+
_a.dispatch; var getState = _a.getState, signal = _a.signal;
|
|
8860
|
+
return __awaiter$1(void 0, void 0, void 0, function () {
|
|
8861
|
+
var state, languageCode, accommodationCodes, productCode, request;
|
|
8862
|
+
return __generator$1(this, function (_b) {
|
|
8863
|
+
switch (_b.label) {
|
|
8864
|
+
case 0:
|
|
8865
|
+
state = getState();
|
|
8866
|
+
if (!state.booking.accommodationViewId)
|
|
8867
|
+
return [2 /*return*/, Promise.resolve()];
|
|
8868
|
+
languageCode = selectLanguageCode(state);
|
|
8869
|
+
accommodationCodes = selectAccommodationCodes(state);
|
|
8870
|
+
productCode = selectProductCode(state);
|
|
8871
|
+
if (!productCode) {
|
|
8872
|
+
throw Error('No product selected');
|
|
8873
|
+
}
|
|
8874
|
+
request = {
|
|
8875
|
+
languageCode: languageCode,
|
|
8876
|
+
productCode: productCode,
|
|
8877
|
+
accommodationCodes: accommodationCodes,
|
|
8878
|
+
contentViewId: state.booking.accommodationViewId
|
|
8879
|
+
};
|
|
8880
|
+
return [4 /*yield*/, packageApi.fetchAccommodationViews(request, signal, state.apiSettings)];
|
|
8881
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
8882
|
+
}
|
|
8883
|
+
});
|
|
8884
|
+
});
|
|
8885
|
+
});
|
|
8840
8886
|
var getActiveOption = function (state) {
|
|
8841
8887
|
if (state.package)
|
|
8842
8888
|
return state.package.options.find(function (x) { return x.isSelected; });
|
|
@@ -9018,17 +9064,15 @@ var bookingSlice = createSlice({
|
|
|
9018
9064
|
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
|
|
9019
9065
|
state.currentStep = action.payload;
|
|
9020
9066
|
},
|
|
9021
|
-
|
|
9067
|
+
setFlights: function (state, action) {
|
|
9022
9068
|
if (!state.package)
|
|
9023
9069
|
return;
|
|
9024
|
-
changeOutwardFlight(state.package, action.payload);
|
|
9070
|
+
changeOutwardFlight(state.package, action.payload.selectedOutward);
|
|
9071
|
+
changeReturnFlight(state.package, action.payload.selectedReturn);
|
|
9025
9072
|
changePackageOption(state.package);
|
|
9026
9073
|
},
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
return;
|
|
9030
|
-
changeReturnFlight(state.package, action.payload);
|
|
9031
|
-
changePackageOption(state.package);
|
|
9074
|
+
setAccommodationViewId: function (state, action) {
|
|
9075
|
+
state.accommodationViewId = action.payload;
|
|
9032
9076
|
}
|
|
9033
9077
|
},
|
|
9034
9078
|
extraReducers: function (builder) {
|
|
@@ -9136,9 +9180,14 @@ var bookingSlice = createSlice({
|
|
|
9136
9180
|
state.agents = action.payload;
|
|
9137
9181
|
}
|
|
9138
9182
|
});
|
|
9183
|
+
builder.addCase(fetchAccommodationViews.fulfilled, function (state, action) {
|
|
9184
|
+
if (action.payload) {
|
|
9185
|
+
state.accommodationViews = action.payload;
|
|
9186
|
+
}
|
|
9187
|
+
});
|
|
9139
9188
|
},
|
|
9140
9189
|
});
|
|
9141
|
-
var setOfficeId = (_a = bookingSlice.actions, _a.setOfficeId), setLanguageCode = _a.setLanguageCode, setTranslations = _a.setTranslations, setBookingOptions = _a.setBookingOptions, setBookingType = _a.setBookingType, setProductAttributes = _a.setProductAttributes, setBookingAttributes = _a.setBookingAttributes, setCalculateDeposit = _a.setCalculateDeposit, setBookingNumber = _a.setBookingNumber, setIsRetry = _a.setIsRetry, setFetchingPackage = _a.setFetchingPackage, setPackage = _a.setPackage, setPackageRooms = _a.setPackageRooms, setPackageOptionPax = _a.setPackageOptionPax, setPackageOptionUnits = _a.setPackageOptionUnits, setPackageGroups = _a.setPackageGroups, setSkipPayment = _a.setSkipPayment, setGeneratePaymentUrl = _a.setGeneratePaymentUrl, setTagIds = _a.setTagIds, setAgentAdressId = _a.setAgentAdressId, setBookingRemarks = _a.setBookingRemarks, setVoucherCodes = _a.setVoucherCodes, setCurrentStep = _a.setCurrentStep, setPackageAirlineGroups = _a.setPackageAirlineGroups, setPackageAirportGroups = _a.setPackageAirportGroups,
|
|
9190
|
+
var setOfficeId = (_a = bookingSlice.actions, _a.setOfficeId), setLanguageCode = _a.setLanguageCode, setTranslations = _a.setTranslations, setBookingOptions = _a.setBookingOptions, setBookingType = _a.setBookingType, setProductAttributes = _a.setProductAttributes, setBookingAttributes = _a.setBookingAttributes, setCalculateDeposit = _a.setCalculateDeposit, setBookingNumber = _a.setBookingNumber, setIsRetry = _a.setIsRetry, setFetchingPackage = _a.setFetchingPackage, setPackage = _a.setPackage, setPackageRooms = _a.setPackageRooms, setPackageOptionPax = _a.setPackageOptionPax, setPackageOptionUnits = _a.setPackageOptionUnits, setPackageGroups = _a.setPackageGroups, setSkipPayment = _a.setSkipPayment, setGeneratePaymentUrl = _a.setGeneratePaymentUrl, setTagIds = _a.setTagIds, setAgentAdressId = _a.setAgentAdressId, setBookingRemarks = _a.setBookingRemarks, setVoucherCodes = _a.setVoucherCodes, setCurrentStep = _a.setCurrentStep, setPackageAirlineGroups = _a.setPackageAirlineGroups, setPackageAirportGroups = _a.setPackageAirportGroups, setFlights = _a.setFlights, setAccommodationViewId = _a.setAccommodationViewId;
|
|
9142
9191
|
var bookingReducer = bookingSlice.reducer;
|
|
9143
9192
|
|
|
9144
9193
|
var initialState = {
|
|
@@ -9175,12 +9224,12 @@ var StepIndicators = function (_a) {
|
|
|
9175
9224
|
var _b = useContext(SettingsContext), flightOptions = _b.flightOptions, roomOptions = _b.roomOptions;
|
|
9176
9225
|
var translations = useSelector(selectTranslations);
|
|
9177
9226
|
var allSteps = [];
|
|
9178
|
-
if (!roomOptions.isHidden) {
|
|
9179
|
-
allSteps.push(translations.STEPS.ROOM_OPTIONS);
|
|
9180
|
-
}
|
|
9181
9227
|
if (!flightOptions.isHidden) {
|
|
9182
9228
|
allSteps.push(translations.STEPS.FLIGHT_OPTIONS);
|
|
9183
9229
|
}
|
|
9230
|
+
if (!roomOptions.isHidden) {
|
|
9231
|
+
allSteps.push(translations.STEPS.ROOM_OPTIONS);
|
|
9232
|
+
}
|
|
9184
9233
|
allSteps.push(translations.STEPS.EXTRA_OPTIONS);
|
|
9185
9234
|
allSteps.push(translations.STEPS.PERSONAL_DETAILS);
|
|
9186
9235
|
allSteps.push(translations.STEPS.SUMMARY);
|
|
@@ -9289,196 +9338,569 @@ var Error$1 = function () {
|
|
|
9289
9338
|
translations.ERROR.ERROR_TEXT3)))))));
|
|
9290
9339
|
};
|
|
9291
9340
|
|
|
9292
|
-
var
|
|
9293
|
-
var
|
|
9294
|
-
var
|
|
9295
|
-
var
|
|
9296
|
-
var
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
var
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
var
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
? translations.FLIGHTS_FORM.DIRECT_FLIGHT
|
|
9308
|
-
: "".concat(item.flightMetaData.flightLines.length - 1, " ").concat(translations.FLIGHTS_FORM.FLIGHT_STOPS);
|
|
9309
|
-
return (React.createElement("div", { className: "flight__option" },
|
|
9310
|
-
React.createElement("div", { className: "radiobutton" },
|
|
9311
|
-
React.createElement("div", { className: "radiobutton__label" },
|
|
9312
|
-
React.createElement("input", { type: "radio", value: item.entryLineGuid, id: "".concat(group, "_").concat(item.entryLineGuid), name: group, className: "radiobutton__input", disabled: isDisabled, onChange: function () { return onChange(item); }, checked: isSelected }),
|
|
9313
|
-
React.createElement("span", null,
|
|
9314
|
-
airline,
|
|
9315
|
-
" ",
|
|
9316
|
-
flightLabel,
|
|
9317
|
-
" - ",
|
|
9318
|
-
item.class),
|
|
9319
|
-
priceDifference !== 0 && (React.createElement("span", { className: buildClassName([
|
|
9320
|
-
"price",
|
|
9321
|
-
priceDifference > 0 && "price--increase",
|
|
9322
|
-
priceDifference < 0 && "price--decrease",
|
|
9323
|
-
]) }, getPriceDifferenceText(priceDifference))),
|
|
9324
|
-
!isSameOption && (React.createElement(Icon$1, { name: "ui-warning", title: translations.FLIGHTS_FORM.DIFFERENT_OPTION_WARNING })))),
|
|
9325
|
-
item.flightMetaData && (React.createElement("div", null, item.flightMetaData.flightLines.map(function (fl, i) { return (React.createElement("div", { key: i },
|
|
9326
|
-
React.createElement("span", null,
|
|
9327
|
-
fl.departureAirportDescription,
|
|
9328
|
-
" ",
|
|
9329
|
-
format$1(new Date(fl.departureDate), "dd/MM/yyyy"),
|
|
9330
|
-
" ",
|
|
9331
|
-
fl.departureTime),
|
|
9332
|
-
React.createElement("span", null,
|
|
9333
|
-
">> ",
|
|
9334
|
-
fl.airlineCode,
|
|
9335
|
-
fl.number,
|
|
9336
|
-
" >>"),
|
|
9337
|
-
React.createElement("span", null,
|
|
9338
|
-
fl.arrivalAirportDescription,
|
|
9339
|
-
" ",
|
|
9340
|
-
format$1(new Date(fl.arrivalDate), "dd/MM/yyyy"),
|
|
9341
|
-
" ",
|
|
9342
|
-
fl.arrivalTime))); })))));
|
|
9343
|
-
};
|
|
9344
|
-
|
|
9345
|
-
var FlightOptionsForm = function () {
|
|
9346
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
9347
|
-
var settings = useContext(SettingsContext);
|
|
9348
|
-
var translations = useSelector(selectTranslations);
|
|
9349
|
-
var dispatch = useAppDispatch();
|
|
9350
|
-
var packageDetails = useSelector(selectPackageDetails);
|
|
9351
|
-
var bookingQueryString = useSelector(selectBookingQueryString);
|
|
9352
|
-
var isLoading = useSelector(selectIsFetchingProductOptions);
|
|
9353
|
-
var flights = useSelector(selectPackageFlights);
|
|
9354
|
-
var handleSubmit = function (e) {
|
|
9355
|
-
if (settings.skipRouter) {
|
|
9356
|
-
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
9341
|
+
var MultiRangeFilter = function (_a) {
|
|
9342
|
+
var min = _a.min, max = _a.max, selectedMin = _a.selectedMin, selectedMax = _a.selectedMax, valueFormatter = _a.valueFormatter, onChange = _a.onChange;
|
|
9343
|
+
var _b = useState(false), isDragging = _b[0], setIsDragging = _b[1];
|
|
9344
|
+
var _c = useState(0), leftPercentage = _c[0], setLeftPercentage = _c[1];
|
|
9345
|
+
var _d = useState(0), rightPercentage = _d[0], setRightPercentage = _d[1];
|
|
9346
|
+
var _e = useState(min), minVal = _e[0], setMinVal = _e[1];
|
|
9347
|
+
var _f = useState(max), maxVal = _f[0], setMaxVal = _f[1];
|
|
9348
|
+
var minGap = 5;
|
|
9349
|
+
useEffect(function () {
|
|
9350
|
+
setSliderTrack();
|
|
9351
|
+
}, [minVal, maxVal]);
|
|
9352
|
+
var slideMin = function (e) {
|
|
9353
|
+
var value = parseInt(e.target.value, 10);
|
|
9354
|
+
if (value >= min && selectedMax - value >= minGap) {
|
|
9355
|
+
setMinVal(value);
|
|
9357
9356
|
}
|
|
9358
|
-
|
|
9359
|
-
|
|
9357
|
+
};
|
|
9358
|
+
var slideMax = function (e) {
|
|
9359
|
+
var value = parseInt(e.target.value, 10);
|
|
9360
|
+
if (value <= max && value - selectedMin >= minGap) {
|
|
9361
|
+
setMaxVal(value);
|
|
9360
9362
|
}
|
|
9361
|
-
e.preventDefault();
|
|
9362
9363
|
};
|
|
9363
|
-
var
|
|
9364
|
-
|
|
9364
|
+
var setSliderTrack = function () {
|
|
9365
|
+
var range = document.querySelector(".slider-track");
|
|
9366
|
+
if (range) {
|
|
9367
|
+
var minPercent = ((minVal - min) / (max - min)) * 100;
|
|
9368
|
+
var maxPercent = ((maxVal - min) / (max - min)) * 100;
|
|
9369
|
+
setLeftPercentage(minPercent);
|
|
9370
|
+
setRightPercentage(100 - maxPercent);
|
|
9371
|
+
}
|
|
9365
9372
|
};
|
|
9366
|
-
var
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
var
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9373
|
+
var startDrag = function () {
|
|
9374
|
+
setIsDragging(true);
|
|
9375
|
+
};
|
|
9376
|
+
var stopDrag = function () {
|
|
9377
|
+
setIsDragging(false);
|
|
9378
|
+
onChange(minVal, maxVal);
|
|
9379
|
+
};
|
|
9380
|
+
return (React.createElement("div", { className: "double-slider-box" },
|
|
9381
|
+
React.createElement("div", { className: "input-box" },
|
|
9382
|
+
React.createElement("div", { className: "min-box" }, valueFormatter(min)),
|
|
9383
|
+
React.createElement("div", { className: "max-box" }, valueFormatter(max))),
|
|
9384
|
+
React.createElement("div", { className: "range-slider" },
|
|
9385
|
+
React.createElement("div", { className: "slider-track", style: { 'left': leftPercentage + '%', right: rightPercentage + '%' } }),
|
|
9386
|
+
React.createElement("input", { type: "range", min: min, max: max, value: minVal, onChange: slideMin, onMouseDown: startDrag, onMouseUp: stopDrag, onTouchStart: startDrag, onTouchEnd: stopDrag, className: "min-val" }),
|
|
9387
|
+
React.createElement("input", { type: "range", min: min, max: max, value: maxVal, onChange: slideMax, onMouseDown: startDrag, onMouseUp: stopDrag, onTouchStart: startDrag, onTouchEnd: stopDrag, className: "max-val" }),
|
|
9388
|
+
isDragging && React.createElement("div", { className: "min-tooltip" }, valueFormatter(minVal)),
|
|
9389
|
+
isDragging && React.createElement("div", { className: "max-tooltip" }, valueFormatter(maxVal)))));
|
|
9390
|
+
};
|
|
9391
|
+
|
|
9392
|
+
/*interface FlightGroup {
|
|
9393
|
+
code: string;
|
|
9394
|
+
startDate: Date,
|
|
9395
|
+
endDate: Date;
|
|
9396
|
+
options: BookingPackageFlight[];
|
|
9397
|
+
}*/
|
|
9398
|
+
var buildGroupedFlights = function (outwardFlights, returnFlights) {
|
|
9399
|
+
if (!outwardFlights || !returnFlights)
|
|
9400
|
+
return [];
|
|
9401
|
+
// let outwardGroups = groupFlights(outwardFlights);
|
|
9402
|
+
// let returnGroups = groupFlights(returnFlights);
|
|
9403
|
+
var pairs = [];
|
|
9404
|
+
outwardFlights.forEach(function (outwardFlight) {
|
|
9405
|
+
if (outwardFlight.externalGuid) {
|
|
9406
|
+
var returnFlight = returnFlights.find(function (x) { return x.externalGuid === outwardFlight.externalGuid; });
|
|
9407
|
+
pairs.push({ outward: outwardFlight, return: returnFlight });
|
|
9408
|
+
}
|
|
9409
|
+
else {
|
|
9410
|
+
var outwardCode = outwardFlight.code.substring(0, 7);
|
|
9411
|
+
var returnCode_1 = outwardCode.split(" ").reduce(function (a, b) { return "".concat(b, " ").concat(a); });
|
|
9412
|
+
returnFlights.filter(function (x) { return x.code.startsWith(returnCode_1); }).forEach(function (returnFlight) {
|
|
9413
|
+
pairs.push({ outward: outwardFlight, return: returnFlight });
|
|
9414
|
+
});
|
|
9415
|
+
}
|
|
9416
|
+
});
|
|
9417
|
+
var results = pairs.map(function (x) {
|
|
9418
|
+
var outwardFlightDetails = getFlightDetails(x.outward);
|
|
9419
|
+
var returnFlightDetails = getFlightDetails(x.return);
|
|
9420
|
+
return {
|
|
9421
|
+
isSelected: x.outward.isSelected && x.return.isSelected,
|
|
9422
|
+
price: x.outward.price + x.return.price,
|
|
9423
|
+
outward: outwardFlightDetails,
|
|
9424
|
+
return: returnFlightDetails,
|
|
9425
|
+
selectedOutward: x.outward,
|
|
9426
|
+
selectedReturn: x.return
|
|
9427
|
+
};
|
|
9428
|
+
});
|
|
9429
|
+
return results;
|
|
9430
|
+
};
|
|
9431
|
+
var buildFilterOptions = function (outwardFlights, returnFlights, translations) {
|
|
9432
|
+
if (!outwardFlights || !returnFlights)
|
|
9433
|
+
return undefined;
|
|
9434
|
+
var airports = [];
|
|
9435
|
+
var airlines = [];
|
|
9436
|
+
var numberOfStops = [];
|
|
9437
|
+
var outwardDeparturePeriods = [];
|
|
9438
|
+
var returnDeparturePeriods = [];
|
|
9439
|
+
var lowestDepartureTravelDuration = 9999;
|
|
9440
|
+
var highestDepartureTravelDuration = 0;
|
|
9441
|
+
var lowestDepartureChangeDuration = 9999;
|
|
9442
|
+
var highestDepartureChangeDuration = 0;
|
|
9443
|
+
outwardFlights.forEach(function (flight) {
|
|
9444
|
+
var _a;
|
|
9445
|
+
var airlineCode = flight.code.split('/')[1];
|
|
9446
|
+
if ((_a = flight.flightMetaData.flightLines) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9447
|
+
var firstLine_1 = flight.flightMetaData.flightLines[0];
|
|
9448
|
+
if (!airports.some(function (x) { return x.value === firstLine_1.departureAirport; })) {
|
|
9449
|
+
airports.push({
|
|
9450
|
+
value: firstLine_1 === null || firstLine_1 === void 0 ? void 0 : firstLine_1.departureAirport,
|
|
9451
|
+
label: firstLine_1.departureAirportDescription,
|
|
9452
|
+
count: 0,
|
|
9453
|
+
isSelected: false
|
|
9454
|
+
});
|
|
9391
9455
|
}
|
|
9392
9456
|
}
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
var
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9457
|
+
if (!airlines.some(function (x) { return x.value === airlineCode; })) {
|
|
9458
|
+
airlines.push({
|
|
9459
|
+
value: airlineCode,
|
|
9460
|
+
label: flight.airlineDescription,
|
|
9461
|
+
count: 0,
|
|
9462
|
+
isSelected: false
|
|
9463
|
+
});
|
|
9464
|
+
}
|
|
9465
|
+
var stopCount = flight.flightMetaData.flightLines.length - 1;
|
|
9466
|
+
if (!numberOfStops.some(function (x) { return x.value === (stopCount + ''); })) {
|
|
9467
|
+
numberOfStops.push({
|
|
9468
|
+
value: (stopCount + ''),
|
|
9469
|
+
label: stopCount === 0
|
|
9470
|
+
? translations.FLIGHTS_FORM.DIRECT_FLIGHT
|
|
9471
|
+
: stopCount == 1
|
|
9472
|
+
? "".concat(stopCount, " ").concat(translations.FLIGHTS_FORM.STOP)
|
|
9473
|
+
: "".concat(stopCount, " ").concat(translations.FLIGHTS_FORM.STOPS),
|
|
9474
|
+
count: 0,
|
|
9475
|
+
isSelected: false
|
|
9476
|
+
});
|
|
9477
|
+
}
|
|
9478
|
+
var departureTime = flight.flightMetaData.flightLines[0].departureTime;
|
|
9479
|
+
var timeBracket = determineTimeBracket(departureTime);
|
|
9480
|
+
if (!outwardDeparturePeriods.some(function (x) { return x.value === timeBracket; })) {
|
|
9481
|
+
outwardDeparturePeriods.push({
|
|
9482
|
+
value: timeBracket,
|
|
9483
|
+
label: getBracketTranslation(timeBracket, translations),
|
|
9484
|
+
count: 0,
|
|
9485
|
+
isSelected: false
|
|
9486
|
+
});
|
|
9487
|
+
}
|
|
9488
|
+
var travelDurationInMinutes = minutesFromTicks(flight.flightMetaData.durationInTicks);
|
|
9489
|
+
if (travelDurationInMinutes > highestDepartureTravelDuration)
|
|
9490
|
+
highestDepartureTravelDuration = travelDurationInMinutes;
|
|
9491
|
+
if (travelDurationInMinutes < lowestDepartureTravelDuration)
|
|
9492
|
+
lowestDepartureTravelDuration = travelDurationInMinutes;
|
|
9493
|
+
var changeDurationInMinutes = getTotalChangeDuration(flight);
|
|
9494
|
+
if (changeDurationInMinutes > highestDepartureChangeDuration)
|
|
9495
|
+
highestDepartureChangeDuration = changeDurationInMinutes;
|
|
9496
|
+
if (changeDurationInMinutes < lowestDepartureChangeDuration)
|
|
9497
|
+
lowestDepartureChangeDuration = changeDurationInMinutes;
|
|
9498
|
+
});
|
|
9499
|
+
var lowestReturnTravelDuration = 9999;
|
|
9500
|
+
var highestReturnTravelDuration = 0;
|
|
9501
|
+
var lowestReturnChangeDuration = 9999;
|
|
9502
|
+
var highestReturnChangeDuration = 0;
|
|
9503
|
+
returnFlights.forEach(function (flight) {
|
|
9504
|
+
var durationInMinutes = minutesFromTicks(flight.flightMetaData.durationInTicks);
|
|
9505
|
+
if (durationInMinutes > highestReturnTravelDuration)
|
|
9506
|
+
highestReturnTravelDuration = durationInMinutes;
|
|
9507
|
+
if (durationInMinutes < lowestReturnTravelDuration)
|
|
9508
|
+
lowestReturnTravelDuration = durationInMinutes;
|
|
9509
|
+
var changeDurationInMinutes = getTotalChangeDuration(flight);
|
|
9510
|
+
if (changeDurationInMinutes > highestReturnChangeDuration)
|
|
9511
|
+
highestReturnChangeDuration = changeDurationInMinutes;
|
|
9512
|
+
if (changeDurationInMinutes < lowestReturnChangeDuration)
|
|
9513
|
+
lowestReturnChangeDuration = changeDurationInMinutes;
|
|
9514
|
+
var departureTime = flight.flightMetaData.flightLines[0].departureTime;
|
|
9515
|
+
var timeBracket = determineTimeBracket(departureTime);
|
|
9516
|
+
if (!returnDeparturePeriods.some(function (x) { return x.value === timeBracket; })) {
|
|
9517
|
+
returnDeparturePeriods.push({
|
|
9518
|
+
value: timeBracket,
|
|
9519
|
+
label: getBracketTranslation(timeBracket, translations),
|
|
9520
|
+
count: 0,
|
|
9521
|
+
isSelected: false
|
|
9522
|
+
});
|
|
9523
|
+
}
|
|
9524
|
+
});
|
|
9525
|
+
return {
|
|
9526
|
+
airports: airports,
|
|
9527
|
+
airlines: airlines,
|
|
9528
|
+
numberOfStops: numberOfStops,
|
|
9529
|
+
outward: {
|
|
9530
|
+
departurePeriod: outwardDeparturePeriods,
|
|
9531
|
+
travelDuration: {
|
|
9532
|
+
min: lowestDepartureTravelDuration,
|
|
9533
|
+
max: highestDepartureTravelDuration,
|
|
9534
|
+
selectedMin: lowestDepartureTravelDuration,
|
|
9535
|
+
selectedMax: highestDepartureTravelDuration
|
|
9536
|
+
},
|
|
9537
|
+
changeDuration: {
|
|
9538
|
+
min: lowestDepartureChangeDuration,
|
|
9539
|
+
max: highestDepartureChangeDuration,
|
|
9540
|
+
selectedMin: lowestDepartureChangeDuration,
|
|
9541
|
+
selectedMax: highestDepartureChangeDuration
|
|
9542
|
+
}
|
|
9543
|
+
},
|
|
9544
|
+
return: {
|
|
9545
|
+
departurePeriod: returnDeparturePeriods,
|
|
9546
|
+
travelDuration: {
|
|
9547
|
+
min: lowestReturnTravelDuration,
|
|
9548
|
+
max: highestReturnTravelDuration,
|
|
9549
|
+
selectedMin: lowestReturnTravelDuration,
|
|
9550
|
+
selectedMax: highestReturnTravelDuration
|
|
9551
|
+
},
|
|
9552
|
+
changeDuration: {
|
|
9553
|
+
min: lowestReturnChangeDuration,
|
|
9554
|
+
max: highestReturnChangeDuration,
|
|
9555
|
+
selectedMin: lowestReturnChangeDuration,
|
|
9556
|
+
selectedMax: highestReturnChangeDuration
|
|
9557
|
+
}
|
|
9558
|
+
}
|
|
9559
|
+
};
|
|
9560
|
+
};
|
|
9561
|
+
var filterGroupedFlights = function (groups, filterOptions) {
|
|
9562
|
+
if (!groups.length || !filterOptions)
|
|
9563
|
+
return [];
|
|
9564
|
+
var filteredGroups = groups;
|
|
9565
|
+
if (filterOptions.airlines.some(function (x) { return x.isSelected; })) {
|
|
9566
|
+
var selectedAirlineCodes_1 = filterOptions.airlines.filter(function (x) { return x.isSelected; });
|
|
9567
|
+
filteredGroups = filteredGroups.filter(function (x) { return selectedAirlineCodes_1.some(function (y) { return y.value === x.outward.airlineCode; }); });
|
|
9568
|
+
}
|
|
9569
|
+
if (filterOptions.airports.some(function (x) { return x.isSelected; })) {
|
|
9570
|
+
var selectedAirlineCodes_2 = filterOptions.airports.filter(function (x) { return x.isSelected; });
|
|
9571
|
+
filteredGroups = filteredGroups.filter(function (x) { return selectedAirlineCodes_2.some(function (y) { return y.value === x.outward.departureAirportCode; }); });
|
|
9572
|
+
}
|
|
9573
|
+
if (filterOptions.numberOfStops.some(function (x) { return x.isSelected; })) {
|
|
9574
|
+
var selectedNumberOfStops_1 = filterOptions.airlines.filter(function (x) { return x.isSelected; });
|
|
9575
|
+
filteredGroups = filteredGroups.filter(function (x) { return selectedNumberOfStops_1.some(function (y) { return parseInt(y.value) === (x.outward.flightLines.length - 1); }); });
|
|
9576
|
+
}
|
|
9577
|
+
filteredGroups = filterGroupedFlightByDirection(filteredGroups, true, filterOptions.outward);
|
|
9578
|
+
filteredGroups = filterGroupedFlightByDirection(filteredGroups, false, filterOptions.return);
|
|
9579
|
+
return filteredGroups;
|
|
9580
|
+
};
|
|
9581
|
+
var filterGroupedFlightByDirection = function (groups, isOutward, directionFilter) {
|
|
9582
|
+
var filteredGroups = groups;
|
|
9583
|
+
if (directionFilter.departurePeriod.some(function (x) { return x.isSelected; })) {
|
|
9584
|
+
var selectedDeparturePeriods_1 = directionFilter.departurePeriod.filter(function (x) { return x.isSelected; });
|
|
9585
|
+
filteredGroups = filteredGroups.filter(function (x) { return selectedDeparturePeriods_1.some(function (y) { return y.value === determineTimeBracket((isOutward ? x.outward : x.return).departureTime); }); });
|
|
9586
|
+
}
|
|
9587
|
+
filteredGroups = filteredGroups.filter(function (x) { return directionFilter.travelDuration.selectedMin <= (isOutward ? x.outward : x.return).travelDurationMinutes && (isOutward ? x.outward : x.return).travelDurationMinutes <= directionFilter.travelDuration.selectedMax; });
|
|
9588
|
+
return filteredGroups.filter(function (x) { return directionFilter.changeDuration.selectedMin <= (isOutward ? x.outward : x.return).changeDurationMinutes && (isOutward ? x.outward : x.return).changeDurationMinutes <= directionFilter.changeDuration.selectedMax; });
|
|
9589
|
+
};
|
|
9590
|
+
var formatMinutes = function (minutes) {
|
|
9591
|
+
var hh = Math.floor(minutes / 60);
|
|
9592
|
+
var mm = Math.floor(minutes % 60);
|
|
9593
|
+
return pad(hh, 2) + ":" + pad(mm, 2);
|
|
9594
|
+
};
|
|
9595
|
+
var getFlightDetails = function (flight) {
|
|
9596
|
+
var firstLine = flight.flightMetaData.flightLines[0];
|
|
9597
|
+
var lastLine = flight.flightMetaData.flightLines[flight.flightMetaData.flightLines.length - 1];
|
|
9598
|
+
var airlineCode = flight.code.split('/')[1];
|
|
9599
|
+
var waitDurations = getWaitDurations(flight.flightMetaData.flightLines);
|
|
9600
|
+
return {
|
|
9601
|
+
airline: flight.airlineDescription,
|
|
9602
|
+
airlineCode: airlineCode,
|
|
9603
|
+
departureDate: firstLine.departureDate,
|
|
9604
|
+
departureTime: firstLine.departureTime,
|
|
9605
|
+
departureAirportCode: firstLine.departureAirport,
|
|
9606
|
+
departureAirport: firstLine.departureAirportDescription,
|
|
9607
|
+
arrivalDate: lastLine.arrivalDate,
|
|
9608
|
+
arrivalTime: lastLine.arrivalTime,
|
|
9609
|
+
arrivalAirport: lastLine.arrivalAirportDescription,
|
|
9610
|
+
travelDuration: formatDuration(flight.flightMetaData.durationInTicks),
|
|
9611
|
+
travelDurationMinutes: minutesFromTicks(flight.flightMetaData.durationInTicks),
|
|
9612
|
+
changeDurationMinutes: getTotalChangeDuration(flight),
|
|
9613
|
+
numberOfStops: flight.flightMetaData.flightLines.length - 1,
|
|
9614
|
+
isNextDay: isNextDay(firstLine.departureDate, lastLine.arrivalDate),
|
|
9615
|
+
travelClass: firstLine.travelClass,
|
|
9616
|
+
flightLines: flight.flightMetaData.flightLines.map(function (x, i) { return ({
|
|
9617
|
+
airline: x.operatingAirlineDescription,
|
|
9618
|
+
departureDate: x.departureDate,
|
|
9619
|
+
departureTime: x.departureTime,
|
|
9620
|
+
departureAirport: x.departureAirportDescription,
|
|
9621
|
+
arrivalDate: x.arrivalDate,
|
|
9622
|
+
arrivalTime: x.arrivalTime,
|
|
9623
|
+
arrivalAirport: x.arrivalAirportDescription,
|
|
9624
|
+
number: "".concat(x.airlineCode, " ").concat(x.number),
|
|
9625
|
+
travelDuration: formatDuration(x.durationInTicks),
|
|
9626
|
+
waitDuration: waitDurations.length - 1 <= i ? waitDurations[i] : undefined,
|
|
9627
|
+
}); })
|
|
9628
|
+
};
|
|
9629
|
+
};
|
|
9630
|
+
var isNextDay = function (startDateString, endDateString) {
|
|
9631
|
+
var startDate = parseISO(startDateString);
|
|
9632
|
+
var endDate = parseISO(endDateString);
|
|
9633
|
+
return !isEqual(startDate, endDate);
|
|
9634
|
+
};
|
|
9635
|
+
var getWaitDurations = function (lines) {
|
|
9636
|
+
if (lines.length <= 1)
|
|
9637
|
+
return [];
|
|
9638
|
+
var arrivalDate = lines[0].arrivalDate;
|
|
9639
|
+
var arrivalTime = lines[0].arrivalTime;
|
|
9640
|
+
var waitDurations = [];
|
|
9641
|
+
for (var i = 1; i < lines.length; i++) {
|
|
9642
|
+
var line = lines[i];
|
|
9643
|
+
var waitDuration = getWaitDuration(arrivalDate, arrivalTime, line.departureDate, line.departureTime);
|
|
9644
|
+
waitDurations.push(waitDuration);
|
|
9645
|
+
arrivalDate = line.arrivalDate;
|
|
9646
|
+
arrivalTime = line.arrivalTime;
|
|
9647
|
+
}
|
|
9648
|
+
return waitDurations;
|
|
9649
|
+
};
|
|
9650
|
+
var getWaitDuration = function (arrivalDateString, arrivalTime, departureDateString, departureTime) {
|
|
9651
|
+
var minutes = getWaitDurationInMinutes(arrivalDateString, arrivalTime, departureDateString, departureTime);
|
|
9652
|
+
var hh = Math.floor(minutes / 60);
|
|
9653
|
+
var mm = Math.floor(minutes % 60);
|
|
9654
|
+
return pad(hh, 2) + ":" + pad(mm, 2);
|
|
9655
|
+
};
|
|
9656
|
+
var getWaitDurationInMinutes = function (arrivalDateString, arrivalTime, departureDateString, departureTime) {
|
|
9657
|
+
var arrivalDate = parseISO(arrivalDateString);
|
|
9658
|
+
var arrivalTimeParts = arrivalTime.split(':');
|
|
9659
|
+
arrivalDate.setHours(parseInt(arrivalTimeParts[0]));
|
|
9660
|
+
arrivalDate.setMinutes(parseInt(arrivalTimeParts[1]));
|
|
9661
|
+
var departureDate = parseISO(departureDateString);
|
|
9662
|
+
var departureTimeParts = departureTime.split(':');
|
|
9663
|
+
departureDate.setHours(parseInt(departureTimeParts[0]));
|
|
9664
|
+
departureDate.setMinutes(parseInt(departureTimeParts[1]));
|
|
9665
|
+
return differenceInMinutes(departureDate, arrivalDate);
|
|
9666
|
+
};
|
|
9667
|
+
/*const groupFlights = (flights: BookingPackageFlight[]) => {
|
|
9668
|
+
let flightsPool = [...flights];
|
|
9669
|
+
let groups = [] as FlightGroup[];
|
|
9670
|
+
for (var i = 0; i < flightsPool.length; i++) {
|
|
9671
|
+
const flight = flightsPool[i];
|
|
9672
|
+
|
|
9673
|
+
const relatedFlights = flightsPool.filter(x => x != flight
|
|
9674
|
+
&& x.code === flight.code
|
|
9675
|
+
&& isDateEqual(x.startDateTime, flight.startDateTime)
|
|
9676
|
+
&& isDateEqual(x.endDateTime, flight.endDateTime)
|
|
9677
|
+
);
|
|
9678
|
+
|
|
9679
|
+
flightsPool = flightsPool.filter(x => x != flight
|
|
9680
|
+
&& relatedFlights.some(y => y != x));
|
|
9681
|
+
|
|
9682
|
+
groups.push({
|
|
9683
|
+
code: flight.code,
|
|
9684
|
+
startDate: parseISO(flight.startDateTime),
|
|
9685
|
+
endDate: parseISO(flight.endDateTime),
|
|
9686
|
+
options: [flight, ...relatedFlights]
|
|
9687
|
+
});
|
|
9688
|
+
}
|
|
9689
|
+
}
|
|
9690
|
+
|
|
9691
|
+
const isDateEqual = (first: string, second: string) => {
|
|
9692
|
+
const firstDate = parseISO(first);
|
|
9693
|
+
const secondDate = parseISO(second);
|
|
9694
|
+
|
|
9695
|
+
return isEqual(firstDate, secondDate);
|
|
9696
|
+
}*/
|
|
9697
|
+
var minutesFromTicks = function (ticks) {
|
|
9698
|
+
var totalSeconds = ticks / 10000000;
|
|
9699
|
+
return Math.floor(totalSeconds / 60);
|
|
9700
|
+
};
|
|
9701
|
+
var formatDuration = function (ticks) {
|
|
9702
|
+
if (!ticks)
|
|
9703
|
+
return '';
|
|
9704
|
+
var totalSeconds = ticks / 10000000;
|
|
9705
|
+
var hh = Math.floor(totalSeconds / 3600);
|
|
9706
|
+
var mm = Math.floor((totalSeconds % 3600) / 60);
|
|
9707
|
+
return pad(hh, 2) + ":" + pad(mm, 2);
|
|
9708
|
+
};
|
|
9709
|
+
var pad = function (input, width) {
|
|
9710
|
+
var n = input + '';
|
|
9711
|
+
return n.length >= width ? n : new Array(width - n.length + 1).join('0') + n;
|
|
9712
|
+
};
|
|
9713
|
+
var determineTimeBracket = function (input) {
|
|
9714
|
+
var time = parseInt(input.replace(':', ''));
|
|
9715
|
+
if (time <= 500)
|
|
9716
|
+
return '0000-0500';
|
|
9717
|
+
if (time > 500 && time <= 1200)
|
|
9718
|
+
return '0500-1200';
|
|
9719
|
+
if (time > 1200 && time <= 1800)
|
|
9720
|
+
return '1201-1800';
|
|
9721
|
+
return '1800-2400';
|
|
9722
|
+
};
|
|
9723
|
+
var getBracketTranslation = function (input, translations) {
|
|
9724
|
+
if (input === '0000-0500')
|
|
9725
|
+
return translations.FLIGHTS_FORM.NIGHT_DEPARTURE;
|
|
9726
|
+
if (input === '0500-1200')
|
|
9727
|
+
return translations.FLIGHTS_FORM.MORNING_DEPARTURE;
|
|
9728
|
+
if (input === '1200-1800')
|
|
9729
|
+
return translations.FLIGHTS_FORM.AFTERNOON_DEPARTURE;
|
|
9730
|
+
return translations.FLIGHTS_FORM.EVENING_DEPARTURE;
|
|
9731
|
+
};
|
|
9732
|
+
var getTotalChangeDuration = function (flight) {
|
|
9733
|
+
var lines = flight.flightMetaData.flightLines;
|
|
9734
|
+
if (lines.length <= 1)
|
|
9735
|
+
return 0;
|
|
9736
|
+
var arrivalDate = lines[0].arrivalDate;
|
|
9737
|
+
var arrivalTime = lines[0].arrivalTime;
|
|
9738
|
+
var waitDuration = 0;
|
|
9739
|
+
for (var i = 1; i < lines.length; i++) {
|
|
9740
|
+
var line = lines[i];
|
|
9741
|
+
waitDuration += getWaitDurationInMinutes(arrivalDate, arrivalTime, line.departureDate, line.departureTime);
|
|
9742
|
+
}
|
|
9743
|
+
return waitDuration;
|
|
9434
9744
|
};
|
|
9435
9745
|
|
|
9436
|
-
var
|
|
9437
|
-
var
|
|
9746
|
+
var FlightFilter = function (_a) {
|
|
9747
|
+
var filterOptions = _a.filterOptions, resultCount = _a.resultCount, applyFilter = _a.applyFilter;
|
|
9438
9748
|
var translations = useSelector(selectTranslations);
|
|
9439
|
-
var
|
|
9440
|
-
var
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9749
|
+
var _b = useState(false), filtersVisible = _b[0], setFiltersVisible = _b[1];
|
|
9750
|
+
var updateAirportFilter = function (code) {
|
|
9751
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { airports: filterOptions.airports.map(function (x) {
|
|
9752
|
+
if (x.value !== code)
|
|
9753
|
+
return x;
|
|
9754
|
+
return __assign(__assign({}, x), { isSelected: !x.isSelected });
|
|
9755
|
+
}) });
|
|
9756
|
+
applyFilter(updatedFilterOptions);
|
|
9757
|
+
};
|
|
9758
|
+
var updateAirlineFilter = function (code) {
|
|
9759
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { airlines: filterOptions.airlines.map(function (x) {
|
|
9760
|
+
if (x.value !== code)
|
|
9761
|
+
return x;
|
|
9762
|
+
return __assign(__assign({}, x), { isSelected: !x.isSelected });
|
|
9763
|
+
}) });
|
|
9764
|
+
applyFilter(updatedFilterOptions);
|
|
9765
|
+
};
|
|
9766
|
+
var updateStopsFilter = function (count) {
|
|
9767
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { numberOfStops: filterOptions.airlines.map(function (x) {
|
|
9768
|
+
if (x.value !== count)
|
|
9769
|
+
return x;
|
|
9770
|
+
return __assign(__assign({}, x), { isSelected: !x.isSelected });
|
|
9771
|
+
}) });
|
|
9772
|
+
applyFilter(updatedFilterOptions);
|
|
9773
|
+
};
|
|
9774
|
+
var updateOutwardDeparture = function (period) {
|
|
9775
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { outward: __assign(__assign({}, filterOptions.outward), { departurePeriod: filterOptions.outward.departurePeriod.map(function (x) {
|
|
9776
|
+
if (x.value !== period)
|
|
9777
|
+
return x;
|
|
9778
|
+
return __assign(__assign({}, x), { isSelected: !x.isSelected });
|
|
9779
|
+
}) }) });
|
|
9780
|
+
applyFilter(updatedFilterOptions);
|
|
9781
|
+
};
|
|
9782
|
+
var updateOutwardTravelDuration = function (min, max) {
|
|
9783
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { outward: __assign(__assign({}, filterOptions.outward), { travelDuration: __assign(__assign({}, filterOptions.outward.travelDuration), { selectedMin: min, selectedMax: max }) }) });
|
|
9784
|
+
applyFilter(updatedFilterOptions);
|
|
9785
|
+
};
|
|
9786
|
+
var updateOutwardChangeDuration = function (min, max) {
|
|
9787
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { outward: __assign(__assign({}, filterOptions.outward), { changeDuration: __assign(__assign({}, filterOptions.outward.changeDuration), { selectedMin: min, selectedMax: max }) }) });
|
|
9788
|
+
applyFilter(updatedFilterOptions);
|
|
9789
|
+
};
|
|
9790
|
+
var updateReturnDeparture = function (period) {
|
|
9791
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { return: __assign(__assign({}, filterOptions.return), { departurePeriod: filterOptions.return.departurePeriod.map(function (x) {
|
|
9792
|
+
if (x.value !== period)
|
|
9793
|
+
return x;
|
|
9794
|
+
return __assign(__assign({}, x), { isSelected: !x.isSelected });
|
|
9795
|
+
}) }) });
|
|
9796
|
+
applyFilter(updatedFilterOptions);
|
|
9797
|
+
};
|
|
9798
|
+
var updateReturnTravelDuration = function (min, max) {
|
|
9799
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { return: __assign(__assign({}, filterOptions.return), { travelDuration: __assign(__assign({}, filterOptions.return.travelDuration), { selectedMin: min, selectedMax: max }) }) });
|
|
9800
|
+
applyFilter(updatedFilterOptions);
|
|
9801
|
+
};
|
|
9802
|
+
var updateReturnChangeDuration = function (min, max) {
|
|
9803
|
+
var updatedFilterOptions = __assign(__assign({}, filterOptions), { return: __assign(__assign({}, filterOptions.return), { changeDuration: __assign(__assign({}, filterOptions.return.changeDuration), { selectedMin: min, selectedMax: max }) }) });
|
|
9804
|
+
applyFilter(updatedFilterOptions);
|
|
9805
|
+
};
|
|
9806
|
+
return (React.createElement(React.Fragment, null,
|
|
9807
|
+
React.createElement("button", { type: "button", className: "cta cta--filter", onClick: function () { return setFiltersVisible(!filtersVisible); } },
|
|
9808
|
+
React.createElement("svg", { width: 11, height: 10 },
|
|
9809
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#filter" })),
|
|
9810
|
+
React.createElement("span", null, translations.FLIGHTS_FORM.FILTER_OPTIONS),
|
|
9811
|
+
filtersVisible),
|
|
9812
|
+
React.createElement("div", { className: buildClassName(["flight__filter", filtersVisible && "flight__filter--active"]) },
|
|
9813
|
+
React.createElement("div", { className: "flight__filter__header" },
|
|
9814
|
+
React.createElement("div", { className: "flight__filter__header__title" },
|
|
9815
|
+
React.createElement("h3", null, translations.FLIGHTS_FORM.FILTER_OPTIONS),
|
|
9816
|
+
React.createElement("p", null,
|
|
9817
|
+
"er zijn ",
|
|
9818
|
+
React.createElement("strong", null,
|
|
9819
|
+
resultCount,
|
|
9820
|
+
" vluchten"),
|
|
9821
|
+
" gevonden"))),
|
|
9822
|
+
React.createElement("div", { className: "flight__filter__body" },
|
|
9823
|
+
React.createElement("div", { className: "flight__filter__group" },
|
|
9824
|
+
React.createElement("div", { className: "flight__filter__group__title" }, translations.FLIGHTS_FORM.AIRLINES),
|
|
9825
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" }, filterOptions.airlines.map(function (option, k) { return (React.createElement("div", { className: "tree", key: k },
|
|
9826
|
+
React.createElement("div", { className: "checkbox flight__filter__checkbox" },
|
|
9827
|
+
React.createElement("label", { htmlFor: 'airline_' + option.value, className: "checkbox__label" },
|
|
9828
|
+
React.createElement("input", { type: "checkbox", id: 'airline_' + option.value, className: "checkbox__input checkbox__input--parent", onClick: function () { return updateAirlineFilter(option.value); } }),
|
|
9829
|
+
React.createElement("span", { className: "radiobutton__label-text" },
|
|
9830
|
+
option.label,
|
|
9831
|
+
" ",
|
|
9832
|
+
option.count > 0 && (React.createElement("span", { className: "amount" },
|
|
9833
|
+
"(",
|
|
9834
|
+
option.count,
|
|
9835
|
+
")"))))))); }))),
|
|
9836
|
+
React.createElement("div", { className: "flight__filter__group" },
|
|
9837
|
+
React.createElement("div", { className: "flight__filter__group__title" }, translations.FLIGHTS_FORM.AIRPORTS),
|
|
9838
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" }, filterOptions.airports.map(function (option, k) { return (React.createElement("div", { className: "tree", key: k },
|
|
9839
|
+
React.createElement("div", { className: "checkbox flight__filter__checkbox" },
|
|
9840
|
+
React.createElement("label", { htmlFor: 'airport_' + option.value, className: "checkbox__label" },
|
|
9841
|
+
React.createElement("input", { type: "checkbox", id: 'airport_' + option.value, className: "checkbox__input checkbox__input--parent", onClick: function () { return updateAirportFilter(option.value); } }),
|
|
9842
|
+
React.createElement("span", { className: "radiobutton__label-text" },
|
|
9843
|
+
option.label,
|
|
9844
|
+
" ",
|
|
9845
|
+
option.count > 0 && (React.createElement("span", { className: "amount" },
|
|
9846
|
+
"(",
|
|
9847
|
+
option.count,
|
|
9848
|
+
")"))))))); }))),
|
|
9849
|
+
React.createElement("div", { className: "flight__filter__group" },
|
|
9850
|
+
React.createElement("div", { className: "flight__filter__group__title" }, translations.FLIGHTS_FORM.NUMBER_OF_STOPS),
|
|
9851
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" }, filterOptions.numberOfStops.map(function (option, k) { return (React.createElement("div", { className: "tree", key: k },
|
|
9852
|
+
React.createElement("div", { className: "checkbox flight__filter__checkbox" },
|
|
9853
|
+
React.createElement("label", { htmlFor: 'stops_' + option.value, className: "checkbox__label" },
|
|
9854
|
+
React.createElement("input", { type: "checkbox", id: 'stops_' + option.value, className: "checkbox__input checkbox__input--parent", onClick: function () { return updateStopsFilter(option.value); } }),
|
|
9855
|
+
React.createElement("span", { className: "radiobutton__label-text" },
|
|
9856
|
+
option.label,
|
|
9857
|
+
" ",
|
|
9858
|
+
option.count > 0 && (React.createElement("span", { className: "amount" },
|
|
9859
|
+
"(",
|
|
9860
|
+
option.count,
|
|
9861
|
+
")"))))))); }))),
|
|
9862
|
+
React.createElement("div", { className: "flight__filter__group" },
|
|
9863
|
+
React.createElement("div", { className: "flight__filter__group__title" }, translations.FLIGHTS_FORM.FLIGHT_OUTWARD),
|
|
9864
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" },
|
|
9865
|
+
React.createElement("p", null, translations.FLIGHTS_FORM.DEPARTURE_TIME),
|
|
9866
|
+
filterOptions.outward.departurePeriod.map(function (option, k) { return (React.createElement("div", { className: "tree", key: k },
|
|
9867
|
+
React.createElement("div", { className: "checkbox flight__filter__checkbox" },
|
|
9868
|
+
React.createElement("label", { htmlFor: 'outward_time_' + option.value, className: "checkbox__label" },
|
|
9869
|
+
React.createElement("input", { type: "checkbox", id: 'outward_time_' + option.value, className: "checkbox__input checkbox__input--parent", onClick: function () { return updateOutwardDeparture(option.value); } }),
|
|
9460
9870
|
React.createElement("span", { className: "radiobutton__label-text" },
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9871
|
+
option.label,
|
|
9872
|
+
" ",
|
|
9873
|
+
option.count > 0 && (React.createElement("span", { className: "amount" },
|
|
9874
|
+
"(",
|
|
9875
|
+
option.count,
|
|
9876
|
+
")"))))))); })),
|
|
9877
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" },
|
|
9878
|
+
React.createElement("p", null, translations.FLIGHTS_FORM.TRAVEL_DURATION),
|
|
9879
|
+
React.createElement(MultiRangeFilter, { min: filterOptions.outward.travelDuration.min, max: filterOptions.outward.travelDuration.max, selectedMin: filterOptions.outward.travelDuration.selectedMin, selectedMax: filterOptions.outward.travelDuration.selectedMax, valueFormatter: formatMinutes, onChange: updateOutwardTravelDuration })),
|
|
9880
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" },
|
|
9881
|
+
React.createElement("p", null, translations.FLIGHTS_FORM.CHANGE_TIME),
|
|
9882
|
+
React.createElement(MultiRangeFilter, { min: filterOptions.outward.changeDuration.min, max: filterOptions.outward.changeDuration.max, selectedMin: filterOptions.outward.changeDuration.selectedMin, selectedMax: filterOptions.outward.changeDuration.selectedMax, valueFormatter: formatMinutes, onChange: updateOutwardChangeDuration }))),
|
|
9883
|
+
React.createElement("div", { className: "flight__filter__group" },
|
|
9884
|
+
React.createElement("div", { className: "flight__filter__group__title" }, translations.FLIGHTS_FORM.FLIGHT_RETURN),
|
|
9885
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" },
|
|
9886
|
+
React.createElement("p", null, translations.FLIGHTS_FORM.DEPARTURE_TIME),
|
|
9887
|
+
filterOptions.return.departurePeriod.map(function (option, k) { return (React.createElement("div", { className: "tree", key: k },
|
|
9888
|
+
React.createElement("div", { className: "checkbox flight__filter__checkbox" },
|
|
9889
|
+
React.createElement("label", { htmlFor: 'return_time_' + option.value, className: "checkbox__label" },
|
|
9890
|
+
React.createElement("input", { type: "checkbox", id: 'return_time_' + option.value, className: "checkbox__input checkbox__input--parent", onClick: function () { return updateReturnDeparture(option.value); } }),
|
|
9891
|
+
React.createElement("span", { className: "radiobutton__label-text" },
|
|
9892
|
+
option.label,
|
|
9893
|
+
" ",
|
|
9894
|
+
option.count > 0 && (React.createElement("span", { className: "amount" },
|
|
9895
|
+
"(",
|
|
9896
|
+
option.count,
|
|
9897
|
+
")"))))))); })),
|
|
9898
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" },
|
|
9899
|
+
React.createElement("p", null, translations.FLIGHTS_FORM.TRAVEL_DURATION),
|
|
9900
|
+
React.createElement(MultiRangeFilter, { min: filterOptions.return.travelDuration.min, max: filterOptions.return.travelDuration.max, selectedMin: filterOptions.return.travelDuration.selectedMin, selectedMax: filterOptions.return.travelDuration.selectedMax, valueFormatter: formatMinutes, onChange: updateReturnTravelDuration })),
|
|
9901
|
+
React.createElement("div", { className: "flight__filter__group__wrapper" },
|
|
9902
|
+
React.createElement("p", null, translations.FLIGHTS_FORM.CHANGE_TIME),
|
|
9903
|
+
React.createElement(MultiRangeFilter, { min: filterOptions.return.changeDuration.min, max: filterOptions.return.changeDuration.max, selectedMin: filterOptions.return.changeDuration.selectedMin, selectedMax: filterOptions.return.changeDuration.selectedMax, valueFormatter: formatMinutes, onChange: updateReturnChangeDuration })))))));
|
|
9482
9904
|
};
|
|
9483
9905
|
|
|
9484
9906
|
var getTravelersText = function (rooms) {
|
|
@@ -9564,7 +9986,7 @@ var parseFlightLines = function (metaDatas) {
|
|
|
9564
9986
|
var parseFlightLineDateTime = function (date, time) {
|
|
9565
9987
|
try {
|
|
9566
9988
|
// Parse date
|
|
9567
|
-
var parsedDate =
|
|
9989
|
+
var parsedDate = parseISO(date);
|
|
9568
9990
|
// Parse time
|
|
9569
9991
|
var parsedTimeHours = parseInt(time.substring(0, 2));
|
|
9570
9992
|
var parsedTimeMinutes = parseInt(time.substring(3, 5));
|
|
@@ -9579,6 +10001,521 @@ var parseFlightLineDateTime = function (date, time) {
|
|
|
9579
10001
|
}
|
|
9580
10002
|
};
|
|
9581
10003
|
|
|
10004
|
+
var FlightOptionFlight = function (_a) {
|
|
10005
|
+
var details = _a.details, isOptionsVisible = _a.isOptionsVisible;
|
|
10006
|
+
var translations = useSelector(selectTranslations);
|
|
10007
|
+
var _b = useState(false), isDetailVisible = _b[0], setIsDetailVisible = _b[1];
|
|
10008
|
+
return (React.createElement("div", { className: "flight__flight" },
|
|
10009
|
+
React.createElement("div", { className: "flight__flight__container" },
|
|
10010
|
+
React.createElement("div", { className: "flight__flight__wrapper" },
|
|
10011
|
+
React.createElement("div", { className: "flight__logo__wrapper" },
|
|
10012
|
+
React.createElement("img", { src: "https://media.tidesoftware.be/media/shared/Airlines/".concat(details.airlineCode, ".png?height=30"), alt: "", className: "flight__logo" }),
|
|
10013
|
+
React.createElement("span", null, details.airline)),
|
|
10014
|
+
React.createElement("div", { className: "flight__info" },
|
|
10015
|
+
React.createElement("div", { className: "flight__info__times" },
|
|
10016
|
+
React.createElement("strong", null,
|
|
10017
|
+
details.departureTime,
|
|
10018
|
+
" ",
|
|
10019
|
+
details.departureAirport),
|
|
10020
|
+
React.createElement("p", null, getDateText(details.departureDate))),
|
|
10021
|
+
React.createElement("div", { className: "flight__info__duration" },
|
|
10022
|
+
React.createElement("p", null, details.travelDuration),
|
|
10023
|
+
React.createElement("div", { className: "flight__info__duration__stops" },
|
|
10024
|
+
React.createElement("div", { className: "flight__info__duration__stop" })),
|
|
10025
|
+
details.numberOfStops > 0 && (React.createElement("span", null,
|
|
10026
|
+
details.numberOfStops,
|
|
10027
|
+
" ",
|
|
10028
|
+
translations.FLIGHTS_FORM.FLIGHT_STOPS))),
|
|
10029
|
+
React.createElement("div", { className: "flight__info__times flight__info__times--arrival" },
|
|
10030
|
+
React.createElement("strong", null,
|
|
10031
|
+
details.arrivalTime,
|
|
10032
|
+
" ",
|
|
10033
|
+
details.arrivalAirport),
|
|
10034
|
+
React.createElement("p", null, getDateText(details.arrivalDate)),
|
|
10035
|
+
details.isNextDay && (React.createElement("span", { className: "flight__info__times__days" }, translations.FLIGHTS_FORM.PLUS_ONE_DAY))))),
|
|
10036
|
+
React.createElement("div", { className: "flight__detail__btn__wrapper" },
|
|
10037
|
+
React.createElement("div", { className: buildClassName(["flight__detail__btn", isDetailVisible && "flight__detail__btn--active"]), onClick: function () { return setIsDetailVisible(!isDetailVisible); } },
|
|
10038
|
+
React.createElement("svg", { width: 16, height: 16, className: "flight__detail__btn__arrow" },
|
|
10039
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#chevron" }))))),
|
|
10040
|
+
React.createElement("div", { className: buildClassName(["flight__detail", isDetailVisible && "flight__detail--active"]) }, details.flightLines.map(function (flightLine, flightLineIndex) { return (React.createElement(React.Fragment, { key: flightLineIndex },
|
|
10041
|
+
React.createElement("div", { className: "flight__info" },
|
|
10042
|
+
React.createElement("div", { className: "flight__info__times__wrapper" },
|
|
10043
|
+
React.createElement("div", { className: "flight__info__times" },
|
|
10044
|
+
React.createElement("strong", null,
|
|
10045
|
+
flightLine.departureTime,
|
|
10046
|
+
" ",
|
|
10047
|
+
flightLine.departureAirport),
|
|
10048
|
+
React.createElement("p", null, getDateText(flightLine.departureDate))),
|
|
10049
|
+
React.createElement("div", null,
|
|
10050
|
+
React.createElement("svg", { width: 30, height: 20 },
|
|
10051
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#plane-depart" })))),
|
|
10052
|
+
React.createElement("div", { className: "flight__info__duration" },
|
|
10053
|
+
React.createElement("p", null, flightLine.travelDuration),
|
|
10054
|
+
React.createElement("div", { className: "flight__info__duration__stops" }),
|
|
10055
|
+
React.createElement("span", null, flightLine.airline),
|
|
10056
|
+
React.createElement("strong", null, flightLine.number)),
|
|
10057
|
+
React.createElement("div", { className: "flight__info__times__wrapper flight__info__times__wrapper--arrival" },
|
|
10058
|
+
React.createElement("div", null,
|
|
10059
|
+
React.createElement("svg", { width: 35, height: 25 },
|
|
10060
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#plane-arive" }))),
|
|
10061
|
+
React.createElement("div", { className: "flight__info__times flight__info__times--arrival" },
|
|
10062
|
+
React.createElement("strong", null,
|
|
10063
|
+
flightLine.arrivalTime,
|
|
10064
|
+
" ",
|
|
10065
|
+
flightLine.arrivalAirport),
|
|
10066
|
+
React.createElement("p", null, getDateText(flightLine.arrivalDate))))),
|
|
10067
|
+
flightLine.waitDuration && (React.createElement("div", { className: "flight__info" },
|
|
10068
|
+
React.createElement("div", { className: "flight__info__times" }),
|
|
10069
|
+
React.createElement("div", { className: "flight__info__duration flight__info__duration--waittime" },
|
|
10070
|
+
React.createElement("div", { className: "flight__info__duration__stops flight__info__duration__stops--stoptime" },
|
|
10071
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10072
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#clock" }))),
|
|
10073
|
+
React.createElement("div", { className: "flight__info__duration__stoptime" },
|
|
10074
|
+
React.createElement("span", null, translations.FLIGHTS_FORM.STOP_TIME),
|
|
10075
|
+
React.createElement("strong", null, flightLine.waitDuration))),
|
|
10076
|
+
React.createElement("div", { className: "flight__info__times flight__info__times--arrival" }))))); })),
|
|
10077
|
+
React.createElement("div", { className: buildClassName(["flight__rate", isOptionsVisible && "flight__rate--active"]) })));
|
|
10078
|
+
};
|
|
10079
|
+
|
|
10080
|
+
var FlightOption = function (_a) {
|
|
10081
|
+
var item = _a.item, isSelected = _a.isSelected, currentPrice = _a.currentPrice, onChange = _a.onChange;
|
|
10082
|
+
var translations = useSelector(selectTranslations);
|
|
10083
|
+
var ownTotalPrice = item.selectedOutward.price + item.selectedReturn.price;
|
|
10084
|
+
var priceDifference = item.isSelected
|
|
10085
|
+
? 0
|
|
10086
|
+
: ownTotalPrice - currentPrice;
|
|
10087
|
+
var outwardVisible = useState(false)[0];
|
|
10088
|
+
var returnVisible = useState(false)[0];
|
|
10089
|
+
var handleButtonClick = function () {
|
|
10090
|
+
if (!item.isSelected)
|
|
10091
|
+
onChange(item);
|
|
10092
|
+
};
|
|
10093
|
+
return (React.createElement("div", { className: "flight__option" },
|
|
10094
|
+
React.createElement("div", { className: "flight__content" },
|
|
10095
|
+
React.createElement("div", { className: "flight__flights" },
|
|
10096
|
+
React.createElement("div", { className: "flight__flight" },
|
|
10097
|
+
React.createElement("div", { className: "flight__flight__header" },
|
|
10098
|
+
React.createElement("div", { className: "flight__status__container" }),
|
|
10099
|
+
React.createElement("div", { className: "flight__price" },
|
|
10100
|
+
!isSelected && (React.createElement("span", { className: buildClassName(["price",
|
|
10101
|
+
priceDifference > 0 && "price--increase",
|
|
10102
|
+
priceDifference < 0 && "price--decrease"
|
|
10103
|
+
]) }, getPriceDifferenceText(priceDifference))),
|
|
10104
|
+
React.createElement("button", { type: "button", className: "cta ".concat(isSelected ? 'cta--selected' : 'cta--secondary'), onClick: handleButtonClick }, isSelected ? translations.SHARED.SELECTED : translations.SHARED.SELECT)))),
|
|
10105
|
+
React.createElement(FlightOptionFlight, { details: item.outward, isOptionsVisible: outwardVisible }),
|
|
10106
|
+
React.createElement(FlightOptionFlight, { details: item.return, isOptionsVisible: returnVisible })))));
|
|
10107
|
+
};
|
|
10108
|
+
|
|
10109
|
+
var FlightOptionModal = function (_a) {
|
|
10110
|
+
return (React.createElement("div", { className: "flight__rate__modal__container" },
|
|
10111
|
+
" ",
|
|
10112
|
+
React.createElement("div", { className: "flight__rate__modal" },
|
|
10113
|
+
React.createElement("div", { className: "flight__rate__modal__header" },
|
|
10114
|
+
React.createElement("h3", { className: "flight__rate__modal__header__title" }, "Selecteer een tarief"),
|
|
10115
|
+
React.createElement("button", { className: "flight__rate__modal__header__close" },
|
|
10116
|
+
React.createElement("svg", { width: 18, height: 18 },
|
|
10117
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#close" })))),
|
|
10118
|
+
React.createElement("div", { className: "flight__rate__modal__tabs" },
|
|
10119
|
+
React.createElement("button", { className: "flight__rate__modal__tab flight__rate__modal__tab--active" }, "Economy / Economy premium"),
|
|
10120
|
+
React.createElement("button", { className: "flight__rate__modal__tab" }, "Business / Business premium")),
|
|
10121
|
+
React.createElement("div", { className: "flight__rate__modal__content" },
|
|
10122
|
+
React.createElement("div", { className: "flight__rate__modal__card" },
|
|
10123
|
+
React.createElement("div", { className: "flight__rate__modal__card__wrapper" },
|
|
10124
|
+
React.createElement("div", { className: "flight__rate__modal__card__header" },
|
|
10125
|
+
React.createElement("h3", { className: "flight__rate__modal__card__header__title" }, "Economy Basic"),
|
|
10126
|
+
React.createElement("p", { className: "flight__rate__modal__card__header__class" }, "Klasse: Economy")),
|
|
10127
|
+
React.createElement("div", { className: "flight__rate__modal__card__items flight__rate__modal__card__items--top" },
|
|
10128
|
+
React.createElement("div", { className: "flight__rate__modal__card__item flight__rate__modal__card__item--disabled" },
|
|
10129
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10130
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#ticket" })),
|
|
10131
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10132
|
+
React.createElement("strong", null, "Wijzigingen in het ticket"),
|
|
10133
|
+
React.createElement("p", null, "Wijzigingen toestaan"))),
|
|
10134
|
+
React.createElement("div", { className: "flight__rate__modal__card__item flight__rate__modal__card__item--disabled" },
|
|
10135
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10136
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#payback" })),
|
|
10137
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10138
|
+
React.createElement("strong", null, "Terugbetaling van ticket"),
|
|
10139
|
+
React.createElement("p", null, "Ticket retourneerbaar")))),
|
|
10140
|
+
React.createElement("div", { className: "flight__rate__modal__card__items" },
|
|
10141
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10142
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10143
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#shopping-bag" })),
|
|
10144
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10145
|
+
React.createElement("strong", null, "persoonlijke items"),
|
|
10146
|
+
React.createElement("p", null, "Gratis"))),
|
|
10147
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10148
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10149
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#backpack" })),
|
|
10150
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10151
|
+
React.createElement("strong", null, "Handbagage"),
|
|
10152
|
+
React.createElement("p", null, "Gratis: 2 x 8kg"))),
|
|
10153
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10154
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10155
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#suitcase" })),
|
|
10156
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10157
|
+
React.createElement("strong", null, "Ingecheckte bagage"),
|
|
10158
|
+
React.createElement("p", null, "Gratis: 2 x 32kg"))))),
|
|
10159
|
+
React.createElement("div", { className: "flight__rate__modal__card__footer" },
|
|
10160
|
+
React.createElement("button", { className: "cta cta--secondary" }, "Selecteer"),
|
|
10161
|
+
React.createElement("span", { className: "price price--increase" }, "+ \u20AC2460,00"))),
|
|
10162
|
+
React.createElement("div", { className: "flight__rate__modal__card flight__rate__modal__card--premium" },
|
|
10163
|
+
React.createElement("div", { className: "flight__rate__modal__card__wrapper" },
|
|
10164
|
+
React.createElement("div", { className: "flight__rate__modal__card__header" },
|
|
10165
|
+
React.createElement("h3", { className: "flight__rate__modal__card__header__title" }, "Premium Economy Basic Plus"),
|
|
10166
|
+
React.createElement("p", { className: "flight__rate__modal__card__header__class" }, "Klasse: Economy")),
|
|
10167
|
+
React.createElement("div", { className: "flight__rate__modal__card__items flight__rate__modal__card__items--top" },
|
|
10168
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10169
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10170
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#ticket" })),
|
|
10171
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10172
|
+
React.createElement("strong", null, "Wijzigingen in het ticket"),
|
|
10173
|
+
React.createElement("p", null, "Wijzigingen toestaan"))),
|
|
10174
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10175
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10176
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#payback" })),
|
|
10177
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10178
|
+
React.createElement("strong", null, "Terugbetaling van ticket"),
|
|
10179
|
+
React.createElement("p", null, "Ticket retourneerbaar")))),
|
|
10180
|
+
React.createElement("div", { className: "flight__rate__modal__card__items" },
|
|
10181
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10182
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10183
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#shopping-bag" })),
|
|
10184
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10185
|
+
React.createElement("strong", null, "persoonlijke items"),
|
|
10186
|
+
React.createElement("p", null, "Gratis"))),
|
|
10187
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10188
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10189
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#backpack" })),
|
|
10190
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10191
|
+
React.createElement("strong", null, "Handbagage"),
|
|
10192
|
+
React.createElement("p", null, "Gratis: 2 x 8kg"))),
|
|
10193
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10194
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10195
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#suitcase" })),
|
|
10196
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10197
|
+
React.createElement("strong", null, "Ingecheckte bagage"),
|
|
10198
|
+
React.createElement("p", null, "Gratis: 2 x 32kg"))))),
|
|
10199
|
+
React.createElement("div", { className: "flight__rate__modal__card__footer" },
|
|
10200
|
+
React.createElement("button", { className: "cta cta--secondary" }, "Selecteer"),
|
|
10201
|
+
React.createElement("span", { className: "price price--increase" }, "+ \u20AC2460,00"))),
|
|
10202
|
+
React.createElement("div", { className: "flight__rate__modal__card flight__rate__modal__card--business" },
|
|
10203
|
+
React.createElement("div", { className: "flight__rate__modal__card__wrapper" },
|
|
10204
|
+
React.createElement("div", { className: "flight__rate__modal__card__header" },
|
|
10205
|
+
React.createElement("h3", { className: "flight__rate__modal__card__header__title" }, "Business Basic Plus"),
|
|
10206
|
+
React.createElement("p", { className: "flight__rate__modal__card__header__class" }, "Klasse: Economy")),
|
|
10207
|
+
React.createElement("div", { className: "flight__rate__modal__card__items flight__rate__modal__card__items--top" },
|
|
10208
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10209
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10210
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#ticket" })),
|
|
10211
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10212
|
+
React.createElement("strong", null, "Wijzigingen in het ticket"),
|
|
10213
|
+
React.createElement("p", null, "Wijzigingen toestaan"))),
|
|
10214
|
+
React.createElement("div", { className: "flight__rate__modal__card__item flight__rate__modal__card__item--disabled" },
|
|
10215
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10216
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#payback" })),
|
|
10217
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10218
|
+
React.createElement("strong", null, "Terugbetaling van ticket"),
|
|
10219
|
+
React.createElement("p", null, "Ticket retourneerbaar")))),
|
|
10220
|
+
React.createElement("div", { className: "flight__rate__modal__card__items" },
|
|
10221
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10222
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10223
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#shopping-bag" })),
|
|
10224
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10225
|
+
React.createElement("strong", null, "persoonlijke items"),
|
|
10226
|
+
React.createElement("p", null, "Gratis"))),
|
|
10227
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10228
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10229
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#backpack" })),
|
|
10230
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10231
|
+
React.createElement("strong", null, "Handbagage"),
|
|
10232
|
+
React.createElement("p", null, "Gratis: 2 x 8kg"))),
|
|
10233
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10234
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10235
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#suitcase" })),
|
|
10236
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10237
|
+
React.createElement("strong", null, "Ingecheckte bagage"),
|
|
10238
|
+
React.createElement("p", null, "Gratis: 2 x 32kg"))),
|
|
10239
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10240
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10241
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#seat-selection" })),
|
|
10242
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10243
|
+
React.createElement("strong", null, "Stoelselectie"),
|
|
10244
|
+
React.createElement("p", null, "kies uw stoel in het vliegtijg"))),
|
|
10245
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10246
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10247
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#check-in" })),
|
|
10248
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10249
|
+
React.createElement("strong", null, "Sneller inchecken"),
|
|
10250
|
+
React.createElement("p", null, "Sla de wachtrijen voor de veiligheidscontrole over"))),
|
|
10251
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10252
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10253
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#business-lounge" })),
|
|
10254
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10255
|
+
React.createElement("strong", null, "Zakenlunge"),
|
|
10256
|
+
React.createElement("p", null, "Ontspan voor uw vlucht"))),
|
|
10257
|
+
React.createElement("div", { className: "flight__rate__modal__card__item" },
|
|
10258
|
+
React.createElement("svg", { width: 20, height: 20 },
|
|
10259
|
+
React.createElement("use", { href: "/icons/svg-sprite.svg#priority" })),
|
|
10260
|
+
React.createElement("div", { className: "flight__rate__modal__card__item__wrapper" },
|
|
10261
|
+
React.createElement("strong", null, "Prioriteit"),
|
|
10262
|
+
React.createElement("p", null, "Stap voor anderen aan boord"))))),
|
|
10263
|
+
React.createElement("div", { className: "flight__rate__modal__card__footer" },
|
|
10264
|
+
React.createElement("button", { className: "cta cta--secondary" }, "Selecteer"),
|
|
10265
|
+
React.createElement("span", { className: "price price--increase" }, "+ \u20AC2460,00")))),
|
|
10266
|
+
React.createElement("div", { className: "flight__rate__modal__footer" },
|
|
10267
|
+
React.createElement("button", { className: "cta cta--secondary" }, "Toepassen")))));
|
|
10268
|
+
};
|
|
10269
|
+
|
|
10270
|
+
var FlightOptionsForm = function () {
|
|
10271
|
+
var _a, _b, _c, _d;
|
|
10272
|
+
var settings = useContext(SettingsContext);
|
|
10273
|
+
var translations = useSelector(selectTranslations);
|
|
10274
|
+
var dispatch = useAppDispatch();
|
|
10275
|
+
var packageDetails = useSelector(selectPackageDetails);
|
|
10276
|
+
var bookingQueryString = useSelector(selectBookingQueryString);
|
|
10277
|
+
var isLoading = useSelector(selectIsFetchingProductOptions);
|
|
10278
|
+
var flights = useSelector(selectPackageFlights);
|
|
10279
|
+
var _e = useState(), filterOptions = _e[0], setFilterOptions = _e[1];
|
|
10280
|
+
var _f = useState([]), flightGroups = _f[0], setFlightGroups = _f[1];
|
|
10281
|
+
var handleSubmit = function (e) {
|
|
10282
|
+
if (settings.skipRouter) {
|
|
10283
|
+
dispatch(setCurrentStep(ROOM_OPTIONS_FORM_STEP));
|
|
10284
|
+
}
|
|
10285
|
+
else {
|
|
10286
|
+
if (settings.roomOptions.isHidden) {
|
|
10287
|
+
navigate("".concat(settings.basePath).concat(settings.options.pathSuffix, "?").concat(bookingQueryString));
|
|
10288
|
+
}
|
|
10289
|
+
else {
|
|
10290
|
+
navigate("".concat(settings.basePath).concat(settings.roomOptions.pathSuffix, "?").concat(bookingQueryString));
|
|
10291
|
+
}
|
|
10292
|
+
}
|
|
10293
|
+
e.preventDefault();
|
|
10294
|
+
};
|
|
10295
|
+
var currentFlightPrice = (((_b = (_a = flights.outward) === null || _a === void 0 ? void 0 : _a.find(function (x) { return x.isSelected; })) === null || _b === void 0 ? void 0 : _b.price) || 0)
|
|
10296
|
+
+ (((_d = (_c = flights.return) === null || _c === void 0 ? void 0 : _c.find(function (x) { return x.isSelected; })) === null || _d === void 0 ? void 0 : _d.price) || 0);
|
|
10297
|
+
useEffect(function () {
|
|
10298
|
+
var _a, _b;
|
|
10299
|
+
if (packageDetails && settings.roomOptions.isHidden) {
|
|
10300
|
+
var params = new URLSearchParams(location.search);
|
|
10301
|
+
var outwardFlight_1 = (_a = params.get("outwardflight")) !== null && _a !== void 0 ? _a : undefined;
|
|
10302
|
+
var returnFlight_1 = (_b = params.get("returnflight")) !== null && _b !== void 0 ? _b : undefined;
|
|
10303
|
+
if (outwardFlight_1 && returnFlight_1) {
|
|
10304
|
+
var desiredOutwardFlight_1 = packageDetails.outwardFlights.find(function (x) { return x.entryLineGuid == outwardFlight_1; });
|
|
10305
|
+
var desiredReturnFlight_1 = packageDetails.returnFlights.find(function (x) { return x.entryLineGuid == returnFlight_1; });
|
|
10306
|
+
if (desiredOutwardFlight_1 && desiredReturnFlight_1) {
|
|
10307
|
+
dispatch(setPackage(__assign(__assign({}, packageDetails), { outwardFlights: packageDetails.outwardFlights.map(function (flight) {
|
|
10308
|
+
return __assign(__assign({}, flight), { isSelected: flight.entryLineGuid == desiredOutwardFlight_1.entryLineGuid
|
|
10309
|
+
? true
|
|
10310
|
+
: false });
|
|
10311
|
+
}), returnFlights: packageDetails.returnFlights.map(function (flight) {
|
|
10312
|
+
return __assign(__assign({}, flight), { isSelected: flight.entryLineGuid == desiredReturnFlight_1.entryLineGuid
|
|
10313
|
+
? true
|
|
10314
|
+
: false });
|
|
10315
|
+
}) })));
|
|
10316
|
+
}
|
|
10317
|
+
}
|
|
10318
|
+
}
|
|
10319
|
+
dispatch(fetchPriceDetails());
|
|
10320
|
+
var filters = buildFilterOptions(flights.outward, flights.return, translations);
|
|
10321
|
+
setFilterOptions(filters);
|
|
10322
|
+
}, []);
|
|
10323
|
+
useEffect(function () {
|
|
10324
|
+
var groups = buildGroupedFlights(flights.outward, flights.return);
|
|
10325
|
+
setFlightGroups(groups);
|
|
10326
|
+
}, [flights]);
|
|
10327
|
+
var filteredGroups = filterGroupedFlights(flightGroups, filterOptions);
|
|
10328
|
+
var resultCount = filteredGroups.length;
|
|
10329
|
+
return (React.createElement(React.Fragment, null,
|
|
10330
|
+
React.createElement(FlightOptionModal, null),
|
|
10331
|
+
React.createElement("form", { className: "form", name: "booking--flights", id: "booking--flights", noValidate: true, onSubmit: handleSubmit },
|
|
10332
|
+
isLoading && settings.loaderComponent,
|
|
10333
|
+
!isLoading && (React.createElement("div", { className: "form__group" },
|
|
10334
|
+
React.createElement("div", { className: "booking-card" },
|
|
10335
|
+
React.createElement("div", { className: "booking-card__body" },
|
|
10336
|
+
filterOptions && (React.createElement(FlightFilter, { filterOptions: filterOptions, resultCount: resultCount, applyFilter: setFilterOptions })),
|
|
10337
|
+
React.createElement("div", { className: "booking-card__group" },
|
|
10338
|
+
React.createElement("div", { className: "flight outward__flights" },
|
|
10339
|
+
isEmpty(filteredGroups) && (React.createElement("p", null, translations.FLIGHTS_FORM.NO_FLIGHTS_FOUND)),
|
|
10340
|
+
!isEmpty(filteredGroups) && filteredGroups.map(function (flight, index) { return (React.createElement(FlightOption, { key: index, item: flight, isSelected: flight.isSelected, currentPrice: currentFlightPrice, onChange: function (item) {
|
|
10341
|
+
dispatch(setFlights(item));
|
|
10342
|
+
dispatch(fetchPriceDetails());
|
|
10343
|
+
} })); }))))))),
|
|
10344
|
+
React.createElement("div", { className: "booking__navigator" },
|
|
10345
|
+
React.createElement("button", { type: "submit", title: translations.STEPS.NEXT, disabled: isLoading, className: buildClassName(["cta", isLoading && "cta--disabled"]) }, translations.STEPS.NEXT)))));
|
|
10346
|
+
};
|
|
10347
|
+
|
|
10348
|
+
var buildSelectableRooms = function (packageRooms, accommodations, regimes, accommodationViews) {
|
|
10349
|
+
return packageRooms.map(function (x) {
|
|
10350
|
+
var _a, _b;
|
|
10351
|
+
var selectedOption = x.options.find(function (x) { return x.isSelected; });
|
|
10352
|
+
var alternativeOptions = x.options
|
|
10353
|
+
.filter(function (x) { return x.accommodationCode !== selectedOption.accommodationCode && !x.isLocked; })
|
|
10354
|
+
.sort(function (a, b) { return a.price - b.price; });
|
|
10355
|
+
var alternativeAccommodations = [];
|
|
10356
|
+
alternativeOptions.forEach(function (x) {
|
|
10357
|
+
var _a, _b, _c, _d;
|
|
10358
|
+
var alternativeAccommodation = alternativeAccommodations.find(function (y) { return y.code === x.accommodationCode; });
|
|
10359
|
+
if (alternativeAccommodation) {
|
|
10360
|
+
var regime = regimes === null || regimes === void 0 ? void 0 : regimes.find(function (y) { return y.code === x.regimeCode; });
|
|
10361
|
+
alternativeAccommodation.regimes.push({
|
|
10362
|
+
code: x.regimeCode,
|
|
10363
|
+
title: (_a = regime === null || regime === void 0 ? void 0 : regime.title) !== null && _a !== void 0 ? _a : x.regimeName,
|
|
10364
|
+
price: x.price
|
|
10365
|
+
});
|
|
10366
|
+
}
|
|
10367
|
+
else {
|
|
10368
|
+
var accommodation_1 = accommodations === null || accommodations === void 0 ? void 0 : accommodations.find(function (y) { return y.code === x.accommodationCode; });
|
|
10369
|
+
var regime = regimes === null || regimes === void 0 ? void 0 : regimes.find(function (y) { return y.code === x.regimeCode; });
|
|
10370
|
+
alternativeAccommodations.push({
|
|
10371
|
+
code: x.accommodationCode,
|
|
10372
|
+
regimeCode: x.regimeCode,
|
|
10373
|
+
from: x.from,
|
|
10374
|
+
to: x.to,
|
|
10375
|
+
price: x.price,
|
|
10376
|
+
regimes: [{
|
|
10377
|
+
code: x.regimeCode,
|
|
10378
|
+
title: (_b = regime === null || regime === void 0 ? void 0 : regime.title) !== null && _b !== void 0 ? _b : x.regimeName,
|
|
10379
|
+
price: x.price
|
|
10380
|
+
}],
|
|
10381
|
+
title: (_c = accommodation_1 === null || accommodation_1 === void 0 ? void 0 : accommodation_1.title) !== null && _c !== void 0 ? _c : x.accommodationName,
|
|
10382
|
+
image: accommodation_1 === null || accommodation_1 === void 0 ? void 0 : accommodation_1.imageUrl,
|
|
10383
|
+
usps: (_d = accommodation_1 === null || accommodation_1 === void 0 ? void 0 : accommodation_1.usps) !== null && _d !== void 0 ? _d : [],
|
|
10384
|
+
description: accommodation_1 === null || accommodation_1 === void 0 ? void 0 : accommodation_1.description,
|
|
10385
|
+
viewHtml: accommodationViews === null || accommodationViews === void 0 ? void 0 : accommodationViews[x.accommodationCode]
|
|
10386
|
+
});
|
|
10387
|
+
}
|
|
10388
|
+
});
|
|
10389
|
+
var accommodation = accommodations === null || accommodations === void 0 ? void 0 : accommodations.find(function (y) { return y.code === selectedOption.accommodationCode; });
|
|
10390
|
+
return {
|
|
10391
|
+
index: x.index,
|
|
10392
|
+
selected: {
|
|
10393
|
+
code: selectedOption.accommodationCode,
|
|
10394
|
+
regimeCode: selectedOption.regimeCode,
|
|
10395
|
+
price: selectedOption.price,
|
|
10396
|
+
from: selectedOption.from,
|
|
10397
|
+
to: selectedOption.to,
|
|
10398
|
+
regimes: x.options
|
|
10399
|
+
.filter(function (x) { return x.accommodationCode === selectedOption.accommodationCode; })
|
|
10400
|
+
.sort(function (a, b) { return a.price - b.price; })
|
|
10401
|
+
.map(function (o) {
|
|
10402
|
+
var _a;
|
|
10403
|
+
var regime = regimes === null || regimes === void 0 ? void 0 : regimes.find(function (y) { return y.code === o.regimeCode; });
|
|
10404
|
+
return {
|
|
10405
|
+
code: o.regimeCode,
|
|
10406
|
+
title: (_a = regime === null || regime === void 0 ? void 0 : regime.title) !== null && _a !== void 0 ? _a : o.regimeName,
|
|
10407
|
+
price: o.price
|
|
10408
|
+
};
|
|
10409
|
+
}),
|
|
10410
|
+
title: (_a = accommodation === null || accommodation === void 0 ? void 0 : accommodation.title) !== null && _a !== void 0 ? _a : selectedOption.accommodationName,
|
|
10411
|
+
image: accommodation === null || accommodation === void 0 ? void 0 : accommodation.imageUrl,
|
|
10412
|
+
usps: (_b = accommodation === null || accommodation === void 0 ? void 0 : accommodation.usps) !== null && _b !== void 0 ? _b : [],
|
|
10413
|
+
description: accommodation === null || accommodation === void 0 ? void 0 : accommodation.description,
|
|
10414
|
+
viewHtml: accommodationViews === null || accommodationViews === void 0 ? void 0 : accommodationViews[selectedOption.accommodationCode]
|
|
10415
|
+
},
|
|
10416
|
+
showAlternatives: false,
|
|
10417
|
+
alternatives: alternativeAccommodations
|
|
10418
|
+
};
|
|
10419
|
+
});
|
|
10420
|
+
};
|
|
10421
|
+
var updatePackageRooms = function (rooms, index, accommodationCode, regimeCode, availabilities) {
|
|
10422
|
+
var updatedRooms = rooms.map(function (room) {
|
|
10423
|
+
if (room.index !== index)
|
|
10424
|
+
return room;
|
|
10425
|
+
return __assign(__assign({}, room), { options: room.options.map(function (option) {
|
|
10426
|
+
return __assign(__assign({}, option), { isSelected: option.accommodationCode === accommodationCode &&
|
|
10427
|
+
(option.regimeCode === regimeCode || (option.regimeCode === null && regimeCode === '')) });
|
|
10428
|
+
}) });
|
|
10429
|
+
});
|
|
10430
|
+
var selectedAccommodations = new Map();
|
|
10431
|
+
updatedRooms.map(function (x) { return x.options.find(function (x) { return x.isSelected; }); }).forEach(function (x) {
|
|
10432
|
+
if (selectedAccommodations.has(x.accommodationCode)) {
|
|
10433
|
+
selectedAccommodations.set(x.accommodationCode, selectedAccommodations.get(x.accommodationCode) + 1);
|
|
10434
|
+
}
|
|
10435
|
+
else {
|
|
10436
|
+
selectedAccommodations.set(x.accommodationCode, 1);
|
|
10437
|
+
}
|
|
10438
|
+
});
|
|
10439
|
+
var accoCounter = availabilities.map(function (x) { return ({ code: x.code, count: x.count }); });
|
|
10440
|
+
return updatedRooms.map(function (room) {
|
|
10441
|
+
var selectedOption = room.options.find(function (x) { return x.isSelected; });
|
|
10442
|
+
return __assign(__assign({}, room), { options: room.options.map(function (option) {
|
|
10443
|
+
var _a, _b, _c;
|
|
10444
|
+
var isCurrentOption = selectedOption.accommodationCode === option.accommodationCode;
|
|
10445
|
+
var usedCount = (_a = selectedAccommodations.get(option.accommodationCode)) !== null && _a !== void 0 ? _a : 0;
|
|
10446
|
+
var availability = availabilities.find(function (x) { return x.code === option.accommodationCode; });
|
|
10447
|
+
if (availability) {
|
|
10448
|
+
var accoCount = accoCounter.find(function (x) { return x.code === option.accommodationCode; });
|
|
10449
|
+
var roomsLeft = availability.count - usedCount;
|
|
10450
|
+
var isOnRequest = isCurrentOption
|
|
10451
|
+
? accoCount.count < 0 && ((_b = availability === null || availability === void 0 ? void 0 : availability.onRequestPossible) !== null && _b !== void 0 ? _b : false)
|
|
10452
|
+
: roomsLeft < 0 && ((_c = availability === null || availability === void 0 ? void 0 : availability.onRequestPossible) !== null && _c !== void 0 ? _c : false);
|
|
10453
|
+
if (isCurrentOption)
|
|
10454
|
+
accoCount.count--;
|
|
10455
|
+
return __assign(__assign({}, option), { isLocked: !option.isSelected && !isOnRequest && roomsLeft < 0 && !availability.isExternal, isOnRequest: isOnRequest });
|
|
10456
|
+
}
|
|
10457
|
+
else {
|
|
10458
|
+
return option;
|
|
10459
|
+
}
|
|
10460
|
+
}) });
|
|
10461
|
+
});
|
|
10462
|
+
};
|
|
10463
|
+
|
|
10464
|
+
var NoOptions = function () {
|
|
10465
|
+
var translations = useSelector(selectTranslations);
|
|
10466
|
+
return (React.createElement("div", { className: "form__group" },
|
|
10467
|
+
React.createElement(Message, { type: "success", title: translations.OPTIONS_FORM.NO_OPTIONS_TITLE },
|
|
10468
|
+
React.createElement("p", null, translations.OPTIONS_FORM.NO_OPTIONS_MESSAGE))));
|
|
10469
|
+
};
|
|
10470
|
+
|
|
10471
|
+
var NoneOption = function (_a) {
|
|
10472
|
+
var group = _a.group, parentId = _a.parentId, handleNoneSelectionChanged = _a.handleNoneSelectionChanged;
|
|
10473
|
+
var translations = useSelector(selectTranslations);
|
|
10474
|
+
var selectedOption = group.options.find(function (x) { return x.isSelected; });
|
|
10475
|
+
var showNoneOption = group.options.some(function (x) { return x.requirementType === 2; });
|
|
10476
|
+
var noneSelected = !selectedOption;
|
|
10477
|
+
var priceDifferencetext = selectedOption
|
|
10478
|
+
? "- ".concat(formatPrice(Math.abs(selectedOption.line.price)))
|
|
10479
|
+
: "";
|
|
10480
|
+
return (React.createElement(React.Fragment, null, showNoneOption && (React.createElement("tr", null,
|
|
10481
|
+
React.createElement("td", null,
|
|
10482
|
+
React.createElement("div", { className: buildClassName([
|
|
10483
|
+
"tree",
|
|
10484
|
+
noneSelected && "tree--selected",
|
|
10485
|
+
]) },
|
|
10486
|
+
React.createElement("div", { className: "tree__level" },
|
|
10487
|
+
React.createElement("div", { className: "tree__header" },
|
|
10488
|
+
React.createElement("div", { className: "tree__description-collapse" },
|
|
10489
|
+
React.createElement("div", { className: "radiobutton" },
|
|
10490
|
+
React.createElement("div", { className: "radiobutton__label" },
|
|
10491
|
+
React.createElement("input", { type: "radio", value: undefined, id: "".concat(parentId, "_NONE"), name: parentId, className: buildClassName([
|
|
10492
|
+
"radiobutton__input",
|
|
10493
|
+
"radiobutton__input--parent",
|
|
10494
|
+
]), defaultChecked: noneSelected, onChange: handleNoneSelectionChanged }),
|
|
10495
|
+
React.createElement("span", { className: "radiobutton__label-text" },
|
|
10496
|
+
React.createElement("div", { className: "date-list" },
|
|
10497
|
+
React.createElement("span", { className: buildClassName([
|
|
10498
|
+
"date-list__item",
|
|
10499
|
+
"date-list__item--none",
|
|
10500
|
+
]) }))),
|
|
10501
|
+
React.createElement("div", { className: "tree__columns-actions" },
|
|
10502
|
+
React.createElement("div", { className: "tree__columns" },
|
|
10503
|
+
React.createElement("div", { className: "tree__column" },
|
|
10504
|
+
React.createElement("label", { htmlFor: "".concat(parentId, "_NONE"), className: buildClassName([
|
|
10505
|
+
"tree__product-name",
|
|
10506
|
+
"tree__product-name--none",
|
|
10507
|
+
]) }, translations.OPTIONS_FORM.NONE)),
|
|
10508
|
+
React.createElement("div", { className: "tree__column" }),
|
|
10509
|
+
React.createElement("div", { className: "tree__column" }),
|
|
10510
|
+
React.createElement("div", { className: buildClassName([
|
|
10511
|
+
"tree__column",
|
|
10512
|
+
"tree__column--price",
|
|
10513
|
+
]) }, !noneSelected && (React.createElement("span", { className: buildClassName([
|
|
10514
|
+
"price",
|
|
10515
|
+
"price--decrease",
|
|
10516
|
+
]) }, priceDifferencetext))))))))))))))));
|
|
10517
|
+
};
|
|
10518
|
+
|
|
9582
10519
|
var OptionItem = function (_a) {
|
|
9583
10520
|
var _b;
|
|
9584
10521
|
var option = _a.option, parentId = _a.parentId, index = _a.index, selectedPrice = _a.selectedPrice, onOptionChange = _a.onOptionChange;
|
|
@@ -10074,10 +11011,9 @@ var OptionRoom = function (_a) {
|
|
|
10074
11011
|
}
|
|
10075
11012
|
}
|
|
10076
11013
|
var accommodations = uniqBy(compact(packageRoom &&
|
|
10077
|
-
packageRoom.options
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
}
|
|
11014
|
+
packageRoom.options
|
|
11015
|
+
.filter(function (x) { return x.accommodationCode && !x.isLocked; })
|
|
11016
|
+
.map(function (option) {
|
|
10081
11017
|
return {
|
|
10082
11018
|
accommodationCode: option.accommodationCode,
|
|
10083
11019
|
accommodationName: option.accommodationName,
|
|
@@ -10233,6 +11169,7 @@ var OptionsForm = function () {
|
|
|
10233
11169
|
var airportGroups = useSelector(selectPackageAirportGroups);
|
|
10234
11170
|
var optionUnits = useSelector(selectPackageOptionUnits);
|
|
10235
11171
|
var optionPax = useSelector(selectPackageOptionPax);
|
|
11172
|
+
var availabilities = useSelector(selectAvailabilities);
|
|
10236
11173
|
// ROOMS
|
|
10237
11174
|
var showRoomOptions = settings.roomOptions.isHidden;
|
|
10238
11175
|
var packageRooms = useSelector(selectPackageRooms);
|
|
@@ -10248,14 +11185,7 @@ var OptionsForm = function () {
|
|
|
10248
11185
|
var handleOnRoomChange = function (index, accommodationCode, regimeCode) {
|
|
10249
11186
|
if (!packageRooms)
|
|
10250
11187
|
return;
|
|
10251
|
-
var updatedPackageRooms = packageRooms
|
|
10252
|
-
if (room.index !== index)
|
|
10253
|
-
return room;
|
|
10254
|
-
return __assign(__assign({}, room), { options: room.options.map(function (option) {
|
|
10255
|
-
return __assign(__assign({}, option), { isSelected: option.accommodationCode === accommodationCode &&
|
|
10256
|
-
option.regimeCode === regimeCode });
|
|
10257
|
-
}) });
|
|
10258
|
-
});
|
|
11188
|
+
var updatedPackageRooms = updatePackageRooms(packageRooms, index, accommodationCode, regimeCode, availabilities);
|
|
10259
11189
|
dispatch(setPackageRooms(updatedPackageRooms));
|
|
10260
11190
|
dispatch(fetchPriceDetails());
|
|
10261
11191
|
};
|
|
@@ -10344,22 +11274,23 @@ var OptionsForm = function () {
|
|
|
10344
11274
|
dispatch(fetchPriceDetails());
|
|
10345
11275
|
}, []);
|
|
10346
11276
|
var goPrevious = function () {
|
|
10347
|
-
if (settings.
|
|
10348
|
-
dispatch(setCurrentStep(
|
|
11277
|
+
if (settings.roomOptions.isHidden) {
|
|
11278
|
+
dispatch(setCurrentStep(FLIGHT_OPTIONS_FORM_STEP));
|
|
10349
11279
|
}
|
|
10350
11280
|
else {
|
|
10351
|
-
dispatch(setCurrentStep(
|
|
11281
|
+
dispatch(setCurrentStep(ROOM_OPTIONS_FORM_STEP));
|
|
10352
11282
|
}
|
|
10353
11283
|
};
|
|
10354
|
-
var previousUrl = settings.
|
|
10355
|
-
? "".concat(settings.basePath).concat(settings.
|
|
10356
|
-
: "".concat(settings.basePath).concat(settings.
|
|
11284
|
+
var previousUrl = settings.roomOptions.isHidden
|
|
11285
|
+
? "".concat(settings.basePath).concat(settings.flightOptions.pathSuffix, "?").concat(bookingQueryString)
|
|
11286
|
+
: "".concat(settings.basePath).concat(settings.roomOptions.pathSuffix, "?").concat(bookingQueryString);
|
|
10357
11287
|
var hasPrevious = !settings.roomOptions.isHidden || !settings.flightOptions.isHidden;
|
|
11288
|
+
var showPackageTagsOrRoomoptions = showRoomOptions || (packageTags && !isEmpty(packageTags));
|
|
10358
11289
|
return (React.createElement(React.Fragment, null,
|
|
10359
11290
|
React.createElement("form", { className: "form", name: "booking--options", id: "booking--options", noValidate: true, onSubmit: handleSubmit },
|
|
10360
11291
|
isLoading && settings.loaderComponent,
|
|
10361
11292
|
!isLoading && (React.createElement("div", { className: "form__region" },
|
|
10362
|
-
|
|
11293
|
+
showPackageTagsOrRoomoptions && (React.createElement("div", { className: "form__group" },
|
|
10363
11294
|
React.createElement("div", { className: "booking-card" },
|
|
10364
11295
|
React.createElement("div", { className: "booking-card__body" },
|
|
10365
11296
|
React.createElement("div", { className: buildClassName([
|
|
@@ -10371,14 +11302,14 @@ var OptionsForm = function () {
|
|
|
10371
11302
|
showRoomOptions && (React.createElement("table", { className: "table table--striped" },
|
|
10372
11303
|
React.createElement("tbody", null, packageRooms &&
|
|
10373
11304
|
packageRooms.map(function (room) { return (React.createElement(OptionRoom, { key: room.index, packageRoom: room, pax: getRoomPax(room.index), optionPax: optionPax, onRoomChange: handleOnRoomChange })); })))),
|
|
10374
|
-
React.createElement("div", { className: "booking-card__tag-translations" }, packageTags.map(function (tag, index) { return (React.createElement("label", { key: index, htmlFor: "tag-translation-".concat(index, "-").concat(tag.title), className: "checkbox__label tag-translation" },
|
|
11305
|
+
packageTags && !isEmpty(packageTags) && (React.createElement("div", { className: "booking-card__tag-translations" }, packageTags.map(function (tag, index) { return (React.createElement("label", { key: index, htmlFor: "tag-translation-".concat(index, "-").concat(tag.title), className: "checkbox__label tag-translation" },
|
|
10375
11306
|
React.createElement("div", { className: "tag-translation-input__container" },
|
|
10376
11307
|
React.createElement("input", { type: "checkbox", id: "tag-translation-".concat(index, "-").concat(tag.title), name: "tag-translation-".concat(index, "-").concat(tag.title), className: "checkbox__input", checked: tagIds === null || tagIds === void 0 ? void 0 : tagIds.includes(tag.id), onChange: function (e) {
|
|
10377
11308
|
return handleOnTagChange(tag.id, e.target.checked);
|
|
10378
11309
|
} })),
|
|
10379
11310
|
React.createElement("span", { className: "tag-translation__title" }, tag.title),
|
|
10380
11311
|
"\u00A0",
|
|
10381
|
-
React.createElement("span", { className: "tag-translation__description" }, tag.description))); })))))))),
|
|
11312
|
+
React.createElement("span", { className: "tag-translation__description" }, tag.description))); }))))))))),
|
|
10382
11313
|
optionUnits && !isEmpty(optionUnits) && (React.createElement("div", { className: "form__group" },
|
|
10383
11314
|
React.createElement("div", { className: "booking-card" },
|
|
10384
11315
|
React.createElement("div", { className: "booking-card__header" },
|
|
@@ -10406,28 +11337,112 @@ var OptionsForm = function () {
|
|
|
10406
11337
|
React.createElement("button", { type: "submit", title: translations.STEPS.NEXT, disabled: isLoading, className: buildClassName(["cta", isLoading && "cta--disabled"]) }, translations.STEPS.NEXT)))));
|
|
10407
11338
|
};
|
|
10408
11339
|
|
|
11340
|
+
var RoomOption = function (_a) {
|
|
11341
|
+
var room = _a.room, hasAlternatives = _a.hasAlternatives, selectedRoomPrice = _a.selectedRoomPrice, onAcommodationChange = _a.onAcommodationChange, onRegimeChange = _a.onRegimeChange, onToggleAlternatives = _a.onToggleAlternatives;
|
|
11342
|
+
var translations = useSelector(selectTranslations);
|
|
11343
|
+
var _b = useState(0), roomPrice = _b[0], setRoomPrice = _b[1];
|
|
11344
|
+
var _c = useState(room.regimeCode), roomRegimeCode = _c[0], setRoomRegimeCode = _c[1];
|
|
11345
|
+
useEffect(function () {
|
|
11346
|
+
setRoomPrice(room.price);
|
|
11347
|
+
}, [room.code, room.regimeCode]);
|
|
11348
|
+
var getPriceDifference = function (selectedPrice, currentPrice) {
|
|
11349
|
+
var priceDifference = (selectedPrice !== null && selectedPrice !== void 0 ? selectedPrice : 0) - currentPrice;
|
|
11350
|
+
if (priceDifference !== 0) {
|
|
11351
|
+
return "(".concat(getPriceDifferenceText(priceDifference), ")");
|
|
11352
|
+
}
|
|
11353
|
+
else {
|
|
11354
|
+
return "";
|
|
11355
|
+
}
|
|
11356
|
+
};
|
|
11357
|
+
var selectAccommodation = function () {
|
|
11358
|
+
if (onAcommodationChange) {
|
|
11359
|
+
onAcommodationChange(room.code, roomRegimeCode);
|
|
11360
|
+
}
|
|
11361
|
+
};
|
|
11362
|
+
var handleRegimeChange = function (e) {
|
|
11363
|
+
var regimeCode = e.currentTarget.value;
|
|
11364
|
+
var option = room.regimes.find(function (x) { return x.code === regimeCode || (x.code === null && regimeCode === ''); });
|
|
11365
|
+
setRoomRegimeCode(option.code);
|
|
11366
|
+
setRoomPrice(option.price);
|
|
11367
|
+
if (onRegimeChange) {
|
|
11368
|
+
onRegimeChange(regimeCode);
|
|
11369
|
+
}
|
|
11370
|
+
e.preventDefault();
|
|
11371
|
+
};
|
|
11372
|
+
return (React.createElement(React.Fragment, null,
|
|
11373
|
+
React.createElement("div", { className: "form__room" },
|
|
11374
|
+
room.viewHtml && (React.createElement("div", { className: "form__room__wrapper", dangerouslySetInnerHTML: { __html: room.viewHtml } })),
|
|
11375
|
+
!room.viewHtml && (React.createElement("div", { className: "form__room__wrapper" },
|
|
11376
|
+
room.image && (React.createElement("div", { className: "form__room__image" },
|
|
11377
|
+
React.createElement("img", { src: room.image, alt: "", className: "form__room__img" }))),
|
|
11378
|
+
React.createElement("div", { className: "form__room__body" },
|
|
11379
|
+
React.createElement("div", { className: "" },
|
|
11380
|
+
React.createElement("h3", { className: "form__room__title" }, room.title),
|
|
11381
|
+
room.description && (React.createElement("p", { className: "form__room__text" }, room.description)),
|
|
11382
|
+
React.createElement("ul", { className: "list--usps form__room__usps" }, room.usps.map(function (usp, uspIndex) { return (React.createElement("li", { key: uspIndex, className: "list__item" }, usp)); })))))),
|
|
11383
|
+
React.createElement("div", { className: "form__room__footer" },
|
|
11384
|
+
React.createElement("div", { className: "form__room__footer__top" },
|
|
11385
|
+
React.createElement("p", { className: "form__room__dates" },
|
|
11386
|
+
getDateText(room.from),
|
|
11387
|
+
" - ",
|
|
11388
|
+
getDateText(room.to)),
|
|
11389
|
+
React.createElement("span", { className: "form__room__days" }, getDatePeriodText(room.from, room.to))),
|
|
11390
|
+
React.createElement("div", { className: "form__room__footer__bottom" },
|
|
11391
|
+
selectedRoomPrice != undefined && (React.createElement("p", { className: "form__room__price form__room__price--increase" },
|
|
11392
|
+
React.createElement("span", null, getPriceDifference(roomPrice, selectedRoomPrice)))),
|
|
11393
|
+
hasAlternatives && onToggleAlternatives && (React.createElement("button", { type: "button", onClick: onToggleAlternatives, className: "form__room__alternatives__btn" }, translations.ROOM_OPTIONS_FORM.SHOW_ALTERNATIVES)),
|
|
11394
|
+
React.createElement("div", { className: "select-wrapper" },
|
|
11395
|
+
React.createElement("div", { className: "select-wrapper__select" },
|
|
11396
|
+
React.createElement("select", { defaultValue: roomRegimeCode, onChange: handleRegimeChange }, room.regimes.map(function (regime) {
|
|
11397
|
+
var _a;
|
|
11398
|
+
return (React.createElement("option", { key: regime.code, value: (_a = regime.code) !== null && _a !== void 0 ? _a : "" },
|
|
11399
|
+
regime.title,
|
|
11400
|
+
" ",
|
|
11401
|
+
getPriceDifference(regime.price, roomPrice)));
|
|
11402
|
+
})))),
|
|
11403
|
+
React.createElement("button", { type: "button", onClick: selectAccommodation, className: buildClassName(['cta', selectedRoomPrice ? 'cta--secondary' : 'cta--selected']) }, selectedRoomPrice ? translations.SHARED.SELECT : translations.SHARED.SELECTED))))));
|
|
11404
|
+
};
|
|
11405
|
+
|
|
11406
|
+
var TravelerRooms = function (_a) {
|
|
11407
|
+
var index = _a.index, room = _a.room, onRoomChange = _a.onRoomChange;
|
|
11408
|
+
var translations = useSelector(selectTranslations);
|
|
11409
|
+
var _b = useState(false), showAlternatives = _b[0], setShowAlternatives = _b[1];
|
|
11410
|
+
var selectedAccommodationCode = room.selected.code;
|
|
11411
|
+
return (React.createElement("div", { key: room.index },
|
|
11412
|
+
React.createElement("div", { className: "form__room__header" },
|
|
11413
|
+
React.createElement("h5", null,
|
|
11414
|
+
translations.ROOM_OPTIONS_FORM.TRAVELER_GROUP,
|
|
11415
|
+
" ",
|
|
11416
|
+
room.index + 1)),
|
|
11417
|
+
React.createElement(RoomOption, { room: room.selected, hasAlternatives: !isEmpty(room.alternatives), onRegimeChange: function (regimeCode) { return onRoomChange(index, selectedAccommodationCode, regimeCode); }, onToggleAlternatives: function () { return setShowAlternatives(!showAlternatives); } }),
|
|
11418
|
+
!isEmpty(room.alternatives) && showAlternatives && (React.createElement("div", { className: "form__room__alternatives" },
|
|
11419
|
+
React.createElement("div", { className: "form__room__alternatives__header" },
|
|
11420
|
+
translations.ROOM_OPTIONS_FORM.ALTERNATIVES_TRAVELER_GROUP,
|
|
11421
|
+
" ",
|
|
11422
|
+
room.index + 1),
|
|
11423
|
+
showAlternatives && (React.createElement(React.Fragment, null, room.alternatives.map(function (alternative, alternativeIndex) { return (React.createElement(RoomOption, { key: alternativeIndex, room: alternative, selectedRoomPrice: room.selected.price, onAcommodationChange: function (accommodationCode, regimeCode) {
|
|
11424
|
+
setShowAlternatives(false);
|
|
11425
|
+
onRoomChange(index, accommodationCode, regimeCode);
|
|
11426
|
+
} })); })))))));
|
|
11427
|
+
};
|
|
11428
|
+
|
|
10409
11429
|
var RoomOptionsForm = function () {
|
|
10410
|
-
var
|
|
11430
|
+
var settings = useContext(SettingsContext);
|
|
10411
11431
|
var translations = useSelector(selectTranslations);
|
|
10412
11432
|
var dispatch = useAppDispatch();
|
|
10413
11433
|
var packageDetails = useSelector(selectPackageDetails);
|
|
10414
|
-
var requestRooms = useSelector(selectRequestRooms);
|
|
10415
|
-
var pax = useSelector(selectBookingPackagePax);
|
|
10416
11434
|
var packageRooms = useSelector(selectPackageRooms);
|
|
11435
|
+
var availabilities = useSelector(selectAvailabilities);
|
|
10417
11436
|
var bookingQueryString = useSelector(selectBookingQueryString);
|
|
11437
|
+
var accommodationViews = useSelector(selectAccommodationViews);
|
|
10418
11438
|
var isLoading = useSelector(selectIsFetchingProductOptions);
|
|
10419
|
-
var
|
|
10420
|
-
var
|
|
10421
|
-
|
|
10422
|
-
var room = requestRooms === null || requestRooms === void 0 ? void 0 : requestRooms.find(function (x) { return x.index == index; });
|
|
10423
|
-
var bookingPackagePax = pax.filter(function (x) {
|
|
10424
|
-
return room === null || room === void 0 ? void 0 : room.pax.some(function (y) { return y.id == x.id; });
|
|
10425
|
-
});
|
|
10426
|
-
return bookingPackagePax.length > 0 ? bookingPackagePax : (_a = room === null || room === void 0 ? void 0 : room.pax) !== null && _a !== void 0 ? _a : [];
|
|
11439
|
+
var rooms = buildSelectableRooms(packageRooms, settings.accommodations, settings.regimes, accommodationViews);
|
|
11440
|
+
var goPrevious = function () {
|
|
11441
|
+
dispatch(setCurrentStep(FLIGHT_OPTIONS_FORM_STEP));
|
|
10427
11442
|
};
|
|
10428
11443
|
var handleSubmit = function (e) {
|
|
10429
|
-
if (skipRouter) {
|
|
10430
|
-
if (flightOptions.isHidden) {
|
|
11444
|
+
if (settings.skipRouter) {
|
|
11445
|
+
if (settings.flightOptions.isHidden) {
|
|
10431
11446
|
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
10432
11447
|
}
|
|
10433
11448
|
else {
|
|
@@ -10435,26 +11450,14 @@ var RoomOptionsForm = function () {
|
|
|
10435
11450
|
}
|
|
10436
11451
|
}
|
|
10437
11452
|
else {
|
|
10438
|
-
|
|
10439
|
-
navigate("".concat(basePath).concat(options.pathSuffix, "?").concat(bookingQueryString));
|
|
10440
|
-
}
|
|
10441
|
-
else {
|
|
10442
|
-
navigate("".concat(basePath).concat(flightOptions.pathSuffix, "?").concat(bookingQueryString));
|
|
10443
|
-
}
|
|
11453
|
+
navigate("".concat(settings.basePath).concat(settings.options.pathSuffix, "?").concat(bookingQueryString));
|
|
10444
11454
|
}
|
|
10445
11455
|
e.preventDefault();
|
|
10446
11456
|
};
|
|
10447
11457
|
var handleOnRoomChange = function (index, accommodationCode, regimeCode) {
|
|
10448
11458
|
if (!packageRooms)
|
|
10449
11459
|
return;
|
|
10450
|
-
var updatedPackageRooms = packageRooms
|
|
10451
|
-
if (room.index !== index)
|
|
10452
|
-
return room;
|
|
10453
|
-
return __assign(__assign({}, room), { options: room.options.map(function (option) {
|
|
10454
|
-
return __assign(__assign({}, option), { isSelected: option.accommodationCode === accommodationCode &&
|
|
10455
|
-
option.regimeCode === regimeCode });
|
|
10456
|
-
}) });
|
|
10457
|
-
});
|
|
11460
|
+
var updatedPackageRooms = updatePackageRooms(packageRooms, index, accommodationCode, regimeCode, availabilities);
|
|
10458
11461
|
dispatch(setPackageRooms(updatedPackageRooms));
|
|
10459
11462
|
dispatch(fetchPriceDetails());
|
|
10460
11463
|
};
|
|
@@ -10482,61 +11485,11 @@ var RoomOptionsForm = function () {
|
|
|
10482
11485
|
}
|
|
10483
11486
|
dispatch(fetchPriceDetails());
|
|
10484
11487
|
}, []);
|
|
10485
|
-
// const [active, setActive] = useState(false)
|
|
10486
11488
|
return (React.createElement(React.Fragment, null,
|
|
10487
11489
|
React.createElement("form", { className: "form", name: "booking--options", id: "booking--options", noValidate: true, onSubmit: handleSubmit },
|
|
10488
|
-
React.createElement("div", { className: "form__wrapper" },
|
|
10489
|
-
isLoading && loaderComponent,
|
|
10490
|
-
!isLoading && (React.createElement("div", { className: "form__region" },
|
|
10491
|
-
React.createElement("div", { className: "form__group" },
|
|
10492
|
-
React.createElement("div", { className: "booking-card" },
|
|
10493
|
-
React.createElement("div", { className: "booking-card__body" },
|
|
10494
|
-
React.createElement("div", { className: buildClassName([
|
|
10495
|
-
"booking-card__group",
|
|
10496
|
-
"booking-card__group--package",
|
|
10497
|
-
]) },
|
|
10498
|
-
React.createElement("span", { className: "booking-card__tag" }, translations.OPTIONS_FORM.PACKAGE),
|
|
10499
|
-
React.createElement("div", { className: "booking-card__group-body" },
|
|
10500
|
-
React.createElement("table", { className: "table table--striped" },
|
|
10501
|
-
React.createElement("tbody", null, packageRooms &&
|
|
10502
|
-
packageRooms.map(function (room) { return (React.createElement(OptionRoom, { key: room.index, packageRoom: room, pax: getRoomPax(room.index), optionPax: optionPax, onRoomChange: handleOnRoomChange })); })))))))))),
|
|
10503
|
-
React.createElement("div", { className: "form__room" },
|
|
10504
|
-
React.createElement("div", { className: "form__room__wrapper" },
|
|
10505
|
-
React.createElement("div", { className: "form__room__image" },
|
|
10506
|
-
React.createElement("img", { src: "https://picsum.photos/1920/1080", alt: "", className: "form__room__img" }),
|
|
10507
|
-
React.createElement("div", { className: "form__room__favorite" },
|
|
10508
|
-
React.createElement("i", { className: "fa-regular fa-heart" }))),
|
|
10509
|
-
React.createElement("div", { className: "form__room__body" },
|
|
10510
|
-
React.createElement("div", { className: "" },
|
|
10511
|
-
React.createElement("h3", { className: "form__room__title" }, "Tara Penthouse suite frontal seaview"),
|
|
10512
|
-
React.createElement("p", null,
|
|
10513
|
-
" Carrer de Nicaragua, 146, Les Corts, 08029 Barcelona, Spanje \u2013 ",
|
|
10514
|
-
React.createElement("a", { href: "#" }, "Toon kaart")),
|
|
10515
|
-
React.createElement("ul", { className: "list--usps form__room__usps" },
|
|
10516
|
-
React.createElement("li", { className: "list__item" }, "1 tweepersoonsbed"),
|
|
10517
|
-
React.createElement("li", { className: "list__item" }, "Max. 2 personen"),
|
|
10518
|
-
React.createElement("li", { className: "list__item" }, "Gratis WiFi"),
|
|
10519
|
-
React.createElement("li", { className: "list__item" }, "Airconditioning"),
|
|
10520
|
-
React.createElement("li", { className: "list__item" }, "Eigen badkamer")),
|
|
10521
|
-
React.createElement("div", { className: "form__room__select" },
|
|
10522
|
-
React.createElement("div", { className: "select-wrapper" },
|
|
10523
|
-
React.createElement("div", { className: "select-wrapper__select" },
|
|
10524
|
-
React.createElement("select", null,
|
|
10525
|
-
React.createElement("option", { value: "KO" }, "Kamer & Ontbijt "),
|
|
10526
|
-
React.createElement("option", { value: "LU" }, "Lunch (+ \u20AC\u00A0354,38)"),
|
|
10527
|
-
React.createElement("option", { value: "HB" }, "Half Pension (+ \u20AC\u00A0740,25)"),
|
|
10528
|
-
React.createElement("option", { value: "FB" }, "Vol Pension (+ \u20AC\u00A01.094,63)")))))))),
|
|
10529
|
-
React.createElement("div", { className: "form__room__footer" },
|
|
10530
|
-
React.createElement("div", { className: "form__room__footer__top" },
|
|
10531
|
-
React.createElement("p", { className: "form__room__dates" }, "01/11 - 08/11"),
|
|
10532
|
-
React.createElement("span", { className: "form__room__days" }, "8 dagen, 7nachten")),
|
|
10533
|
-
React.createElement("div", { className: "form__room__footer__bottom" },
|
|
10534
|
-
React.createElement("p", { className: "form__room__price form__room__price--increase" },
|
|
10535
|
-
"+ ",
|
|
10536
|
-
React.createElement("span", null, "\u20AC 216,00"),
|
|
10537
|
-
" p.p."),
|
|
10538
|
-
React.createElement("button", { className: "cta cta--secondary" }, "Selecteer"))))),
|
|
11490
|
+
React.createElement("div", { className: "form__wrapper" }, rooms.map(function (room) { return (React.createElement(TravelerRooms, { key: room.index, index: room.index, room: room, onRoomChange: handleOnRoomChange })); })),
|
|
10539
11491
|
React.createElement("div", { className: "booking__navigator" },
|
|
11492
|
+
!settings.flightOptions.isHidden && (React.createElement(React.Fragment, null, settings.skipRouter ? (React.createElement("button", { type: "button", title: translations.STEPS.PREVIOUS, onClick: function () { return goPrevious(); }, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)) : (React.createElement(Link, { to: "".concat(settings.basePath).concat(settings.flightOptions.pathSuffix, "?").concat(bookingQueryString), title: translations.STEPS.PREVIOUS, className: "cta cta--secondary" }, translations.STEPS.PREVIOUS)))),
|
|
10540
11493
|
React.createElement("button", { type: "submit", title: translations.STEPS.NEXT, disabled: isLoading, className: buildClassName(["cta", isLoading && "cta--disabled"]) }, translations.STEPS.NEXT)))));
|
|
10541
11494
|
};
|
|
10542
11495
|
|
|
@@ -11005,8 +11958,8 @@ var Summary = function () {
|
|
|
11005
11958
|
return [4 /*yield*/, validateVoucher_1(tideClientConfig, request)];
|
|
11006
11959
|
case 1:
|
|
11007
11960
|
result = _b.sent();
|
|
11008
|
-
if (result
|
|
11009
|
-
setVoucher(__assign(__assign({}, voucher), { isValidated: true, isValid: result.
|
|
11961
|
+
if (result) {
|
|
11962
|
+
setVoucher(__assign(__assign({}, voucher), { isValidated: true, isValid: result.isValid }));
|
|
11010
11963
|
}
|
|
11011
11964
|
return [2 /*return*/];
|
|
11012
11965
|
}
|
|
@@ -11538,7 +12491,7 @@ var TravelersForm = function () {
|
|
|
11538
12491
|
var hasVisibleError = function (key) {
|
|
11539
12492
|
return get$2(formik.errors, key) && get$2(formik.touched, key);
|
|
11540
12493
|
};
|
|
11541
|
-
return (React.createElement("form", { className: "form", name: "booking--travellers", id: "booking--travellers", noValidate: true, onSubmit: formik.handleSubmit, onReset: formik.handleReset },
|
|
12494
|
+
return (React.createElement("form", { className: "form form__travelers", name: "booking--travellers", id: "booking--travellers", noValidate: true, onSubmit: formik.handleSubmit, onReset: formik.handleReset },
|
|
11542
12495
|
formik.values.rooms.map(function (room, rIndex) { return (React.createElement("div", { key: rIndex },
|
|
11543
12496
|
React.createElement("div", { className: "form__region" },
|
|
11544
12497
|
React.createElement("div", { className: "form__region-header" },
|
|
@@ -11706,7 +12659,7 @@ var TravelersForm = function () {
|
|
|
11706
12659
|
|
|
11707
12660
|
var Booking = function (_a) {
|
|
11708
12661
|
var productCode = _a.productCode, productName = _a.productName, thumbnailUrl = _a.thumbnailUrl;
|
|
11709
|
-
var _b = useContext(SettingsContext), officeId = _b.officeId, bookingOptions = _b.bookingOptions, basePath = _b.basePath, roomOptions = _b.roomOptions, flightOptions = _b.flightOptions, options = _b.options, travellers = _b.travellers, summary = _b.summary, confirmation = _b.confirmation, error = _b.error, showSidebarDeposit = _b.showSidebarDeposit, includeFlights = _b.includeFlights, loaderComponent = _b.loaderComponent, skipPaymentWithAgent = _b.skipPaymentWithAgent, generatePaymentUrl = _b.generatePaymentUrl, tagIds = _b.tagIds, agentAdressId = _b.agentAdressId, language = _b.language, translationFiles = _b.translationFiles;
|
|
12662
|
+
var _b = useContext(SettingsContext), officeId = _b.officeId, bookingOptions = _b.bookingOptions, basePath = _b.basePath, roomOptions = _b.roomOptions, flightOptions = _b.flightOptions, options = _b.options, travellers = _b.travellers, summary = _b.summary, confirmation = _b.confirmation, error = _b.error, showSidebarDeposit = _b.showSidebarDeposit, includeFlights = _b.includeFlights, loaderComponent = _b.loaderComponent, skipPaymentWithAgent = _b.skipPaymentWithAgent, generatePaymentUrl = _b.generatePaymentUrl, tagIds = _b.tagIds, agentAdressId = _b.agentAdressId, language = _b.language, translationFiles = _b.translationFiles, accommodationViewId = _b.accommodationViewId;
|
|
11710
12663
|
var dispatch = useAppDispatch();
|
|
11711
12664
|
var location = useLocation();
|
|
11712
12665
|
var productAttributes = useSelector(selectProductAttributes);
|
|
@@ -11730,7 +12683,7 @@ var Booking = function (_a) {
|
|
|
11730
12683
|
var rooms = getRoomsFromParams(params, "rooms");
|
|
11731
12684
|
var flight = getFlightsFromParams(params, "flight");
|
|
11732
12685
|
var allotmentName = getStringFromParams(params, "allotmentName");
|
|
11733
|
-
var allotmentIds = getNumbersFromParams(params, "
|
|
12686
|
+
var allotmentIds = getNumbersFromParams(params, "allotmentId");
|
|
11734
12687
|
var tourCode = getStringFromParams(params, "tourCode");
|
|
11735
12688
|
var bookingNumber = (_a = params.get("bookingNr")) !== null && _a !== void 0 ? _a : undefined;
|
|
11736
12689
|
if (typeof window !== "undefined") {
|
|
@@ -11827,6 +12780,9 @@ var Booking = function (_a) {
|
|
|
11827
12780
|
if (agentAdressId && agentAdressId != 0) {
|
|
11828
12781
|
dispatch(setBookingType("b2b"));
|
|
11829
12782
|
}
|
|
12783
|
+
if (accommodationViewId && accommodationViewId != 0) {
|
|
12784
|
+
dispatch(setAccommodationViewId(accommodationViewId));
|
|
12785
|
+
}
|
|
11830
12786
|
}, [
|
|
11831
12787
|
officeId,
|
|
11832
12788
|
language,
|
|
@@ -11837,6 +12793,7 @@ var Booking = function (_a) {
|
|
|
11837
12793
|
setCalculateDeposit,
|
|
11838
12794
|
tagIds,
|
|
11839
12795
|
agentAdressId,
|
|
12796
|
+
accommodationViewId
|
|
11840
12797
|
]);
|
|
11841
12798
|
useEffect(function () {
|
|
11842
12799
|
if (!productAttributes ||
|
|
@@ -11865,8 +12822,8 @@ var Booking = function (_a) {
|
|
|
11865
12822
|
React.createElement("div", { className: "booking__content" },
|
|
11866
12823
|
React.createElement("div", { className: "booking__panel" },
|
|
11867
12824
|
React.createElement(Router, { basepath: basePath },
|
|
11868
|
-
!roomOptions.isHidden && roomOptions.pathSuffix && (React.createElement(StepRoute, { path: roomOptions.pathSuffix, number: numberIndex++, title: translations.STEPS.ROOM_OPTIONS, component: React.createElement(RoomOptionsForm, null) })),
|
|
11869
12825
|
!flightOptions.isHidden && flightOptions.pathSuffix && (React.createElement(StepRoute, { path: flightOptions.pathSuffix, number: numberIndex++, title: translations.STEPS.FLIGHT_OPTIONS, component: React.createElement(FlightOptionsForm, null) })),
|
|
12826
|
+
!roomOptions.isHidden && roomOptions.pathSuffix && (React.createElement(StepRoute, { path: roomOptions.pathSuffix, number: numberIndex++, title: translations.STEPS.ROOM_OPTIONS, component: React.createElement(RoomOptionsForm, null) })),
|
|
11870
12827
|
React.createElement(StepRoute, { path: options.pathSuffix, number: numberIndex++, title: translations.STEPS.EXTRA_OPTIONS, component: React.createElement(OptionsForm, null) }),
|
|
11871
12828
|
React.createElement(StepRoute, { path: travellers.pathSuffix, number: numberIndex++, title: translations.STEPS.PERSONAL_DETAILS, component: React.createElement(TravelersForm, null) }),
|
|
11872
12829
|
React.createElement(StepRoute, { path: summary.pathSuffix, number: numberIndex++, title: translations.STEPS.SUMMARY, component: React.createElement(Summary, null) }),
|