@bytebrand/fe-ui-core 4.2.74 → 4.2.75
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 +1 -1
- package/source/components/OfferDetailedSection/partials/PanelConfig.styl +0 -4
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +4 -1
- package/source/components/OfferPanel/OfferPanel.styl +2 -4
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +7 -2
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +27 -18
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +54 -15
package/package.json
CHANGED
|
@@ -73,6 +73,9 @@
|
|
|
73
73
|
.labelContent
|
|
74
74
|
flex: 1 1 auto
|
|
75
75
|
color: $grey-3;
|
|
76
|
+
@media (min-width: 990px) and (max-width: 1112px)
|
|
77
|
+
max-width: 230px
|
|
78
|
+
padding-right: 10px !important;
|
|
76
79
|
|
|
77
80
|
.icon
|
|
78
81
|
display: block
|
|
@@ -117,4 +120,4 @@
|
|
|
117
120
|
font-size: 12px;
|
|
118
121
|
|
|
119
122
|
.hidePlus
|
|
120
|
-
display: inline-block
|
|
123
|
+
display: inline-block
|
|
@@ -167,13 +167,14 @@
|
|
|
167
167
|
[class*='MuiFormControlLabel-root']
|
|
168
168
|
height: 20px
|
|
169
169
|
min-height: 0
|
|
170
|
-
margin-left:0
|
|
171
170
|
.labelText
|
|
172
171
|
font-size: 12px;
|
|
173
172
|
font-weight: normal;
|
|
174
173
|
|
|
175
174
|
[class*='labelContent']
|
|
176
175
|
font-size: 12px
|
|
176
|
+
+media-phone-up()
|
|
177
|
+
padding-right: 62px;
|
|
177
178
|
|
|
178
179
|
|
|
179
180
|
.checkBoxGroup
|
|
@@ -189,6 +190,3 @@
|
|
|
189
190
|
margin: 0
|
|
190
191
|
justify-content: space-between
|
|
191
192
|
width: 100%
|
|
192
|
-
|
|
193
|
-
[class*='MuiIconButton-root']
|
|
194
|
-
padding:5px!important
|
package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl
CHANGED
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
font-size: 14px
|
|
34
34
|
line-height: 20px
|
|
35
35
|
|
|
36
|
+
.adressDataValue
|
|
37
|
+
margin-top: 16px
|
|
38
|
+
|
|
36
39
|
.orderInfoAddresses
|
|
37
40
|
padding-bottom: 8px
|
|
38
41
|
grid-area: addresses
|
|
@@ -62,11 +65,13 @@
|
|
|
62
65
|
@extend .labelText
|
|
63
66
|
text-align: center
|
|
64
67
|
padding: 16px 24px
|
|
65
|
-
border-top: 1px solid rgba(76,78,100,0.12)
|
|
66
68
|
grid-area: customerSuport
|
|
67
69
|
|
|
70
|
+
.supportSectionBorder
|
|
71
|
+
border-top: 1px solid rgba(76,78,100,0.12)
|
|
72
|
+
|
|
68
73
|
.customerSuportButton
|
|
69
|
-
margin-top: 8px
|
|
74
|
+
margin-top: 8px !important
|
|
70
75
|
color: #26C6F9 !important
|
|
71
76
|
border-color: #26C6F9 !important
|
|
72
77
|
border-radius: 8px !important
|
package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx
CHANGED
|
@@ -8,8 +8,8 @@ import classNames from 'classnames';
|
|
|
8
8
|
import { TFunction } from '../../../../framework/types/types';
|
|
9
9
|
|
|
10
10
|
interface IAdditionalOrderData {
|
|
11
|
-
addressData: {
|
|
12
|
-
carPriceData: {
|
|
11
|
+
addressData: ({ value: string; label: string; })[];
|
|
12
|
+
carPriceData: ({ value: string; label: string; })[] | any;
|
|
13
13
|
overallRate: { label: string, value: number };
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -27,29 +27,38 @@ const AdditionalOrderInfo = ({ t, additionalOrderData, redirectToUrl, buyingType
|
|
|
27
27
|
return redirectToUrl('/account/kontakt');
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
const supportSectionClassnames = classNames(
|
|
31
|
+
styles.customerSuport,
|
|
32
|
+
{[styles.supportSectionBorder]: addressData.length > 0}
|
|
33
|
+
)
|
|
34
|
+
|
|
30
35
|
return (
|
|
31
36
|
<div className={styles.container}>
|
|
32
37
|
<div className={styles.orderInfoAddresses}>
|
|
33
38
|
{addressData.map((data) => {
|
|
34
39
|
const { value, label } = data;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<div
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
if (!!value) {
|
|
41
|
+
return (
|
|
42
|
+
<div key={label}>
|
|
43
|
+
<div className={styles.labelText}>{label}</div>
|
|
44
|
+
<div className={classNames(styles.labelText, styles.adressDataValue)}>{value}</div>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
41
48
|
})}
|
|
42
49
|
</div>
|
|
43
50
|
<div className={styles.orderPriceSection}>
|
|
44
51
|
<div className={styles.orderInfoPrice}>
|
|
45
|
-
{carPriceData.map((data) => {
|
|
52
|
+
{carPriceData.map((data: { value: string, label: string }) => {
|
|
46
53
|
const { value, label } = data;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div className={styles.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
if (!!value) {
|
|
55
|
+
return (
|
|
56
|
+
<div key={label} className={styles.flexContainer}>
|
|
57
|
+
<div className={styles.labelText}>{label}</div>
|
|
58
|
+
<div className={styles.labelText}>{value}</div>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
53
62
|
})}
|
|
54
63
|
</div>
|
|
55
64
|
<div className={styles.orderInfoFinancing}>
|
|
@@ -70,9 +79,9 @@ const AdditionalOrderInfo = ({ t, additionalOrderData, redirectToUrl, buyingType
|
|
|
70
79
|
</div>
|
|
71
80
|
</div>
|
|
72
81
|
</div>
|
|
73
|
-
<div className={
|
|
74
|
-
<div>{t('customerSupportText')}</div>
|
|
75
|
-
<Button onClick={redirectToContactPage} className={styles.customerSuportButton} variant='outlined'>{t('customerSupport')}</Button>
|
|
82
|
+
<div className={supportSectionClassnames}>
|
|
83
|
+
<div>{t('MyOrderPage:customerSupportText')}</div>
|
|
84
|
+
<Button onClick={redirectToContactPage} className={styles.customerSuportButton} variant='outlined'>{t('MyOrderPage:customerSupport')}</Button>
|
|
76
85
|
</div>
|
|
77
86
|
</div>
|
|
78
87
|
);
|
package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx
CHANGED
|
@@ -35,6 +35,43 @@ const OrderStatusSection = ({
|
|
|
35
35
|
return redirectToUrl(`/search/vehicle/${carId}`);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
// transforming address object to string
|
|
39
|
+
const getTransformAddressToString = (addressObj: {[key: string]: string}) => {
|
|
40
|
+
let addressString = '';
|
|
41
|
+
if (!!addressObj) {
|
|
42
|
+
Object.keys(addressObj).forEach((key) => {
|
|
43
|
+
switch (key) {
|
|
44
|
+
case 'customerFirstname':
|
|
45
|
+
case 'customerLastname':
|
|
46
|
+
addressString = `${addressString} ${addressObj[key]}`;
|
|
47
|
+
break;
|
|
48
|
+
case 'deliveryPartner':
|
|
49
|
+
case 'customerStreet':
|
|
50
|
+
case 'deliveryStreet':
|
|
51
|
+
case 'customerZip':
|
|
52
|
+
case 'deliveryZip':
|
|
53
|
+
if (!!addressString) {
|
|
54
|
+
addressString = `${addressString}, ${addressObj[key]}`;
|
|
55
|
+
} else {
|
|
56
|
+
addressString = `${addressString} ${addressObj[key]}`;
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
case 'customerCity':
|
|
60
|
+
case 'deliveryCity':
|
|
61
|
+
addressString = `${addressString} ${addressObj[key]}`;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
return addressString;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const getDataPriceItem = (value: number, label: string): {value: string, label: string} | [] => {
|
|
70
|
+
if (!!value && value !== 0) {
|
|
71
|
+
return { value: getFormattedPrice(value, '$,.2f', ' €'), label };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
38
75
|
const renderRequestedCars = () => {
|
|
39
76
|
return (
|
|
40
77
|
<>
|
|
@@ -56,31 +93,33 @@ const OrderStatusSection = ({
|
|
|
56
93
|
licensePlateCost,
|
|
57
94
|
registrationCost,
|
|
58
95
|
transportationCost,
|
|
59
|
-
customerAddress
|
|
60
|
-
|
|
61
|
-
customerLastname = ''
|
|
62
|
-
} = {}
|
|
96
|
+
customerAddress,
|
|
97
|
+
deliveryAddress
|
|
63
98
|
} = orderedCar;
|
|
64
99
|
|
|
65
100
|
const additionalOrderData = {
|
|
66
101
|
addressData: [
|
|
67
|
-
{ label: '
|
|
68
|
-
{ label: '
|
|
102
|
+
...customerAddress ? [{ label: t('MyOrderPage:billingAddress'), value: getTransformAddressToString(customerAddress) }] : [],
|
|
103
|
+
...deliveryAddress ? [{ label: t('MyOrderPage:vehicleDelivery'), value: getTransformAddressToString(deliveryAddress) }] : []
|
|
69
104
|
],
|
|
70
105
|
carPriceData: [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
106
|
+
...currentSalesPrice ? [getDataPriceItem(currentSalesPrice, t('MyOrderPage:carPrice'))] : [],
|
|
107
|
+
...preparationCost ? [getDataPriceItem(preparationCost, t('MyOrderPage:preparationCost'))] : [],
|
|
108
|
+
...registrationCost ? [getDataPriceItem(registrationCost, t('MyOrderPage:vehicleRegistration'))] : [],
|
|
109
|
+
...licensePlateCost ? [getDataPriceItem(licensePlateCost, t('MyOrderPage:licensePlates'))] : [],
|
|
110
|
+
...transportationCost ? [getDataPriceItem(transportationCost, t('MyOrderPage:delivery'))] : [],
|
|
76
111
|
...buyingType !== 'buy' ? [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
112
|
+
...monthlyInstallment ? [
|
|
113
|
+
{
|
|
114
|
+
label: t(`MyOrderPage:${buyingType}Rate`),
|
|
115
|
+
value: t('MyOrderPage:monthlyInstallment', { monthlyInstallment: getFormattedPrice(monthlyInstallment, '$,.2f', '', '€') })
|
|
116
|
+
}] : [],
|
|
117
|
+
...paybackPeriod ? [{ label: t('MyOrderPage:runningTime'), value: t('MyOrderPage:paybackPeriod', { paybackPeriod })}] : [],
|
|
118
|
+
...deposit ? [getDataPriceItem(deposit, t('MyOrderPage:deposit'))] : []
|
|
80
119
|
] : []
|
|
81
120
|
],
|
|
82
121
|
overallRate: {
|
|
83
|
-
label: '
|
|
122
|
+
label: t('MyOrderPage:yourOverallRate'),
|
|
84
123
|
value: buyingType === 'buy' ? currentSalesPrice : monthlyInstallment
|
|
85
124
|
}
|
|
86
125
|
};
|