@qite/tide-booking-component 0.0.2-preview.73 → 0.0.2-preview.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/build-cjs/booking-wizard/features/booking/booking-slice.d.ts +5 -0
- package/build/build-cjs/booking-wizard/features/booking/selectors.d.ts +3 -0
- package/build/build-cjs/index.js +74 -8
- package/build/build-esm/booking-wizard/features/booking/booking-slice.d.ts +5 -0
- package/build/build-esm/booking-wizard/features/booking/selectors.d.ts +3 -0
- package/build/build-esm/index.js +74 -6
- package/package.json +2 -2
- package/src/booking-wizard/features/booking/booking-slice.ts +8 -0
- package/src/booking-wizard/features/booking/selectors.ts +2 -0
- package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +65 -58
- package/src/booking-wizard/features/summary/summary.tsx +35 -5
- package/src/booking-wizard/translations/translations.json +4 -2
|
@@ -27,6 +27,7 @@ export interface BookingState {
|
|
|
27
27
|
isUnavailable?: boolean;
|
|
28
28
|
tagIds?: number[];
|
|
29
29
|
agentAdressId?: number;
|
|
30
|
+
remarks?: string;
|
|
30
31
|
}
|
|
31
32
|
export declare const fetchPackage: import("@reduxjs/toolkit").AsyncThunk<
|
|
32
33
|
void,
|
|
@@ -112,6 +113,10 @@ export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPa
|
|
|
112
113
|
setAgentAdressId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<
|
|
113
114
|
number | undefined,
|
|
114
115
|
string
|
|
116
|
+
>,
|
|
117
|
+
setBookingRemarks: import("@reduxjs/toolkit").ActionCreatorWithPayload<
|
|
118
|
+
string,
|
|
119
|
+
string
|
|
115
120
|
>;
|
|
116
121
|
declare const _default: import("redux").Reducer<
|
|
117
122
|
BookingState,
|
|
@@ -87,6 +87,9 @@ export declare const selectBookingNumber: (
|
|
|
87
87
|
export declare const selectBookingRooms: (
|
|
88
88
|
state: RootState
|
|
89
89
|
) => Room[] | undefined;
|
|
90
|
+
export declare const selectBookingRemarks: (
|
|
91
|
+
state: RootState
|
|
92
|
+
) => string | undefined;
|
|
90
93
|
export declare const selectCalculateDeposit: (state: RootState) => boolean;
|
|
91
94
|
export declare const selectIsRetry: (state: RootState) => boolean;
|
|
92
95
|
export declare const selectStartDate: (state: RootState) => string | undefined;
|
package/build/build-cjs/index.js
CHANGED
|
@@ -7247,6 +7247,9 @@ var selectBookingRooms = function (state) {
|
|
|
7247
7247
|
? void 0
|
|
7248
7248
|
: _a.rooms;
|
|
7249
7249
|
};
|
|
7250
|
+
var selectBookingRemarks = function (state) {
|
|
7251
|
+
return state.booking.remarks;
|
|
7252
|
+
};
|
|
7250
7253
|
var selectCalculateDeposit = function (state) {
|
|
7251
7254
|
return state.booking.calculateDeposit;
|
|
7252
7255
|
};
|
|
@@ -7607,6 +7610,7 @@ var fetchPackageDetails = toolkit.createAsyncThunk(
|
|
|
7607
7610
|
bookingAttributes,
|
|
7608
7611
|
agentId,
|
|
7609
7612
|
rooms,
|
|
7613
|
+
remarks,
|
|
7610
7614
|
requestRooms,
|
|
7611
7615
|
isAllotment,
|
|
7612
7616
|
request;
|
|
@@ -7620,6 +7624,7 @@ var fetchPackageDetails = toolkit.createAsyncThunk(
|
|
|
7620
7624
|
bookingAttributes = selectBookingAttributes(state);
|
|
7621
7625
|
agentId = selectAgentId(state);
|
|
7622
7626
|
rooms = selectBookingRooms(state);
|
|
7627
|
+
remarks = selectBookingRemarks(state);
|
|
7623
7628
|
if (lodash.isNil(productAttributes)) {
|
|
7624
7629
|
throw Error("productAttributes could not be found");
|
|
7625
7630
|
}
|
|
@@ -7669,6 +7674,7 @@ var fetchPackageDetails = toolkit.createAsyncThunk(
|
|
|
7669
7674
|
: [],
|
|
7670
7675
|
tourCode: bookingAttributes.tourCode,
|
|
7671
7676
|
rooms: requestRooms,
|
|
7677
|
+
remarks: remarks,
|
|
7672
7678
|
},
|
|
7673
7679
|
};
|
|
7674
7680
|
return [4 /*yield*/, packageApi.fetchDetails(request, signal)];
|
|
@@ -7754,6 +7760,9 @@ var bookingSlice = toolkit.createSlice({
|
|
|
7754
7760
|
setAgentAdressId: function (state, action) {
|
|
7755
7761
|
state.agentAdressId = action.payload;
|
|
7756
7762
|
},
|
|
7763
|
+
setBookingRemarks: function (state, action) {
|
|
7764
|
+
state.remarks = action.payload;
|
|
7765
|
+
},
|
|
7757
7766
|
},
|
|
7758
7767
|
extraReducers: function (builder) {
|
|
7759
7768
|
builder.addCase(fetchPackageDetails.fulfilled, function (state, action) {
|
|
@@ -7831,7 +7840,8 @@ var setOfficeId = ((_a = bookingSlice.actions), _a.setOfficeId),
|
|
|
7831
7840
|
setSkipPayment = _a.setSkipPayment,
|
|
7832
7841
|
setGeneratePaymentUrl = _a.setGeneratePaymentUrl,
|
|
7833
7842
|
setTagIds = _a.setTagIds,
|
|
7834
|
-
setAgentAdressId = _a.setAgentAdressId
|
|
7843
|
+
setAgentAdressId = _a.setAgentAdressId,
|
|
7844
|
+
setBookingRemarks = _a.setBookingRemarks;
|
|
7835
7845
|
var bookingReducer = bookingSlice.reducer;
|
|
7836
7846
|
|
|
7837
7847
|
var initialState = {
|
|
@@ -8061,6 +8071,7 @@ var SIDEBAR = {
|
|
|
8061
8071
|
FLIGHT_DEPARTURE: "Vertrek",
|
|
8062
8072
|
FLIGHT_ARRIVAL: "Aankomst",
|
|
8063
8073
|
ON_REQUEST: "Op aanvraag",
|
|
8074
|
+
CHANGES: "overstappen",
|
|
8064
8075
|
};
|
|
8065
8076
|
var TRAVELERS_FORM = {
|
|
8066
8077
|
PERSONS: "Personen",
|
|
@@ -8120,6 +8131,7 @@ var SUMMARY = {
|
|
|
8120
8131
|
VALIDATE_TEXT:
|
|
8121
8132
|
"Je staat op het punt je boeking te bevestigen. Contoleer of alle gegevens correct zijn. Deze zijn definitief en niet meer aanpasbaar.",
|
|
8122
8133
|
OPTIONS: "Opties",
|
|
8134
|
+
REMARKS: "Opmerkingen",
|
|
8123
8135
|
};
|
|
8124
8136
|
var CONFIRMATION = {
|
|
8125
8137
|
TITLE_TEXT1: "Je boeking met nummer ",
|
|
@@ -10487,9 +10499,18 @@ var SidebarFlight = function (_a) {
|
|
|
10487
10499
|
React__default["default"].createElement(
|
|
10488
10500
|
"div",
|
|
10489
10501
|
{ className: "pricing-summary__row" },
|
|
10490
|
-
React__default["default"].createElement(
|
|
10491
|
-
|
|
10492
|
-
|
|
10502
|
+
React__default["default"].createElement(
|
|
10503
|
+
"div",
|
|
10504
|
+
{ className: "pricing-summary__property" },
|
|
10505
|
+
flight.flightMetaData.flightLines.length > 1 &&
|
|
10506
|
+
React__default["default"].createElement(
|
|
10507
|
+
"i",
|
|
10508
|
+
null,
|
|
10509
|
+
flight.flightMetaData.flightLines.length - 1,
|
|
10510
|
+
"x ",
|
|
10511
|
+
translations.SIDEBAR.CHANGES
|
|
10512
|
+
)
|
|
10513
|
+
),
|
|
10493
10514
|
React__default["default"].createElement(
|
|
10494
10515
|
"div",
|
|
10495
10516
|
{ className: "pricing-summary__value" },
|
|
@@ -11423,6 +11444,9 @@ var Summary = function () {
|
|
|
11423
11444
|
var _b = React.useState(settings.summary.checkboxes),
|
|
11424
11445
|
checkboxes = _b[0],
|
|
11425
11446
|
setCheckboxes = _b[1];
|
|
11447
|
+
var _c = React.useState(""),
|
|
11448
|
+
remarks = _c[0],
|
|
11449
|
+
setRemarks = _c[1];
|
|
11426
11450
|
var bookingQueryString = reactRedux.useSelector(selectBookingQueryString);
|
|
11427
11451
|
var travelerFormValues = reactRedux.useSelector(selectTravelersFormValues);
|
|
11428
11452
|
var packageDetails = reactRedux.useSelector(selectPackageDetails);
|
|
@@ -11533,6 +11557,10 @@ var Summary = function () {
|
|
|
11533
11557
|
newCheckboxes[index].isSelected = !newCheckboxes[index].isSelected;
|
|
11534
11558
|
setCheckboxes(newCheckboxes);
|
|
11535
11559
|
};
|
|
11560
|
+
var handleRemarksChange = function (text) {
|
|
11561
|
+
dispatch(setBookingRemarks(text));
|
|
11562
|
+
setRemarks(text);
|
|
11563
|
+
};
|
|
11536
11564
|
return React__default["default"].createElement(
|
|
11537
11565
|
React__default["default"].Fragment,
|
|
11538
11566
|
null,
|
|
@@ -11801,7 +11829,7 @@ var Summary = function () {
|
|
|
11801
11829
|
) &&
|
|
11802
11830
|
(activeOption === null || activeOption === void 0
|
|
11803
11831
|
? void 0
|
|
11804
|
-
: activeOption.groups.map(function (x) {
|
|
11832
|
+
: activeOption.groups.map(function (x, i) {
|
|
11805
11833
|
if (
|
|
11806
11834
|
!x.options.some(function (y) {
|
|
11807
11835
|
return y.isSelected;
|
|
@@ -11810,7 +11838,7 @@ var Summary = function () {
|
|
|
11810
11838
|
return;
|
|
11811
11839
|
return React__default["default"].createElement(
|
|
11812
11840
|
SummaryPerBookingOptionGroup,
|
|
11813
|
-
{ group: x }
|
|
11841
|
+
{ key: i, group: x }
|
|
11814
11842
|
);
|
|
11815
11843
|
})),
|
|
11816
11844
|
!lodash.isEmpty(
|
|
@@ -11846,10 +11874,11 @@ var Summary = function () {
|
|
|
11846
11874
|
.filter(function (x) {
|
|
11847
11875
|
return x.isSelected;
|
|
11848
11876
|
})
|
|
11849
|
-
.map(function (flight) {
|
|
11877
|
+
.map(function (flight, i) {
|
|
11850
11878
|
return React__default["default"].createElement(
|
|
11851
11879
|
SummaryFlight,
|
|
11852
11880
|
{
|
|
11881
|
+
key: i,
|
|
11853
11882
|
flight: flight,
|
|
11854
11883
|
header: translations.SIDEBAR.DEPARTURE_FLIGHT,
|
|
11855
11884
|
}
|
|
@@ -11862,10 +11891,11 @@ var Summary = function () {
|
|
|
11862
11891
|
.filter(function (x) {
|
|
11863
11892
|
return x.isSelected;
|
|
11864
11893
|
})
|
|
11865
|
-
.map(function (flight) {
|
|
11894
|
+
.map(function (flight, i) {
|
|
11866
11895
|
return React__default["default"].createElement(
|
|
11867
11896
|
SummaryFlight,
|
|
11868
11897
|
{
|
|
11898
|
+
key: i,
|
|
11869
11899
|
flight: flight,
|
|
11870
11900
|
header: translations.SIDEBAR.ARRIVAL_FLIGHT,
|
|
11871
11901
|
}
|
|
@@ -11976,6 +12006,42 @@ var Summary = function () {
|
|
|
11976
12006
|
)
|
|
11977
12007
|
)
|
|
11978
12008
|
),
|
|
12009
|
+
React__default["default"].createElement(
|
|
12010
|
+
"div",
|
|
12011
|
+
{ className: "form__region" },
|
|
12012
|
+
React__default["default"].createElement(
|
|
12013
|
+
"div",
|
|
12014
|
+
{ className: "form__row" },
|
|
12015
|
+
React__default["default"].createElement(
|
|
12016
|
+
"div",
|
|
12017
|
+
{ className: "form__group" },
|
|
12018
|
+
React__default["default"].createElement(
|
|
12019
|
+
"div",
|
|
12020
|
+
{ className: "form__region-header" },
|
|
12021
|
+
React__default["default"].createElement(
|
|
12022
|
+
"h5",
|
|
12023
|
+
{ className: "form__region-heading" },
|
|
12024
|
+
translations.SUMMARY.REMARKS
|
|
12025
|
+
)
|
|
12026
|
+
)
|
|
12027
|
+
)
|
|
12028
|
+
),
|
|
12029
|
+
React__default["default"].createElement(
|
|
12030
|
+
"div",
|
|
12031
|
+
{ className: "form__row" },
|
|
12032
|
+
React__default["default"].createElement(
|
|
12033
|
+
"div",
|
|
12034
|
+
{ className: "form__group" },
|
|
12035
|
+
React__default["default"].createElement("textarea", {
|
|
12036
|
+
className: "form__input",
|
|
12037
|
+
defaultValue: remarks,
|
|
12038
|
+
onChange: function (e) {
|
|
12039
|
+
return handleRemarksChange(e.target.value);
|
|
12040
|
+
},
|
|
12041
|
+
})
|
|
12042
|
+
)
|
|
12043
|
+
)
|
|
12044
|
+
),
|
|
11979
12045
|
React__default["default"].createElement(
|
|
11980
12046
|
"div",
|
|
11981
12047
|
{ className: "form__region" },
|
|
@@ -27,6 +27,7 @@ export interface BookingState {
|
|
|
27
27
|
isUnavailable?: boolean;
|
|
28
28
|
tagIds?: number[];
|
|
29
29
|
agentAdressId?: number;
|
|
30
|
+
remarks?: string;
|
|
30
31
|
}
|
|
31
32
|
export declare const fetchPackage: import("@reduxjs/toolkit").AsyncThunk<
|
|
32
33
|
void,
|
|
@@ -112,6 +113,10 @@ export declare const setOfficeId: import("@reduxjs/toolkit").ActionCreatorWithPa
|
|
|
112
113
|
setAgentAdressId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<
|
|
113
114
|
number | undefined,
|
|
114
115
|
string
|
|
116
|
+
>,
|
|
117
|
+
setBookingRemarks: import("@reduxjs/toolkit").ActionCreatorWithPayload<
|
|
118
|
+
string,
|
|
119
|
+
string
|
|
115
120
|
>;
|
|
116
121
|
declare const _default: import("redux").Reducer<
|
|
117
122
|
BookingState,
|
|
@@ -87,6 +87,9 @@ export declare const selectBookingNumber: (
|
|
|
87
87
|
export declare const selectBookingRooms: (
|
|
88
88
|
state: RootState
|
|
89
89
|
) => Room[] | undefined;
|
|
90
|
+
export declare const selectBookingRemarks: (
|
|
91
|
+
state: RootState
|
|
92
|
+
) => string | undefined;
|
|
90
93
|
export declare const selectCalculateDeposit: (state: RootState) => boolean;
|
|
91
94
|
export declare const selectIsRetry: (state: RootState) => boolean;
|
|
92
95
|
export declare const selectStartDate: (state: RootState) => string | undefined;
|
package/build/build-esm/index.js
CHANGED
|
@@ -7250,6 +7250,9 @@ var selectBookingRooms = function (state) {
|
|
|
7250
7250
|
? void 0
|
|
7251
7251
|
: _a.rooms;
|
|
7252
7252
|
};
|
|
7253
|
+
var selectBookingRemarks = function (state) {
|
|
7254
|
+
return state.booking.remarks;
|
|
7255
|
+
};
|
|
7253
7256
|
var selectCalculateDeposit = function (state) {
|
|
7254
7257
|
return state.booking.calculateDeposit;
|
|
7255
7258
|
};
|
|
@@ -7605,6 +7608,7 @@ var fetchPackageDetails = createAsyncThunk("booking/details", function (_, _a) {
|
|
|
7605
7608
|
bookingAttributes,
|
|
7606
7609
|
agentId,
|
|
7607
7610
|
rooms,
|
|
7611
|
+
remarks,
|
|
7608
7612
|
requestRooms,
|
|
7609
7613
|
isAllotment,
|
|
7610
7614
|
request;
|
|
@@ -7618,6 +7622,7 @@ var fetchPackageDetails = createAsyncThunk("booking/details", function (_, _a) {
|
|
|
7618
7622
|
bookingAttributes = selectBookingAttributes(state);
|
|
7619
7623
|
agentId = selectAgentId(state);
|
|
7620
7624
|
rooms = selectBookingRooms(state);
|
|
7625
|
+
remarks = selectBookingRemarks(state);
|
|
7621
7626
|
if (isNil(productAttributes)) {
|
|
7622
7627
|
throw Error("productAttributes could not be found");
|
|
7623
7628
|
}
|
|
@@ -7666,6 +7671,7 @@ var fetchPackageDetails = createAsyncThunk("booking/details", function (_, _a) {
|
|
|
7666
7671
|
: [],
|
|
7667
7672
|
tourCode: bookingAttributes.tourCode,
|
|
7668
7673
|
rooms: requestRooms,
|
|
7674
|
+
remarks: remarks,
|
|
7669
7675
|
},
|
|
7670
7676
|
};
|
|
7671
7677
|
return [4 /*yield*/, packageApi.fetchDetails(request, signal)];
|
|
@@ -7750,6 +7756,9 @@ var bookingSlice = createSlice({
|
|
|
7750
7756
|
setAgentAdressId: function (state, action) {
|
|
7751
7757
|
state.agentAdressId = action.payload;
|
|
7752
7758
|
},
|
|
7759
|
+
setBookingRemarks: function (state, action) {
|
|
7760
|
+
state.remarks = action.payload;
|
|
7761
|
+
},
|
|
7753
7762
|
},
|
|
7754
7763
|
extraReducers: function (builder) {
|
|
7755
7764
|
builder.addCase(fetchPackageDetails.fulfilled, function (state, action) {
|
|
@@ -7827,7 +7836,8 @@ var setOfficeId = ((_a = bookingSlice.actions), _a.setOfficeId),
|
|
|
7827
7836
|
setSkipPayment = _a.setSkipPayment,
|
|
7828
7837
|
setGeneratePaymentUrl = _a.setGeneratePaymentUrl,
|
|
7829
7838
|
setTagIds = _a.setTagIds,
|
|
7830
|
-
setAgentAdressId = _a.setAgentAdressId
|
|
7839
|
+
setAgentAdressId = _a.setAgentAdressId,
|
|
7840
|
+
setBookingRemarks = _a.setBookingRemarks;
|
|
7831
7841
|
var bookingReducer = bookingSlice.reducer;
|
|
7832
7842
|
|
|
7833
7843
|
var initialState = {
|
|
@@ -8050,6 +8060,7 @@ var SIDEBAR = {
|
|
|
8050
8060
|
FLIGHT_DEPARTURE: "Vertrek",
|
|
8051
8061
|
FLIGHT_ARRIVAL: "Aankomst",
|
|
8052
8062
|
ON_REQUEST: "Op aanvraag",
|
|
8063
|
+
CHANGES: "overstappen",
|
|
8053
8064
|
};
|
|
8054
8065
|
var TRAVELERS_FORM = {
|
|
8055
8066
|
PERSONS: "Personen",
|
|
@@ -8109,6 +8120,7 @@ var SUMMARY = {
|
|
|
8109
8120
|
VALIDATE_TEXT:
|
|
8110
8121
|
"Je staat op het punt je boeking te bevestigen. Contoleer of alle gegevens correct zijn. Deze zijn definitief en niet meer aanpasbaar.",
|
|
8111
8122
|
OPTIONS: "Opties",
|
|
8123
|
+
REMARKS: "Opmerkingen",
|
|
8112
8124
|
};
|
|
8113
8125
|
var CONFIRMATION = {
|
|
8114
8126
|
TITLE_TEXT1: "Je boeking met nummer ",
|
|
@@ -10417,7 +10429,18 @@ var SidebarFlight = function (_a) {
|
|
|
10417
10429
|
React.createElement(
|
|
10418
10430
|
"div",
|
|
10419
10431
|
{ className: "pricing-summary__row" },
|
|
10420
|
-
React.createElement(
|
|
10432
|
+
React.createElement(
|
|
10433
|
+
"div",
|
|
10434
|
+
{ className: "pricing-summary__property" },
|
|
10435
|
+
flight.flightMetaData.flightLines.length > 1 &&
|
|
10436
|
+
React.createElement(
|
|
10437
|
+
"i",
|
|
10438
|
+
null,
|
|
10439
|
+
flight.flightMetaData.flightLines.length - 1,
|
|
10440
|
+
"x ",
|
|
10441
|
+
translations.SIDEBAR.CHANGES
|
|
10442
|
+
)
|
|
10443
|
+
),
|
|
10421
10444
|
React.createElement(
|
|
10422
10445
|
"div",
|
|
10423
10446
|
{ className: "pricing-summary__value" },
|
|
@@ -11312,6 +11335,9 @@ var Summary = function () {
|
|
|
11312
11335
|
var _b = useState(settings.summary.checkboxes),
|
|
11313
11336
|
checkboxes = _b[0],
|
|
11314
11337
|
setCheckboxes = _b[1];
|
|
11338
|
+
var _c = useState(""),
|
|
11339
|
+
remarks = _c[0],
|
|
11340
|
+
setRemarks = _c[1];
|
|
11315
11341
|
var bookingQueryString = useSelector(selectBookingQueryString);
|
|
11316
11342
|
var travelerFormValues = useSelector(selectTravelersFormValues);
|
|
11317
11343
|
var packageDetails = useSelector(selectPackageDetails);
|
|
@@ -11420,6 +11446,10 @@ var Summary = function () {
|
|
|
11420
11446
|
newCheckboxes[index].isSelected = !newCheckboxes[index].isSelected;
|
|
11421
11447
|
setCheckboxes(newCheckboxes);
|
|
11422
11448
|
};
|
|
11449
|
+
var handleRemarksChange = function (text) {
|
|
11450
|
+
dispatch(setBookingRemarks(text));
|
|
11451
|
+
setRemarks(text);
|
|
11452
|
+
};
|
|
11423
11453
|
return React.createElement(
|
|
11424
11454
|
React.Fragment,
|
|
11425
11455
|
null,
|
|
@@ -11684,7 +11714,7 @@ var Summary = function () {
|
|
|
11684
11714
|
) &&
|
|
11685
11715
|
(activeOption === null || activeOption === void 0
|
|
11686
11716
|
? void 0
|
|
11687
|
-
: activeOption.groups.map(function (x) {
|
|
11717
|
+
: activeOption.groups.map(function (x, i) {
|
|
11688
11718
|
if (
|
|
11689
11719
|
!x.options.some(function (y) {
|
|
11690
11720
|
return y.isSelected;
|
|
@@ -11693,7 +11723,7 @@ var Summary = function () {
|
|
|
11693
11723
|
return;
|
|
11694
11724
|
return React.createElement(
|
|
11695
11725
|
SummaryPerBookingOptionGroup,
|
|
11696
|
-
{ group: x }
|
|
11726
|
+
{ key: i, group: x }
|
|
11697
11727
|
);
|
|
11698
11728
|
})),
|
|
11699
11729
|
!isEmpty(
|
|
@@ -11727,8 +11757,9 @@ var Summary = function () {
|
|
|
11727
11757
|
.filter(function (x) {
|
|
11728
11758
|
return x.isSelected;
|
|
11729
11759
|
})
|
|
11730
|
-
.map(function (flight) {
|
|
11760
|
+
.map(function (flight, i) {
|
|
11731
11761
|
return React.createElement(SummaryFlight, {
|
|
11762
|
+
key: i,
|
|
11732
11763
|
flight: flight,
|
|
11733
11764
|
header: translations.SIDEBAR.DEPARTURE_FLIGHT,
|
|
11734
11765
|
});
|
|
@@ -11740,8 +11771,9 @@ var Summary = function () {
|
|
|
11740
11771
|
.filter(function (x) {
|
|
11741
11772
|
return x.isSelected;
|
|
11742
11773
|
})
|
|
11743
|
-
.map(function (flight) {
|
|
11774
|
+
.map(function (flight, i) {
|
|
11744
11775
|
return React.createElement(SummaryFlight, {
|
|
11776
|
+
key: i,
|
|
11745
11777
|
flight: flight,
|
|
11746
11778
|
header: translations.SIDEBAR.ARRIVAL_FLIGHT,
|
|
11747
11779
|
});
|
|
@@ -11851,6 +11883,42 @@ var Summary = function () {
|
|
|
11851
11883
|
)
|
|
11852
11884
|
)
|
|
11853
11885
|
),
|
|
11886
|
+
React.createElement(
|
|
11887
|
+
"div",
|
|
11888
|
+
{ className: "form__region" },
|
|
11889
|
+
React.createElement(
|
|
11890
|
+
"div",
|
|
11891
|
+
{ className: "form__row" },
|
|
11892
|
+
React.createElement(
|
|
11893
|
+
"div",
|
|
11894
|
+
{ className: "form__group" },
|
|
11895
|
+
React.createElement(
|
|
11896
|
+
"div",
|
|
11897
|
+
{ className: "form__region-header" },
|
|
11898
|
+
React.createElement(
|
|
11899
|
+
"h5",
|
|
11900
|
+
{ className: "form__region-heading" },
|
|
11901
|
+
translations.SUMMARY.REMARKS
|
|
11902
|
+
)
|
|
11903
|
+
)
|
|
11904
|
+
)
|
|
11905
|
+
),
|
|
11906
|
+
React.createElement(
|
|
11907
|
+
"div",
|
|
11908
|
+
{ className: "form__row" },
|
|
11909
|
+
React.createElement(
|
|
11910
|
+
"div",
|
|
11911
|
+
{ className: "form__group" },
|
|
11912
|
+
React.createElement("textarea", {
|
|
11913
|
+
className: "form__input",
|
|
11914
|
+
defaultValue: remarks,
|
|
11915
|
+
onChange: function (e) {
|
|
11916
|
+
return handleRemarksChange(e.target.value);
|
|
11917
|
+
},
|
|
11918
|
+
})
|
|
11919
|
+
)
|
|
11920
|
+
)
|
|
11921
|
+
),
|
|
11854
11922
|
React.createElement(
|
|
11855
11923
|
"div",
|
|
11856
11924
|
{ className: "form__region" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qite/tide-booking-component",
|
|
3
|
-
"version": "0.0.2-preview.
|
|
3
|
+
"version": "0.0.2-preview.74",
|
|
4
4
|
"description": "React BookingWizard component for Tide",
|
|
5
5
|
"main": "build/build-cjs/index.js",
|
|
6
6
|
"module": "build/build-esm/index.js",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"uuid": "^8.3.2"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@qite/tide-client": "1.0.
|
|
69
|
+
"@qite/tide-client": "1.0.96"
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -5,6 +5,7 @@ import { RootState } from "../../store";
|
|
|
5
5
|
import { isNil, range } from "lodash";
|
|
6
6
|
import {
|
|
7
7
|
selectBookingAttributes,
|
|
8
|
+
selectBookingRemarks,
|
|
8
9
|
selectBookingRooms,
|
|
9
10
|
selectOfficeId,
|
|
10
11
|
selectProductAttributes,
|
|
@@ -44,6 +45,7 @@ export interface BookingState {
|
|
|
44
45
|
isUnavailable?: boolean;
|
|
45
46
|
tagIds?: number[];
|
|
46
47
|
agentAdressId?: number;
|
|
48
|
+
remarks?: string;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
const initialState: BookingState = {
|
|
@@ -92,6 +94,7 @@ const fetchPackageDetails = createAsyncThunk(
|
|
|
92
94
|
const bookingAttributes = selectBookingAttributes(state);
|
|
93
95
|
const agentId = selectAgentId(state);
|
|
94
96
|
const rooms = selectBookingRooms(state);
|
|
97
|
+
const remarks = selectBookingRemarks(state);
|
|
95
98
|
|
|
96
99
|
if (isNil(productAttributes)) {
|
|
97
100
|
throw Error("productAttributes could not be found");
|
|
@@ -139,6 +142,7 @@ const fetchPackageDetails = createAsyncThunk(
|
|
|
139
142
|
allotmentIds: bookingAttributes.allotmentIds ?? [],
|
|
140
143
|
tourCode: bookingAttributes.tourCode,
|
|
141
144
|
rooms: requestRooms,
|
|
145
|
+
remarks: remarks,
|
|
142
146
|
} as BookingPackageDetailsRequest,
|
|
143
147
|
} as BookingPackageRequest<BookingPackageDetailsRequest>;
|
|
144
148
|
|
|
@@ -225,6 +229,9 @@ const bookingSlice = createSlice({
|
|
|
225
229
|
setAgentAdressId(state, action: PayloadAction<number | undefined>) {
|
|
226
230
|
state.agentAdressId = action.payload;
|
|
227
231
|
},
|
|
232
|
+
setBookingRemarks(state, action: PayloadAction<string>) {
|
|
233
|
+
state.remarks = action.payload;
|
|
234
|
+
},
|
|
228
235
|
},
|
|
229
236
|
extraReducers: (builder) => {
|
|
230
237
|
builder.addCase(fetchPackageDetails.fulfilled, (state, action) => {
|
|
@@ -299,6 +306,7 @@ export const {
|
|
|
299
306
|
setGeneratePaymentUrl,
|
|
300
307
|
setTagIds,
|
|
301
308
|
setAgentAdressId,
|
|
309
|
+
setBookingRemarks,
|
|
302
310
|
} = bookingSlice.actions;
|
|
303
311
|
|
|
304
312
|
export default bookingSlice.reducer;
|
|
@@ -88,6 +88,8 @@ export const selectBookingNumber = (state: RootState) =>
|
|
|
88
88
|
export const selectBookingRooms = (state: RootState) =>
|
|
89
89
|
state.booking.bookingAttributes?.rooms;
|
|
90
90
|
|
|
91
|
+
export const selectBookingRemarks = (state: RootState) => state.booking.remarks;
|
|
92
|
+
|
|
91
93
|
export const selectCalculateDeposit = (state: RootState) =>
|
|
92
94
|
state.booking.calculateDeposit;
|
|
93
95
|
|
|
@@ -1,58 +1,65 @@
|
|
|
1
|
-
import { BookingPackageFlight } from "@qite/tide-client/build/types";
|
|
2
|
-
import { first, last } from "lodash";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { getAirlines, getDateText, parseFlightLines } from "./sidebar-util";
|
|
5
|
-
import translations from "../../translations/translations.json";
|
|
6
|
-
|
|
7
|
-
interface SidebarFlightProps {
|
|
8
|
-
title: string;
|
|
9
|
-
flight: BookingPackageFlight;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const SidebarFlight: React.FC<SidebarFlightProps> = ({ title, flight }) => {
|
|
13
|
-
const flightLines = parseFlightLines(flight.flightMetaData);
|
|
14
|
-
const firstFlight = first(flightLines);
|
|
15
|
-
const lastFlight = last(flightLines);
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div className="pricing-summary__group">
|
|
19
|
-
<h6 className="pricing-summary__title">{title}</h6>
|
|
20
|
-
<div className="pricing-summary__row">
|
|
21
|
-
<div className="pricing-summary__property">
|
|
22
|
-
{translations.SIDEBAR.FLIGHT_DEPARTURE}
|
|
23
|
-
</div>
|
|
24
|
-
<div className="pricing-summary__value">
|
|
25
|
-
{firstFlight?.departureAirportDescription} (
|
|
26
|
-
{firstFlight?.departureAirportIata})<br />
|
|
27
|
-
{getDateText(firstFlight?.departureDate)} {firstFlight?.departureTime}
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div className="pricing-summary__row">
|
|
32
|
-
<div className="pricing-summary__property">
|
|
33
|
-
{translations.SIDEBAR.FLIGHT_ARRIVAL}
|
|
34
|
-
</div>
|
|
35
|
-
<div className="pricing-summary__value">
|
|
36
|
-
{lastFlight?.arrivalAirportDescription} (
|
|
37
|
-
{lastFlight?.arrivalAirportIata})<br />
|
|
38
|
-
{getDateText(lastFlight?.arrivalDate)} {lastFlight?.arrivalTime}
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<div className="pricing-summary__row">
|
|
43
|
-
<div className="pricing-summary__property"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
import { BookingPackageFlight } from "@qite/tide-client/build/types";
|
|
2
|
+
import { first, last } from "lodash";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { getAirlines, getDateText, parseFlightLines } from "./sidebar-util";
|
|
5
|
+
import translations from "../../translations/translations.json";
|
|
6
|
+
|
|
7
|
+
interface SidebarFlightProps {
|
|
8
|
+
title: string;
|
|
9
|
+
flight: BookingPackageFlight;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const SidebarFlight: React.FC<SidebarFlightProps> = ({ title, flight }) => {
|
|
13
|
+
const flightLines = parseFlightLines(flight.flightMetaData);
|
|
14
|
+
const firstFlight = first(flightLines);
|
|
15
|
+
const lastFlight = last(flightLines);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="pricing-summary__group">
|
|
19
|
+
<h6 className="pricing-summary__title">{title}</h6>
|
|
20
|
+
<div className="pricing-summary__row">
|
|
21
|
+
<div className="pricing-summary__property">
|
|
22
|
+
{translations.SIDEBAR.FLIGHT_DEPARTURE}
|
|
23
|
+
</div>
|
|
24
|
+
<div className="pricing-summary__value">
|
|
25
|
+
{firstFlight?.departureAirportDescription} (
|
|
26
|
+
{firstFlight?.departureAirportIata})<br />
|
|
27
|
+
{getDateText(firstFlight?.departureDate)} {firstFlight?.departureTime}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div className="pricing-summary__row">
|
|
32
|
+
<div className="pricing-summary__property">
|
|
33
|
+
{translations.SIDEBAR.FLIGHT_ARRIVAL}
|
|
34
|
+
</div>
|
|
35
|
+
<div className="pricing-summary__value">
|
|
36
|
+
{lastFlight?.arrivalAirportDescription} (
|
|
37
|
+
{lastFlight?.arrivalAirportIata})<br />
|
|
38
|
+
{getDateText(lastFlight?.arrivalDate)} {lastFlight?.arrivalTime}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div className="pricing-summary__row">
|
|
43
|
+
<div className="pricing-summary__property">
|
|
44
|
+
{flight.flightMetaData.flightLines.length > 1 && (
|
|
45
|
+
<i>
|
|
46
|
+
{flight.flightMetaData.flightLines.length - 1}{"x "}
|
|
47
|
+
{translations.SIDEBAR.CHANGES}
|
|
48
|
+
</i>
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
<div className="pricing-summary__value">{getAirlines(flightLines)}</div>
|
|
52
|
+
</div>
|
|
53
|
+
{flight.flightMetaData.luggageIncluded && (
|
|
54
|
+
<div className="pricing-summary__row">
|
|
55
|
+
<div className="pricing-summary__property"></div>
|
|
56
|
+
<div className="pricing-summary__value">
|
|
57
|
+
{translations.SIDEBAR.LUGGAGE_INCLUDED}
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default SidebarFlight;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
selectTravelersFormValues,
|
|
6
6
|
} from "../travelers-form/travelers-form-slice";
|
|
7
7
|
import { selectUserValidated, setUserValidated } from "./summary-slice";
|
|
8
|
-
import { setBookingNumber } from "../booking/booking-slice";
|
|
8
|
+
import { setBookingNumber, setBookingRemarks } from "../booking/booking-slice";
|
|
9
9
|
import { useSelector } from "react-redux";
|
|
10
10
|
import { useLocation } from "@reach/router";
|
|
11
11
|
import Icon from "../../components/icon";
|
|
@@ -47,6 +47,7 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
47
47
|
const [checkboxes, setCheckboxes] = useState<
|
|
48
48
|
SummaryCheckbox[] | undefined | null
|
|
49
49
|
>(settings.summary.checkboxes);
|
|
50
|
+
const [remarks, setRemarks] = useState<string>("");
|
|
50
51
|
|
|
51
52
|
const bookingQueryString = useSelector(selectBookingQueryString);
|
|
52
53
|
const travelerFormValues = useSelector(selectTravelersFormValues);
|
|
@@ -140,6 +141,12 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
140
141
|
setCheckboxes(newCheckboxes);
|
|
141
142
|
};
|
|
142
143
|
|
|
144
|
+
const handleRemarksChange = (text: string) => {
|
|
145
|
+
dispatch(setBookingRemarks(text));
|
|
146
|
+
|
|
147
|
+
setRemarks(text);
|
|
148
|
+
};
|
|
149
|
+
|
|
143
150
|
return (
|
|
144
151
|
<>
|
|
145
152
|
{isSubmitting && settings.loaderComponent}
|
|
@@ -259,10 +266,10 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
259
266
|
</p>
|
|
260
267
|
</li>
|
|
261
268
|
{!isEmpty(activeOption?.groups) &&
|
|
262
|
-
activeOption?.groups.map((x) => {
|
|
269
|
+
activeOption?.groups.map((x, i) => {
|
|
263
270
|
if (!x.options.some((y) => y.isSelected)) return;
|
|
264
271
|
|
|
265
|
-
return <SummaryBookingOption group={x} />;
|
|
272
|
+
return <SummaryBookingOption key={i} group={x} />;
|
|
266
273
|
})}
|
|
267
274
|
{!isEmpty(activeOption?.optionUnits) &&
|
|
268
275
|
activeOption?.optionUnits.map((x) => (
|
|
@@ -275,8 +282,9 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
275
282
|
{packageDetails?.outwardFlights &&
|
|
276
283
|
packageDetails.outwardFlights
|
|
277
284
|
.filter((x) => x.isSelected)
|
|
278
|
-
.map((flight) => (
|
|
285
|
+
.map((flight, i) => (
|
|
279
286
|
<SummaryFlight
|
|
287
|
+
key={i}
|
|
280
288
|
flight={flight}
|
|
281
289
|
header={translations.SIDEBAR.DEPARTURE_FLIGHT}
|
|
282
290
|
/>
|
|
@@ -284,8 +292,9 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
284
292
|
{packageDetails?.returnFlights &&
|
|
285
293
|
packageDetails.returnFlights
|
|
286
294
|
.filter((x) => x.isSelected)
|
|
287
|
-
.map((flight) => (
|
|
295
|
+
.map((flight, i) => (
|
|
288
296
|
<SummaryFlight
|
|
297
|
+
key={i}
|
|
289
298
|
flight={flight}
|
|
290
299
|
header={translations.SIDEBAR.ARRIVAL_FLIGHT}
|
|
291
300
|
/>
|
|
@@ -354,6 +363,27 @@ const Summary: React.FC<SummaryProps> = () => {
|
|
|
354
363
|
</div>
|
|
355
364
|
)}
|
|
356
365
|
|
|
366
|
+
<div className="form__region">
|
|
367
|
+
<div className="form__row">
|
|
368
|
+
<div className="form__group">
|
|
369
|
+
<div className="form__region-header">
|
|
370
|
+
<h5 className="form__region-heading">
|
|
371
|
+
{translations.SUMMARY.REMARKS}
|
|
372
|
+
</h5>
|
|
373
|
+
</div>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
<div className="form__row">
|
|
377
|
+
<div className="form__group">
|
|
378
|
+
<textarea
|
|
379
|
+
className="form__input"
|
|
380
|
+
defaultValue={remarks}
|
|
381
|
+
onChange={(e) => handleRemarksChange(e.target.value)}
|
|
382
|
+
></textarea>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
|
|
357
387
|
<div className="form__region">
|
|
358
388
|
<div className="form__row">
|
|
359
389
|
<div className="form__group">
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"ARRIVAL_FLIGHT": "Vlucht terugreis",
|
|
46
46
|
"FLIGHT_DEPARTURE": "Vertrek",
|
|
47
47
|
"FLIGHT_ARRIVAL": "Aankomst",
|
|
48
|
-
"ON_REQUEST": "Op aanvraag"
|
|
48
|
+
"ON_REQUEST": "Op aanvraag",
|
|
49
|
+
"CHANGES": "overstappen"
|
|
49
50
|
},
|
|
50
51
|
"TRAVELERS_FORM": {
|
|
51
52
|
"PERSONS": "Personen",
|
|
@@ -102,7 +103,8 @@
|
|
|
102
103
|
"NOTIFICATIONS_TITLE": "Aandacht",
|
|
103
104
|
"VALIDATE_TITLE": "Controleer je gegevens",
|
|
104
105
|
"VALIDATE_TEXT": "Je staat op het punt je boeking te bevestigen. Contoleer of alle gegevens correct zijn. Deze zijn definitief en niet meer aanpasbaar.",
|
|
105
|
-
"OPTIONS": "Opties"
|
|
106
|
+
"OPTIONS": "Opties",
|
|
107
|
+
"REMARKS": "Opmerkingen"
|
|
106
108
|
},
|
|
107
109
|
"CONFIRMATION": {
|
|
108
110
|
"TITLE_TEXT1": "Je boeking met nummer ",
|