@bytebrand/fe-ui-core 4.2.195 → 4.2.197
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/package.json
CHANGED
package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx
CHANGED
|
@@ -21,7 +21,7 @@ interface IOrderStatusSection {
|
|
|
21
21
|
isFetching: boolean;
|
|
22
22
|
withAdditionalInfo?: boolean; // for using on /account/my-order.
|
|
23
23
|
orderedCars: any[]; // TODO: create interface for orderedCars, when the object is formatted by the backend
|
|
24
|
-
wonCars
|
|
24
|
+
wonCars?: any[];
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const OrderStatusSection = ({
|
|
@@ -116,7 +116,7 @@ const OrderStatusSection = ({
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
const carPriceWithWarrantyTitle = (warranty: { warrantyPackage: string, warrantyCost: number, warrantyPeriod: number }) => {
|
|
119
|
-
if (!warranty.warrantyCost) {
|
|
119
|
+
if (!warranty || !warranty.warrantyCost) {
|
|
120
120
|
return t('MyOrderPage:carPrice');
|
|
121
121
|
}
|
|
122
122
|
const warrantyPackage = t(`MyOrderPage:${warranty.warrantyPackage}`);
|
|
@@ -160,7 +160,7 @@ const OrderStatusSection = ({
|
|
|
160
160
|
|
|
161
161
|
const transformedDeliveryDate = !!deliveryDate ? `${t('MyOrderPage:deliveredOn')} ${fromUTCToDateString(deliveryDate)}` : null;
|
|
162
162
|
|
|
163
|
-
const currentSalesPriceWithWarranty = !!warranty.warrantyCost ? currentSalesPrice + warranty.warrantyCost : currentSalesPrice;
|
|
163
|
+
const currentSalesPriceWithWarranty = !!warranty && !!warranty.warrantyCost ? currentSalesPrice + warranty.warrantyCost : currentSalesPrice;
|
|
164
164
|
|
|
165
165
|
const additionalOrderData = {
|
|
166
166
|
addressData: [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, FunctionComponent } from 'react';
|
|
2
2
|
import _get from 'lodash/get';
|
|
3
|
-
import { Hidden
|
|
3
|
+
import { Hidden } from 'react-grid-system';
|
|
4
|
+
import { isMobileOnly } from 'react-device-detect';
|
|
4
5
|
import PriceContent from './partials/PriceContent';
|
|
5
6
|
import Title from './partials/Title';
|
|
6
7
|
import Price from './partials/Price';
|
|
@@ -148,13 +149,13 @@ const VehicleDetailedSidebar: FunctionComponent<IVehicleDetailedSidebarProps> =
|
|
|
148
149
|
<Title {...titleProps} />
|
|
149
150
|
<Price {...priceProps} />
|
|
150
151
|
<Price {...priceProps} isSticky={true} />
|
|
151
|
-
|
|
152
|
+
{isMobileOnly && (
|
|
152
153
|
<div
|
|
153
154
|
ref={ref}
|
|
154
155
|
data-locale='de-DE'
|
|
155
156
|
data-template-id='5419b6a8b0d04a076446a9ad'
|
|
156
157
|
data-businessunit-id='46edfd1c0000640005017f22'
|
|
157
|
-
data-style-height='
|
|
158
|
+
data-style-height='32px'
|
|
158
159
|
data-style-width='100%'
|
|
159
160
|
data-theme='light'
|
|
160
161
|
data-style-alignment='center'
|
|
@@ -167,7 +168,7 @@ const VehicleDetailedSidebar: FunctionComponent<IVehicleDetailedSidebarProps> =
|
|
|
167
168
|
Trustpilot
|
|
168
169
|
</a>
|
|
169
170
|
</div>
|
|
170
|
-
|
|
171
|
+
)}
|
|
171
172
|
{props.children}
|
|
172
173
|
</div>
|
|
173
174
|
<div>
|
|
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import FormattedNumber from '../../FormattedNumber/FormattedNumber';
|
|
3
3
|
import { Slider } from '@mui/material';
|
|
4
4
|
import { isMobileOnly } from 'react-device-detect';
|
|
5
|
-
import { iOS } from '../../../framework/utils/CommonUtils';
|
|
6
5
|
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
|
7
6
|
|
|
8
7
|
interface IRangeProps {
|
|
@@ -41,7 +40,6 @@ const Range: React.FC<IRangeProps> = ({
|
|
|
41
40
|
maxFinancingFirstInstallment
|
|
42
41
|
}: IRangeProps) => {
|
|
43
42
|
const [rangeValue, setRangeValue] = useState<number | number[]>(0);
|
|
44
|
-
const isIOS = iOS();
|
|
45
43
|
|
|
46
44
|
useEffect(
|
|
47
45
|
() => {
|
|
@@ -51,9 +49,6 @@ const Range: React.FC<IRangeProps> = ({
|
|
|
51
49
|
)
|
|
52
50
|
|
|
53
51
|
const onChangeRange = (event: Event, value: number | number[]) => {
|
|
54
|
-
if (isIOS && event.type === 'mousedown') {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
52
|
setRangeValue(value);
|
|
58
53
|
onChange(event, value)
|
|
59
54
|
}
|