@qite/tide-booking-component 1.4.94 → 1.4.96
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
CHANGED
|
@@ -24747,6 +24747,7 @@ var Sidebar = function (_a) {
|
|
|
24747
24747
|
setActive = _b[1];
|
|
24748
24748
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
24749
24749
|
var currencyCode = reactRedux.useSelector(selectCurrencyCode);
|
|
24750
|
+
var isAgent = reactRedux.useSelector(selectAgentAdressId);
|
|
24750
24751
|
var canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !lodash.isEmpty(includedCosts) || !lodash.isEmpty(extraCosts);
|
|
24751
24752
|
var canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
|
|
24752
24753
|
var remainingAmount = Number(
|
|
@@ -25068,8 +25069,7 @@ var Sidebar = function (_a) {
|
|
|
25068
25069
|
? React__default['default'].createElement(
|
|
25069
25070
|
'div',
|
|
25070
25071
|
{ className: 'pricing-summary__group' },
|
|
25071
|
-
|
|
25072
|
-
commission > 0 &&
|
|
25072
|
+
isAgent &&
|
|
25073
25073
|
React__default['default'].createElement(
|
|
25074
25074
|
'div',
|
|
25075
25075
|
{ className: 'pricing-summary__row pricing-summary__row--total-price' },
|
|
@@ -25084,7 +25084,11 @@ var Sidebar = function (_a) {
|
|
|
25084
25084
|
React__default['default'].createElement(
|
|
25085
25085
|
'div',
|
|
25086
25086
|
{ className: 'pricing' },
|
|
25087
|
-
React__default['default'].createElement(
|
|
25087
|
+
React__default['default'].createElement(
|
|
25088
|
+
'div',
|
|
25089
|
+
{ className: 'pricing__price' },
|
|
25090
|
+
formatPrice$2(commission !== null && commission !== void 0 ? commission : 0, currencyCode)
|
|
25091
|
+
)
|
|
25088
25092
|
)
|
|
25089
25093
|
)
|
|
25090
25094
|
),
|
|
@@ -25149,6 +25153,29 @@ var Sidebar = function (_a) {
|
|
|
25149
25153
|
: React__default['default'].createElement(
|
|
25150
25154
|
'div',
|
|
25151
25155
|
{ className: 'pricing-summary__group' },
|
|
25156
|
+
isAgent &&
|
|
25157
|
+
React__default['default'].createElement(
|
|
25158
|
+
'div',
|
|
25159
|
+
{ className: 'pricing-summary__row pricing-summary__row--total-price' },
|
|
25160
|
+
React__default['default'].createElement(
|
|
25161
|
+
'div',
|
|
25162
|
+
{ className: 'pricing-summary__property' },
|
|
25163
|
+
React__default['default'].createElement('h6', { className: 'pricing-summary__title' }, translations.SHARED.COMMISSION)
|
|
25164
|
+
),
|
|
25165
|
+
React__default['default'].createElement(
|
|
25166
|
+
'div',
|
|
25167
|
+
{ className: 'pricing-summary__value' },
|
|
25168
|
+
React__default['default'].createElement(
|
|
25169
|
+
'div',
|
|
25170
|
+
{ className: 'pricing' },
|
|
25171
|
+
React__default['default'].createElement(
|
|
25172
|
+
'div',
|
|
25173
|
+
{ className: 'pricing__price' },
|
|
25174
|
+
formatPrice$2(commission !== null && commission !== void 0 ? commission : 0, currencyCode)
|
|
25175
|
+
)
|
|
25176
|
+
)
|
|
25177
|
+
)
|
|
25178
|
+
),
|
|
25152
25179
|
totalPrice !== undefined &&
|
|
25153
25180
|
totalPrice > 0 &&
|
|
25154
25181
|
React__default['default'].createElement(
|
package/build/build-esm/index.js
CHANGED
|
@@ -24696,6 +24696,7 @@ var Sidebar = function (_a) {
|
|
|
24696
24696
|
setActive = _b[1];
|
|
24697
24697
|
var translations = useSelector(selectTranslations);
|
|
24698
24698
|
var currencyCode = useSelector(selectCurrencyCode);
|
|
24699
|
+
var isAgent = useSelector(selectAgentAdressId);
|
|
24699
24700
|
var canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !isEmpty(includedCosts) || !isEmpty(extraCosts);
|
|
24700
24701
|
var canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
|
|
24701
24702
|
var remainingAmount = Number(
|
|
@@ -25004,8 +25005,7 @@ var Sidebar = function (_a) {
|
|
|
25004
25005
|
? React__default.createElement(
|
|
25005
25006
|
'div',
|
|
25006
25007
|
{ className: 'pricing-summary__group' },
|
|
25007
|
-
|
|
25008
|
-
commission > 0 &&
|
|
25008
|
+
isAgent &&
|
|
25009
25009
|
React__default.createElement(
|
|
25010
25010
|
'div',
|
|
25011
25011
|
{ className: 'pricing-summary__row pricing-summary__row--total-price' },
|
|
@@ -25020,7 +25020,11 @@ var Sidebar = function (_a) {
|
|
|
25020
25020
|
React__default.createElement(
|
|
25021
25021
|
'div',
|
|
25022
25022
|
{ className: 'pricing' },
|
|
25023
|
-
React__default.createElement(
|
|
25023
|
+
React__default.createElement(
|
|
25024
|
+
'div',
|
|
25025
|
+
{ className: 'pricing__price' },
|
|
25026
|
+
formatPrice$2(commission !== null && commission !== void 0 ? commission : 0, currencyCode)
|
|
25027
|
+
)
|
|
25024
25028
|
)
|
|
25025
25029
|
)
|
|
25026
25030
|
),
|
|
@@ -25085,6 +25089,29 @@ var Sidebar = function (_a) {
|
|
|
25085
25089
|
: React__default.createElement(
|
|
25086
25090
|
'div',
|
|
25087
25091
|
{ className: 'pricing-summary__group' },
|
|
25092
|
+
isAgent &&
|
|
25093
|
+
React__default.createElement(
|
|
25094
|
+
'div',
|
|
25095
|
+
{ className: 'pricing-summary__row pricing-summary__row--total-price' },
|
|
25096
|
+
React__default.createElement(
|
|
25097
|
+
'div',
|
|
25098
|
+
{ className: 'pricing-summary__property' },
|
|
25099
|
+
React__default.createElement('h6', { className: 'pricing-summary__title' }, translations.SHARED.COMMISSION)
|
|
25100
|
+
),
|
|
25101
|
+
React__default.createElement(
|
|
25102
|
+
'div',
|
|
25103
|
+
{ className: 'pricing-summary__value' },
|
|
25104
|
+
React__default.createElement(
|
|
25105
|
+
'div',
|
|
25106
|
+
{ className: 'pricing' },
|
|
25107
|
+
React__default.createElement(
|
|
25108
|
+
'div',
|
|
25109
|
+
{ className: 'pricing__price' },
|
|
25110
|
+
formatPrice$2(commission !== null && commission !== void 0 ? commission : 0, currencyCode)
|
|
25111
|
+
)
|
|
25112
|
+
)
|
|
25113
|
+
)
|
|
25114
|
+
),
|
|
25088
25115
|
totalPrice !== undefined &&
|
|
25089
25116
|
totalPrice > 0 &&
|
|
25090
25117
|
React__default.createElement(
|
package/package.json
CHANGED
|
@@ -6,10 +6,11 @@ import { useSelector } from 'react-redux';
|
|
|
6
6
|
import { buildClassName } from '../../../shared/utils/class-util';
|
|
7
7
|
import { formatPrice } from '../../../shared/utils/localization-util';
|
|
8
8
|
import ProductCard from '../../components/product-card';
|
|
9
|
-
import { selectCurrencyCode, selectTranslations } from '../booking/selectors';
|
|
9
|
+
import { selectAgentAdressId, selectCurrencyCode, selectTranslations } from '../booking/selectors';
|
|
10
10
|
import SidebarFlight from './sidebar-flight';
|
|
11
11
|
import { getDatePeriodText, getPaxTypeTranslation } from './sidebar-util';
|
|
12
12
|
import { PricePerPaxType } from '../../types';
|
|
13
|
+
import { selectAgentId } from '../travelers-form/travelers-form-slice';
|
|
13
14
|
|
|
14
15
|
interface SidebarProps {
|
|
15
16
|
productName: string;
|
|
@@ -66,6 +67,7 @@ const Sidebar: React.FC<SidebarProps> = ({
|
|
|
66
67
|
const [active, setActive] = useState<boolean>(false);
|
|
67
68
|
const translations = useSelector(selectTranslations);
|
|
68
69
|
const currencyCode = useSelector(selectCurrencyCode);
|
|
70
|
+
const isAgent = useSelector(selectAgentAdressId);
|
|
69
71
|
|
|
70
72
|
const canShowPriceBreakdownSection = Boolean(basePrice && basePrice > 0) || !isEmpty(includedCosts) || !isEmpty(extraCosts);
|
|
71
73
|
const canShowTotalPriceSection = Boolean(totalPrice && totalPrice > 0);
|
|
@@ -252,14 +254,14 @@ const Sidebar: React.FC<SidebarProps> = ({
|
|
|
252
254
|
<div className={`pricing-summary__region pricing-summary__region--pricing ${!isLoading ? 'pricing-summary__region--fade-in' : ''}`}>
|
|
253
255
|
{deposit && remainingAmount > 0 ? (
|
|
254
256
|
<div className="pricing-summary__group">
|
|
255
|
-
{
|
|
257
|
+
{isAgent && (
|
|
256
258
|
<div className="pricing-summary__row pricing-summary__row--total-price">
|
|
257
259
|
<div className="pricing-summary__property">
|
|
258
260
|
<h6 className="pricing-summary__title">{translations.SHARED.COMMISSION}</h6>
|
|
259
261
|
</div>
|
|
260
262
|
<div className="pricing-summary__value">
|
|
261
263
|
<div className="pricing">
|
|
262
|
-
<div className="pricing__price">{formatPrice(commission, currencyCode)}</div>
|
|
264
|
+
<div className="pricing__price">{formatPrice(commission ?? 0, currencyCode)}</div>
|
|
263
265
|
</div>
|
|
264
266
|
</div>
|
|
265
267
|
</div>
|
|
@@ -303,6 +305,18 @@ const Sidebar: React.FC<SidebarProps> = ({
|
|
|
303
305
|
</div>
|
|
304
306
|
) : (
|
|
305
307
|
<div className="pricing-summary__group">
|
|
308
|
+
{isAgent && (
|
|
309
|
+
<div className="pricing-summary__row pricing-summary__row--total-price">
|
|
310
|
+
<div className="pricing-summary__property">
|
|
311
|
+
<h6 className="pricing-summary__title">{translations.SHARED.COMMISSION}</h6>
|
|
312
|
+
</div>
|
|
313
|
+
<div className="pricing-summary__value">
|
|
314
|
+
<div className="pricing">
|
|
315
|
+
<div className="pricing__price">{formatPrice(commission ?? 0, currencyCode)}</div>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
)}
|
|
306
320
|
{totalPrice !== undefined && totalPrice > 0 && (
|
|
307
321
|
<div className="pricing-summary__row pricing-summary__row--total-price">
|
|
308
322
|
<div className="pricing-summary__property">
|