@qite/tide-booking-component 1.4.109 → 1.4.111
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/index.js +3613 -2276
- package/build/build-cjs/src/booking-wizard/components/step-route.d.ts +2 -2
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +1 -0
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-util.d.ts +2 -1
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar.d.ts +0 -31
- package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
- package/build/build-cjs/src/search-results/components/book-packaging-entry/index.d.ts +8 -0
- package/build/build-cjs/src/search-results/components/book-packaging-entry/wl-sidebar.d.ts +7 -0
- package/build/build-cjs/src/search-results/components/spinner/spinner.d.ts +4 -1
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +7 -1
- package/build/build-cjs/src/search-results/types.d.ts +3 -0
- package/build/build-cjs/src/shared/booking/booking-panel.d.ts +13 -0
- package/build/build-cjs/src/shared/booking/shared-confirmation.d.ts +25 -0
- package/build/build-cjs/src/shared/booking/shared-sidebar.d.ts +34 -0
- package/build/build-cjs/src/shared/booking/step-indicators.d.ts +7 -0
- package/build/build-cjs/src/shared/booking/summary.d.ts +43 -0
- package/build/build-cjs/src/shared/booking/travelers-form.d.ts +93 -0
- package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +2 -0
- package/build/build-cjs/src/shared/components/flyin/packaging-flights-flyin.d.ts +2 -0
- package/build/build-cjs/src/shared/utils/booking-summary.d.ts +1 -0
- package/build/build-cjs/src/shared/utils/localization-util.d.ts +7 -0
- package/build/build-esm/index.js +3572 -2247
- package/build/build-esm/src/booking-wizard/components/step-route.d.ts +2 -2
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +1 -0
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-util.d.ts +2 -1
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar.d.ts +0 -31
- package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
- package/build/build-esm/src/search-results/components/book-packaging-entry/index.d.ts +8 -0
- package/build/build-esm/src/search-results/components/book-packaging-entry/wl-sidebar.d.ts +7 -0
- package/build/build-esm/src/search-results/components/spinner/spinner.d.ts +4 -1
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +7 -1
- package/build/build-esm/src/search-results/types.d.ts +3 -0
- package/build/build-esm/src/shared/booking/booking-panel.d.ts +13 -0
- package/build/build-esm/src/shared/booking/shared-confirmation.d.ts +25 -0
- package/build/build-esm/src/shared/booking/shared-sidebar.d.ts +34 -0
- package/build/build-esm/src/shared/booking/step-indicators.d.ts +7 -0
- package/build/build-esm/src/shared/booking/summary.d.ts +43 -0
- package/build/build-esm/src/shared/booking/travelers-form.d.ts +93 -0
- package/build/build-esm/src/shared/components/flyin/flyin.d.ts +2 -0
- package/build/build-esm/src/shared/components/flyin/packaging-flights-flyin.d.ts +2 -0
- package/build/build-esm/src/shared/utils/booking-summary.d.ts +1 -0
- package/build/build-esm/src/shared/utils/localization-util.d.ts +7 -0
- package/package.json +2 -2
- package/src/booking-wizard/components/step-indicator.tsx +10 -31
- package/src/booking-wizard/components/step-route.tsx +39 -14
- package/src/booking-wizard/features/confirmation/confirmation.tsx +11 -55
- package/src/booking-wizard/features/sidebar/index.tsx +10 -4
- package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +2 -2
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +1 -5
- package/src/booking-wizard/features/sidebar/sidebar.tsx +331 -326
- package/src/booking-wizard/features/summary/summary.tsx +1 -1
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +84 -1010
- package/src/search-results/components/book-packaging-entry/index.tsx +229 -0
- package/src/search-results/components/book-packaging-entry/wl-sidebar.tsx +162 -0
- package/src/search-results/components/excursions/day-by-day-excursions.tsx +6 -2
- package/src/search-results/components/excursions/excursion-results.tsx +1 -1
- package/src/search-results/components/flight/flight-selection/independent-flight-selection.tsx +12 -3
- package/src/search-results/components/group-tour/group-tour-card.tsx +1 -1
- package/src/search-results/components/group-tour/group-tour-results.tsx +1 -1
- package/src/search-results/components/hotel/hotel-accommodation-results.tsx +6 -3
- package/src/search-results/components/itinerary/full-itinerary.tsx +1 -1
- package/src/search-results/components/itinerary/index.tsx +13 -12
- package/src/search-results/components/search-results-container/flight-search-results.tsx +1 -1
- package/src/search-results/components/search-results-container/search-results-container.tsx +280 -217
- package/src/search-results/components/spinner/spinner.tsx +12 -4
- package/src/search-results/store/search-results-slice.ts +22 -2
- package/src/search-results/types.ts +4 -0
- package/src/shared/booking/booking-panel.tsx +25 -0
- package/src/shared/booking/shared-confirmation.tsx +105 -0
- package/src/shared/booking/shared-sidebar.tsx +432 -0
- package/src/shared/booking/step-indicators.tsx +30 -0
- package/src/shared/booking/summary.tsx +380 -0
- package/src/shared/booking/travelers-form.tsx +870 -0
- package/src/shared/components/flyin/accommodation-flyin.tsx +3 -4
- package/src/shared/components/flyin/flights-flyin.tsx +1 -1
- package/src/shared/components/flyin/flyin.tsx +16 -9
- package/src/shared/components/flyin/group-tour-flyin.tsx +3 -4
- package/src/shared/components/flyin/packaging-flights-flyin.tsx +11 -4
- package/src/shared/components/icon.tsx +13 -0
- package/src/shared/translations/ar-SA.json +7 -1
- package/src/shared/translations/da-DK.json +7 -1
- package/src/shared/translations/de-DE.json +7 -1
- package/src/shared/translations/en-GB.json +8 -2
- package/src/shared/translations/es-ES.json +7 -1
- package/src/shared/translations/fr-BE.json +7 -1
- package/src/shared/translations/fr-FR.json +7 -1
- package/src/shared/translations/is-IS.json +7 -1
- package/src/shared/translations/it-IT.json +7 -1
- package/src/shared/translations/ja-JP.json +7 -1
- package/src/shared/translations/nl-BE.json +7 -1
- package/src/shared/translations/nl-NL.json +7 -1
- package/src/shared/translations/no-NO.json +7 -1
- package/src/shared/translations/pl-PL.json +7 -1
- package/src/shared/translations/pt-PT.json +7 -1
- package/src/shared/translations/sv-SE.json +7 -1
- package/src/shared/utils/booking-summary.tsx +46 -0
- package/src/shared/utils/localization-util.ts +8 -0
- package/src/shared/utils/tide-api-utils.ts +2 -2
- package/styles/components/_dropdown.scss +5 -0
- package/styles/components/_flyin.scss +43 -0
- package/styles/components/_loader.scss +82 -0
- package/styles/components/_search.scss +14 -2
- package/styles/content-blocks-variables.scss +14 -14
- /package/build/build-cjs/src/{booking-wizard/components → shared/booking}/product-card.d.ts +0 -0
- /package/build/build-esm/src/{booking-wizard/components → shared/booking}/product-card.d.ts +0 -0
- /package/src/{booking-wizard/components → shared/booking}/product-card.tsx +0 -0
|
@@ -1,344 +1,349 @@
|
|
|
1
|
-
|
|
2
|
-
import { ServiceType } from '@qite/tide-client';
|
|
3
|
-
import { compact, isEmpty } from 'lodash';
|
|
4
|
-
import React, { useState } from 'react';
|
|
5
|
-
import { useSelector } from 'react-redux';
|
|
6
|
-
import { buildClassName } from '../../../shared/utils/class-util';
|
|
7
|
-
import { formatPrice } from '../../../shared/utils/localization-util';
|
|
8
|
-
import ProductCard from '../../components/product-card';
|
|
9
|
-
import { selectAgentAdressId, selectCurrencyCode, selectTranslations } from '../booking/selectors';
|
|
10
|
-
import SidebarFlight from './sidebar-flight';
|
|
11
|
-
import { getDatePeriodText, getPaxTypeTranslation } from './sidebar-util';
|
|
12
|
-
import { PricePerPaxType } from '../../types';
|
|
13
|
-
import { selectAgentId } from '../travelers-form/travelers-form-slice';
|
|
1
|
+
// This one is no longer used, use sidebar in shared folder. temp kept for reference.
|
|
14
2
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
remainingAmountText?: string;
|
|
28
|
-
includedCosts?: BookingPriceDetail[];
|
|
29
|
-
extraCosts?: BookingPriceDetail[];
|
|
30
|
-
deposit?: number;
|
|
31
|
-
accommodations?: BookingPackageRoom[];
|
|
32
|
-
includedServiceTypes?: number[];
|
|
33
|
-
isOnRequest?: boolean;
|
|
34
|
-
headerComponent?: JSX.Element;
|
|
35
|
-
footerComponent?: JSX.Element;
|
|
36
|
-
loaderComponent?: JSX.Element;
|
|
37
|
-
isUnavailable?: boolean;
|
|
38
|
-
basePricePerPaxType?: PricePerPaxType[];
|
|
39
|
-
seperateExtraPricePerPaxType?: PricePerPaxType[];
|
|
40
|
-
}
|
|
3
|
+
// import { BookingPackageFlightMetaData, BookingPackageRoom, BookingPriceDetail } from '@qite/tide-client/build/types';
|
|
4
|
+
// import { ServiceType } from '@qite/tide-client';
|
|
5
|
+
// import { compact, isEmpty } from 'lodash';
|
|
6
|
+
// import React, { useState } from 'react';
|
|
7
|
+
// import { useSelector } from 'react-redux';
|
|
8
|
+
// import { buildClassName } from '../../../shared/utils/class-util';
|
|
9
|
+
// import { formatPrice } from '../../../shared/utils/localization-util';
|
|
10
|
+
// import { selectAgentAdressId, selectCurrencyCode } from '../booking/selectors';
|
|
11
|
+
// import SidebarFlight from './sidebar-flight';
|
|
12
|
+
// import { getDatePeriodText, getPaxTypeTranslation } from './sidebar-util';
|
|
13
|
+
// import { PricePerPaxType } from '../../types';
|
|
14
|
+
// import ProductCard from '../../../shared/booking/product-card';
|
|
41
15
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const isAgent = useSelector(selectAgentAdressId);
|
|
16
|
+
// interface SidebarProps {
|
|
17
|
+
// productName: string;
|
|
18
|
+
// thumbnailUrl?: string;
|
|
19
|
+
// isLoading: boolean;
|
|
20
|
+
// travelerRooms?: string[];
|
|
21
|
+
// startDateText?: string;
|
|
22
|
+
// endDateText?: string;
|
|
23
|
+
// departureFlightMetaData?: BookingPackageFlightMetaData;
|
|
24
|
+
// returnFlightMetaData?: BookingPackageFlightMetaData;
|
|
25
|
+
// basePrice?: number;
|
|
26
|
+
// commission?: number;
|
|
27
|
+
// totalPrice?: number;
|
|
28
|
+
// remainingAmountText?: string;
|
|
29
|
+
// includedCosts?: BookingPriceDetail[];
|
|
30
|
+
// extraCosts?: BookingPriceDetail[];
|
|
31
|
+
// deposit?: number;
|
|
32
|
+
// accommodations?: BookingPackageRoom[];
|
|
33
|
+
// includedServiceTypes?: number[];
|
|
34
|
+
// isOnRequest?: boolean;
|
|
35
|
+
// headerComponent?: JSX.Element;
|
|
36
|
+
// footerComponent?: JSX.Element;
|
|
37
|
+
// loaderComponent?: JSX.Element;
|
|
38
|
+
// isUnavailable?: boolean;
|
|
39
|
+
// basePricePerPaxType?: PricePerPaxType[];
|
|
40
|
+
// seperateExtraPricePerPaxType?: PricePerPaxType[];
|
|
41
|
+
// translations: any;
|
|
42
|
+
// agent?: number;
|
|
43
|
+
// }
|
|
71
44
|
|
|
72
|
-
|
|
73
|
-
|
|
45
|
+
// const Sidebar: React.FC<SidebarProps> = ({
|
|
46
|
+
// productName,
|
|
47
|
+
// thumbnailUrl,
|
|
48
|
+
// isLoading,
|
|
49
|
+
// travelerRooms,
|
|
50
|
+
// startDateText,
|
|
51
|
+
// endDateText,
|
|
52
|
+
// departureFlightMetaData,
|
|
53
|
+
// returnFlightMetaData,
|
|
54
|
+
// basePrice,
|
|
55
|
+
// commission,
|
|
56
|
+
// totalPrice,
|
|
57
|
+
// includedCosts,
|
|
58
|
+
// extraCosts,
|
|
59
|
+
// deposit,
|
|
60
|
+
// accommodations,
|
|
61
|
+
// includedServiceTypes,
|
|
62
|
+
// isOnRequest,
|
|
63
|
+
// headerComponent,
|
|
64
|
+
// footerComponent,
|
|
65
|
+
// loaderComponent,
|
|
66
|
+
// isUnavailable,
|
|
67
|
+
// basePricePerPaxType,
|
|
68
|
+
// seperateExtraPricePerPaxType,
|
|
69
|
+
// translations,
|
|
70
|
+
// agent
|
|
71
|
+
// }) => {
|
|
72
|
+
// const [active, setActive] = useState<boolean>(false);
|
|
73
|
+
// const currencyCode = useSelector(selectCurrencyCode);
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
// const canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !isEmpty(includedCosts) || !isEmpty(extraCosts);
|
|
76
|
+
// const canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
};
|
|
78
|
+
// const remainingAmount = Number(((totalPrice ?? 0) - (deposit ?? 0)).toFixed(2));
|
|
79
|
+
// const isFlightOnly = includedServiceTypes?.length === 1 && includedServiceTypes.includes(ServiceType.flight);
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
// const handleToggleClick = () => {
|
|
82
|
+
// setActive(!active);
|
|
83
|
+
// };
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
{!isUnavailable ? (
|
|
90
|
-
<div className="pricing-summary__wrapper">
|
|
91
|
-
<div className={`pricing-summary__region ${!isLoading ? 'pricing-summary__region--fade-in' : ''}`}>
|
|
92
|
-
<div className="pricing-summary__group">
|
|
93
|
-
<h6 className="pricing-summary__title">{translations.SIDEBAR.TRAVEL_INFO}</h6>
|
|
94
|
-
{!isEmpty(travelerRooms) &&
|
|
95
|
-
travelerRooms?.map((room, rIndex) => (
|
|
96
|
-
<div className="pricing-summary__row" key={rIndex}>
|
|
97
|
-
<div className="pricing-summary__property">
|
|
98
|
-
{travelerRooms.length > 1 && `${translations.SHARED.ROOM} ${rIndex + 1}`}
|
|
99
|
-
{travelerRooms.length === 1 && translations.ROOM_OPTIONS_FORM.TRAVELER_GROUP}
|
|
100
|
-
</div>
|
|
85
|
+
// return (
|
|
86
|
+
// <div className={buildClassName(['booking__sidebar', active && 'booking__sidebar--active'])}>
|
|
87
|
+
// {headerComponent}
|
|
101
88
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
89
|
+
// <div className="booking__sidebar-frame">
|
|
90
|
+
// <ProductCard productName={productName} thumbnailUrl={thumbnailUrl} handleToggleClick={handleToggleClick} />
|
|
91
|
+
// <div className="pricing-summary">
|
|
92
|
+
// {!isUnavailable ? (
|
|
93
|
+
// <div className="pricing-summary__wrapper">
|
|
94
|
+
// <div className={`pricing-summary__region ${!isLoading ? 'pricing-summary__region--fade-in' : ''}`}>
|
|
95
|
+
// <div className="pricing-summary__group">
|
|
96
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.TRAVEL_INFO}</h6>
|
|
97
|
+
// {!isEmpty(travelerRooms) &&
|
|
98
|
+
// travelerRooms?.map((room, rIndex) => (
|
|
99
|
+
// <div className="pricing-summary__row" key={rIndex}>
|
|
100
|
+
// <div className="pricing-summary__property">
|
|
101
|
+
// {travelerRooms.length > 1 && `${translations.SHARED.ROOM} ${rIndex + 1}`}
|
|
102
|
+
// {travelerRooms.length === 1 && translations.ROOM_OPTIONS_FORM.TRAVELER_GROUP}
|
|
103
|
+
// </div>
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{startDateText && endDateText ? translations.SIDEBAR.DEPARTURE : translations.SIDEBAR.DEPARTURE_SINGLE}
|
|
110
|
-
</div>
|
|
111
|
-
<div className="pricing-summary__value">{startDateText}</div>
|
|
112
|
-
</div>
|
|
113
|
-
)}
|
|
105
|
+
// <div className="pricing-summary__value">{room}</div>
|
|
106
|
+
// </div>
|
|
107
|
+
// ))}
|
|
114
108
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
109
|
+
// {startDateText && (
|
|
110
|
+
// <div className="pricing-summary__row">
|
|
111
|
+
// <div className="pricing-summary__property">
|
|
112
|
+
// {startDateText && endDateText ? translations.SIDEBAR.DEPARTURE : translations.SIDEBAR.DEPARTURE_SINGLE}
|
|
113
|
+
// </div>
|
|
114
|
+
// <div className="pricing-summary__value">{startDateText}</div>
|
|
115
|
+
// </div>
|
|
116
|
+
// )}
|
|
122
117
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
// {endDateText && (
|
|
119
|
+
// <div className="pricing-summary__row">
|
|
120
|
+
// <div className="pricing-summary__property">{translations.SIDEBAR.ARRIVAL}</div>
|
|
121
|
+
// <div className="pricing-summary__value">{endDateText}</div>
|
|
122
|
+
// </div>
|
|
123
|
+
// )}
|
|
124
|
+
// </div>
|
|
127
125
|
|
|
128
|
-
|
|
126
|
+
// {isLoading && loaderComponent}
|
|
127
|
+
// {!isLoading && departureFlightMetaData && (
|
|
128
|
+
// <SidebarFlight title={translations.SIDEBAR.DEPARTURE_FLIGHT} flightMetaData={departureFlightMetaData} translations={translations} />
|
|
129
|
+
// )}
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
{accommodations.map((accommodation) => {
|
|
134
|
-
let option = accommodation.options.find((x) => x.isSelected);
|
|
135
|
-
return (
|
|
136
|
-
<div key={accommodation.index}>
|
|
137
|
-
<div className="pricing-summary__row">
|
|
138
|
-
<div className="pricing-summary__property">
|
|
139
|
-
{option?.accommodationName}
|
|
140
|
-
{isOnRequest ? ` (${translations.SIDEBAR.ON_REQUEST})` : ''}
|
|
141
|
-
{option?.isOnRequest ? ` (${translations.SIDEBAR.ON_REQUEST})` : ''}
|
|
142
|
-
</div>
|
|
143
|
-
{/*<div className="pricing-summary__value">
|
|
144
|
-
{option && option.price > 0 && formatPrice(option?.price)}
|
|
145
|
-
</div>*/}
|
|
146
|
-
</div>
|
|
147
|
-
<div className="pricing-summary__row">
|
|
148
|
-
<div className="price-summarty__property">{option?.regimeName}</div>
|
|
149
|
-
<div className="price-summary__value">{!isFlightOnly && getDatePeriodText(translations, option?.from, option?.to, true)}</div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
);
|
|
153
|
-
})}
|
|
154
|
-
</div>
|
|
155
|
-
)}
|
|
156
|
-
</div>
|
|
131
|
+
// {!isLoading && returnFlightMetaData && (
|
|
132
|
+
// <SidebarFlight title={translations.SIDEBAR.ARRIVAL_FLIGHT} flightMetaData={returnFlightMetaData} translations={translations} />
|
|
133
|
+
// )}
|
|
157
134
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
</React.Fragment>
|
|
186
|
-
))}
|
|
187
|
-
</div>
|
|
188
|
-
)}
|
|
189
|
-
{!isEmpty(includedCosts) && (
|
|
190
|
-
<div className="pricing-summary__group">
|
|
191
|
-
<h6 className="pricing-summary__title">{translations.SIDEBAR.INCLUDED_COSTS}</h6>
|
|
192
|
-
{includedCosts?.map((priceDetail, index) => (
|
|
193
|
-
<React.Fragment key={compact([priceDetail.productCode, priceDetail.accommodationCode, index]).join('_')}>
|
|
194
|
-
<div className="pricing-summary__row">
|
|
195
|
-
<div className="pricing-summary__property">{priceDetail.productName}</div>
|
|
196
|
-
{priceDetail.showPrice && (
|
|
197
|
-
<div className="pricing-summary__value">{formatPrice(priceDetail.price * priceDetail.amount, currencyCode)}</div>
|
|
198
|
-
)}
|
|
199
|
-
</div>
|
|
200
|
-
<div className="pricing-summary__row">
|
|
201
|
-
<div className="price-summary__property">{priceDetail.accommodationName ?? priceDetail.accommodationCode}</div>
|
|
202
|
-
</div>
|
|
203
|
-
</React.Fragment>
|
|
204
|
-
))}
|
|
205
|
-
</div>
|
|
206
|
-
)}
|
|
207
|
-
{!isEmpty(extraCosts) && (
|
|
208
|
-
<div className="pricing-summary__group">
|
|
209
|
-
<h6 className="pricing-summary__title">{translations.SIDEBAR.EXTRA_COSTS}</h6>
|
|
210
|
-
{extraCosts?.map((priceDetail, index) => (
|
|
211
|
-
<React.Fragment key={compact([priceDetail.productCode, priceDetail.accommodationCode, index]).join('_')}>
|
|
212
|
-
<div className="pricing-summary__row">
|
|
213
|
-
<div className="pricing-summary__property">{priceDetail.productName}</div>
|
|
214
|
-
{priceDetail.showPrice && (
|
|
215
|
-
<div className="pricing-summary__value">{formatPrice(priceDetail.price * priceDetail.amount, currencyCode)}</div>
|
|
216
|
-
)}
|
|
217
|
-
</div>
|
|
218
|
-
<div className="pricing-summary__row">
|
|
219
|
-
<div className="pricing-summary__property">{priceDetail.accommodationName ?? priceDetail.accommodationCode}</div>
|
|
220
|
-
</div>
|
|
221
|
-
{seperateExtraPricePerPaxType &&
|
|
222
|
-
seperateExtraPricePerPaxType.map((ppt, index) => (
|
|
223
|
-
<React.Fragment key={`${ppt.paxType}-${index}`}>
|
|
224
|
-
<div className="pricing-summary__row">
|
|
225
|
-
<div className="pricing-summary__property">
|
|
226
|
-
{ppt.numberOfPax} {getPaxTypeTranslation(translations, ppt.paxType, ppt.numberOfPax)}
|
|
227
|
-
</div>
|
|
228
|
-
<div className="pricing-summary__value">{formatPrice(ppt.pricePerPaxType, currencyCode)}</div>
|
|
229
|
-
</div>
|
|
230
|
-
{ppt.details.map((detail, dIndex) => (
|
|
231
|
-
<div className="pricing-summary__row pricing-summary__row--sub" key={`${ppt.paxType}-${index}-${dIndex}`}>
|
|
232
|
-
<div className="pricing-summary__property">
|
|
233
|
-
{detail.numberOfPax}x {detail.description}
|
|
234
|
-
</div>
|
|
235
|
-
<div className="pricing-summary__value">{formatPrice(detail.price / detail.numberOfPax, currencyCode)}</div>
|
|
236
|
-
</div>
|
|
237
|
-
))}
|
|
238
|
-
</React.Fragment>
|
|
239
|
-
))}
|
|
240
|
-
</React.Fragment>
|
|
241
|
-
))}
|
|
242
|
-
</div>
|
|
243
|
-
)}
|
|
244
|
-
</div>
|
|
245
|
-
)}
|
|
246
|
-
</div>
|
|
247
|
-
) : (
|
|
248
|
-
<div className="pricing-summary__region">
|
|
249
|
-
<h6 className="pricing-summary__title">{translations.SIDEBAR.PACKAGE_NOT_AVAILABLE}</h6>
|
|
250
|
-
</div>
|
|
251
|
-
)}
|
|
135
|
+
// {accommodations && (
|
|
136
|
+
// <div className="pricing-summary__group">
|
|
137
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.ACCOMMODATION}</h6>
|
|
138
|
+
// {accommodations.map((accommodation) => {
|
|
139
|
+
// let option = accommodation.options.find((x) => x.isSelected);
|
|
140
|
+
// return (
|
|
141
|
+
// <div key={accommodation.index}>
|
|
142
|
+
// <div className="pricing-summary__row">
|
|
143
|
+
// <div className="pricing-summary__property">
|
|
144
|
+
// {option?.accommodationName}
|
|
145
|
+
// {isOnRequest ? ` (${translations.SIDEBAR.ON_REQUEST})` : ''}
|
|
146
|
+
// {option?.isOnRequest ? ` (${translations.SIDEBAR.ON_REQUEST})` : ''}
|
|
147
|
+
// </div>
|
|
148
|
+
// {/*<div className="pricing-summary__value">
|
|
149
|
+
// {option && option.price > 0 && formatPrice(option?.price)}
|
|
150
|
+
// </div>*/}
|
|
151
|
+
// </div>
|
|
152
|
+
// <div className="pricing-summary__row">
|
|
153
|
+
// <div className="price-summarty__property">{option?.regimeName}</div>
|
|
154
|
+
// <div className="price-summary__value">{!isFlightOnly && getDatePeriodText(translations, option?.from, option?.to, true)}</div>
|
|
155
|
+
// </div>
|
|
156
|
+
// </div>
|
|
157
|
+
// );
|
|
158
|
+
// })}
|
|
159
|
+
// </div>
|
|
160
|
+
// )}
|
|
161
|
+
// </div>
|
|
252
162
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
163
|
+
// {!isLoading && canShowPriceBreakdownSection && (
|
|
164
|
+
// <div className={`pricing-summary__region ${!isLoading ? 'pricing-summary__region--fade-in' : ''}`}>
|
|
165
|
+
// {basePrice !== undefined && basePrice > 0 && (
|
|
166
|
+
// <div className="pricing-summary__group">
|
|
167
|
+
// <div className="pricing-summary__row">
|
|
168
|
+
// <div className="pricing-summary__property">
|
|
169
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.BASE_PRICE}</h6>
|
|
170
|
+
// </div>
|
|
171
|
+
// <div className="pricing-summary__value">{formatPrice(basePrice, currencyCode)}</div>
|
|
172
|
+
// </div>
|
|
173
|
+
// {basePricePerPaxType &&
|
|
174
|
+
// basePricePerPaxType.map((ppt, index) => (
|
|
175
|
+
// <React.Fragment key={`${ppt.paxType}-${index}`}>
|
|
176
|
+
// <div className="pricing-summary__row">
|
|
177
|
+
// <div className="pricing-summary__property">
|
|
178
|
+
// {ppt.numberOfPax} {getPaxTypeTranslation(translations, ppt.paxType, ppt.numberOfPax)}
|
|
179
|
+
// </div>
|
|
180
|
+
// <div className="pricing-summary__value">{formatPrice(ppt.pricePerPaxType, currencyCode)}</div>
|
|
181
|
+
// </div>
|
|
182
|
+
// {ppt.details.map((detail, dIndex) => (
|
|
183
|
+
// <div className="pricing-summary__row pricing-summary__row--sub" key={`${ppt.paxType}-${index}-${dIndex}`}>
|
|
184
|
+
// <div className="pricing-summary__property">
|
|
185
|
+
// {detail.numberOfPax}x {detail.description}
|
|
186
|
+
// </div>
|
|
187
|
+
// <div className="pricing-summary__value">{formatPrice(detail.price / detail.numberOfPax, currencyCode)}</div>
|
|
188
|
+
// </div>
|
|
189
|
+
// ))}
|
|
190
|
+
// </React.Fragment>
|
|
191
|
+
// ))}
|
|
192
|
+
// </div>
|
|
193
|
+
// )}
|
|
194
|
+
// {!isEmpty(includedCosts) && (
|
|
195
|
+
// <div className="pricing-summary__group">
|
|
196
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.INCLUDED_COSTS}</h6>
|
|
197
|
+
// {includedCosts?.map((priceDetail, index) => (
|
|
198
|
+
// <React.Fragment key={compact([priceDetail.productCode, priceDetail.accommodationCode, index]).join('_')}>
|
|
199
|
+
// <div className="pricing-summary__row">
|
|
200
|
+
// <div className="pricing-summary__property">{priceDetail.productName}</div>
|
|
201
|
+
// {priceDetail.showPrice && (
|
|
202
|
+
// <div className="pricing-summary__value">{formatPrice(priceDetail.price * priceDetail.amount, currencyCode)}</div>
|
|
203
|
+
// )}
|
|
204
|
+
// </div>
|
|
205
|
+
// <div className="pricing-summary__row">
|
|
206
|
+
// <div className="price-summary__property">{priceDetail.accommodationName ?? priceDetail.accommodationCode}</div>
|
|
207
|
+
// </div>
|
|
208
|
+
// </React.Fragment>
|
|
209
|
+
// ))}
|
|
210
|
+
// </div>
|
|
211
|
+
// )}
|
|
212
|
+
// {!isEmpty(extraCosts) && (
|
|
213
|
+
// <div className="pricing-summary__group">
|
|
214
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.EXTRA_COSTS}</h6>
|
|
215
|
+
// {extraCosts?.map((priceDetail, index) => (
|
|
216
|
+
// <React.Fragment key={compact([priceDetail.productCode, priceDetail.accommodationCode, index]).join('_')}>
|
|
217
|
+
// <div className="pricing-summary__row">
|
|
218
|
+
// <div className="pricing-summary__property">{priceDetail.productName}</div>
|
|
219
|
+
// {priceDetail.showPrice && (
|
|
220
|
+
// <div className="pricing-summary__value">{formatPrice(priceDetail.price * priceDetail.amount, currencyCode)}</div>
|
|
221
|
+
// )}
|
|
222
|
+
// </div>
|
|
223
|
+
// <div className="pricing-summary__row">
|
|
224
|
+
// <div className="pricing-summary__property">{priceDetail.accommodationName ?? priceDetail.accommodationCode}</div>
|
|
225
|
+
// </div>
|
|
226
|
+
// {seperateExtraPricePerPaxType &&
|
|
227
|
+
// seperateExtraPricePerPaxType.map((ppt, index) => (
|
|
228
|
+
// <React.Fragment key={`${ppt.paxType}-${index}`}>
|
|
229
|
+
// <div className="pricing-summary__row">
|
|
230
|
+
// <div className="pricing-summary__property">
|
|
231
|
+
// {ppt.numberOfPax} {getPaxTypeTranslation(translations, ppt.paxType, ppt.numberOfPax)}
|
|
232
|
+
// </div>
|
|
233
|
+
// <div className="pricing-summary__value">{formatPrice(ppt.pricePerPaxType, currencyCode)}</div>
|
|
234
|
+
// </div>
|
|
235
|
+
// {ppt.details.map((detail, dIndex) => (
|
|
236
|
+
// <div className="pricing-summary__row pricing-summary__row--sub" key={`${ppt.paxType}-${index}-${dIndex}`}>
|
|
237
|
+
// <div className="pricing-summary__property">
|
|
238
|
+
// {detail.numberOfPax}x {detail.description}
|
|
239
|
+
// </div>
|
|
240
|
+
// <div className="pricing-summary__value">{formatPrice(detail.price / detail.numberOfPax, currencyCode)}</div>
|
|
241
|
+
// </div>
|
|
242
|
+
// ))}
|
|
243
|
+
// </React.Fragment>
|
|
244
|
+
// ))}
|
|
245
|
+
// </React.Fragment>
|
|
246
|
+
// ))}
|
|
247
|
+
// </div>
|
|
248
|
+
// )}
|
|
249
|
+
// </div>
|
|
250
|
+
// )}
|
|
251
|
+
// </div>
|
|
252
|
+
// ) : (
|
|
253
|
+
// <div className="pricing-summary__region">
|
|
254
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.PACKAGE_NOT_AVAILABLE}</h6>
|
|
255
|
+
// </div>
|
|
256
|
+
// )}
|
|
285
257
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
</div>
|
|
319
|
-
)}
|
|
320
|
-
{totalPrice !== undefined && totalPrice > 0 && (
|
|
321
|
-
<div className="pricing-summary__row pricing-summary__row--total-price">
|
|
322
|
-
<div className="pricing-summary__property">
|
|
323
|
-
<h6 className="pricing-summary__title">{translations.SHARED.TOTAL_PRICE}</h6>
|
|
324
|
-
</div>
|
|
258
|
+
// {!isLoading && canShowTotalPriceSection && !isUnavailable && (
|
|
259
|
+
// <div className={`pricing-summary__region pricing-summary__region--pricing ${!isLoading ? 'pricing-summary__region--fade-in' : ''}`}>
|
|
260
|
+
// {deposit && remainingAmount > 0 ? (
|
|
261
|
+
// <div className="pricing-summary__group">
|
|
262
|
+
// {agent && (
|
|
263
|
+
// <div className="pricing-summary__row pricing-summary__row--total-price">
|
|
264
|
+
// <div className="pricing-summary__property">
|
|
265
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.COMMISSION}</h6>
|
|
266
|
+
// </div>
|
|
267
|
+
// <div className="pricing-summary__value">
|
|
268
|
+
// <div className="pricing">
|
|
269
|
+
// <div className="pricing__price">{formatPrice(commission ?? 0, currencyCode)}</div>
|
|
270
|
+
// </div>
|
|
271
|
+
// </div>
|
|
272
|
+
// </div>
|
|
273
|
+
// )}
|
|
274
|
+
// {totalPrice !== undefined && totalPrice > 0 && (
|
|
275
|
+
// <div className="pricing-summary__row pricing-summary__row--total-price">
|
|
276
|
+
// <div className="pricing-summary__property">
|
|
277
|
+
// <h6 className="pricing-summary__title">{translations.SHARED.TOTAL_PRICE}</h6>
|
|
278
|
+
// </div>
|
|
279
|
+
// <div className="pricing-summary__value">
|
|
280
|
+
// <div className="pricing">
|
|
281
|
+
// <div className="pricing__price">{formatPrice(totalPrice, currencyCode)}</div>
|
|
282
|
+
// </div>
|
|
283
|
+
// </div>
|
|
284
|
+
// </div>
|
|
285
|
+
// )}
|
|
286
|
+
// <div className="pricing-summary__row">
|
|
287
|
+
// <div className="pricing-summary__property">
|
|
288
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.DEPOSIT}</h6>
|
|
289
|
+
// </div>
|
|
325
290
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
291
|
+
// <div className="pricing-summary__value">
|
|
292
|
+
// <div className="pricing">
|
|
293
|
+
// <div className="pricing__price">{formatPrice(deposit, currencyCode)}</div>
|
|
294
|
+
// </div>
|
|
295
|
+
// </div>
|
|
296
|
+
// </div>
|
|
297
|
+
// <div className="pricing-summary__row">
|
|
298
|
+
// <small>
|
|
299
|
+
// <em>
|
|
300
|
+
// {translations.SIDEBAR.DEPOSIT_TEXT1}
|
|
301
|
+
// <strong>{translations.SIDEBAR.DEPOSIT_TEXT2}</strong>
|
|
302
|
+
// {translations.SIDEBAR.DEPOSIT_TEXT3}
|
|
303
|
+
// {formatPrice(remainingAmount, currencyCode)}
|
|
304
|
+
// {translations.SIDEBAR.DEPOSIT_TEXT4}
|
|
305
|
+
// <strong>{translations.SIDEBAR.DEPOSIT_TEXT5}</strong>
|
|
306
|
+
// {translations.SIDEBAR.DEPOSIT_TEXT6}
|
|
307
|
+
// </em>
|
|
308
|
+
// </small>
|
|
309
|
+
// </div>
|
|
310
|
+
// </div>
|
|
311
|
+
// ) : (
|
|
312
|
+
// <div className="pricing-summary__group">
|
|
313
|
+
// {agent && (
|
|
314
|
+
// <div className="pricing-summary__row pricing-summary__row--total-price">
|
|
315
|
+
// <div className="pricing-summary__property">
|
|
316
|
+
// <h6 className="pricing-summary__title">{translations.SIDEBAR.COMMISSION}</h6>
|
|
317
|
+
// </div>
|
|
318
|
+
// <div className="pricing-summary__value">
|
|
319
|
+
// <div className="pricing">
|
|
320
|
+
// <div className="pricing__price">{formatPrice(commission ?? 0, currencyCode)}</div>
|
|
321
|
+
// </div>
|
|
322
|
+
// </div>
|
|
323
|
+
// </div>
|
|
324
|
+
// )}
|
|
325
|
+
// {totalPrice !== undefined && totalPrice > 0 && (
|
|
326
|
+
// <div className="pricing-summary__row pricing-summary__row--total-price">
|
|
327
|
+
// <div className="pricing-summary__property">
|
|
328
|
+
// <h6 className="pricing-summary__title">{translations.SHARED.TOTAL_PRICE}</h6>
|
|
329
|
+
// </div>
|
|
343
330
|
|
|
344
|
-
|
|
331
|
+
// <div className="pricing-summary__value">
|
|
332
|
+
// <div className="pricing">
|
|
333
|
+
// <div className="pricing__price">{formatPrice(totalPrice, currencyCode)}</div>
|
|
334
|
+
// </div>
|
|
335
|
+
// </div>
|
|
336
|
+
// </div>
|
|
337
|
+
// )}
|
|
338
|
+
// </div>
|
|
339
|
+
// )}
|
|
340
|
+
// </div>
|
|
341
|
+
// )}
|
|
342
|
+
// {footerComponent}
|
|
343
|
+
// </div>
|
|
344
|
+
// </div>
|
|
345
|
+
// </div>
|
|
346
|
+
// );
|
|
347
|
+
// };
|
|
348
|
+
|
|
349
|
+
// export default Sidebar;
|