@bytebrand/fe-ui-core 4.2.211 → 4.2.213

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.2.211",
3
+ "version": "4.2.213",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -105,7 +105,7 @@ const OrderStatusCar = ({
105
105
  </div>
106
106
  <div className={styles.requestId}>{request}</div>
107
107
  <div className={styles.carPayment}>
108
- {!!transformedDeliveryDate ? transformedDeliveryDate
108
+ {wonStatus === 'won' && !!transformedDeliveryDate ? transformedDeliveryDate
109
109
  : <>
110
110
  {t(`buyingType.${buyingType}`)},&nbsp;
111
111
  {buyingType !== 'buy' && `${t('paybackPeriod', { paybackPeriod })},`}&nbsp;
@@ -44,23 +44,21 @@ const OrderStatusSection = ({
44
44
  if (!!addressObj) {
45
45
  Object.keys(addressObj).forEach((key) => {
46
46
  switch (key) {
47
- case 'customerFirstname':
48
- case 'customerLastname':
47
+ case 'firstname':
48
+ case 'lastname':
49
49
  addressString = `${addressString} ${addressObj[key]}`;
50
50
  break;
51
- case 'deliveryPartner':
52
- case 'customerStreet':
53
- case 'deliveryStreet':
54
- case 'customerZip':
55
- case 'deliveryZip':
51
+ case 'partner':
52
+ case 'street':
53
+ case 'zip':
54
+ case 'number':
56
55
  if (!!addressString) {
57
56
  addressString = `${addressString}, ${addressObj[key]}`;
58
57
  } else {
59
58
  addressString = `${addressString} ${addressObj[key]}`;
60
59
  }
61
60
  break;
62
- case 'customerCity':
63
- case 'deliveryCity':
61
+ case 'city':
64
62
  addressString = `${addressString} ${addressObj[key]}`;
65
63
  break;
66
64
  default: addressString = `${addressString} ${addressObj[key]}`;
@@ -144,6 +142,7 @@ const OrderStatusSection = ({
144
142
  request,
145
143
  registration,
146
144
  currentSalesPrice,
145
+ totalPrice,
147
146
  deposit,
148
147
  preparationCost,
149
148
  licensePlateCost,
@@ -168,7 +167,7 @@ const OrderStatusSection = ({
168
167
  const additionalOrderData = {
169
168
  addressData: [
170
169
  ...customerAddress ? [{ label: t('MyOrderPage:billingAddress'), value: getTransformAddressToString(customerAddress) }] : [],
171
- ...deliveryAddress ? [{ label: t('MyOrderPage:vehicleDelivery'), value: getTransformAddressToString(deliveryAddress) }] : []
170
+ ...deliveryAddress ? [{ label: t('MyOrderPage:vehicleDelivery'), value: selfPickup ? t('MyOrderPage:selfPickup') : getTransformAddressToString(deliveryAddress) }] : []
172
171
  ],
173
172
  carPriceData: [
174
173
  ...currentSalesPrice ? [getDataPriceItem(currentSalesPriceWithWarranty, carPriceWithWarrantyTitle(warranty))] : [],
@@ -176,7 +175,7 @@ const OrderStatusSection = ({
176
175
  ...extrasSumCost ? [getDataPriceItem(extrasSumCost, t('MyOrderPage:extrasSumCost'))] : [],
177
176
  ...registrationCost && registration ? [getDataPriceItem(registrationCost, t('MyOrderPage:vehicleRegistration'))] : [],
178
177
  ...licensePlateCost && isLicensePlateFee ? [getDataPriceItem(licensePlateCost, t('MyOrderPage:licensePlates'))] : [],
179
- ...transportationCost && delivery ? [getDataPriceItem(transportationCost, t('MyOrderPage:delivery'))] : [],
178
+ ...!!transportationCost && delivery ? [getDataPriceItem(transportationCost, t('MyOrderPage:delivery'))] : [],
180
179
  ...paymentProtectionInsuranceCost ? [getDataPriceItem(paymentProtectionInsuranceCost, t('MyOrderPage:paymentProtectionInsuranceCost'))]: [],
181
180
  ...firstRate ? [getDataPriceItem(firstRate, t('MyOrderPage:firstRate'))] : [],
182
181
  ...buyingType !== 'buy' ? [
@@ -191,7 +190,7 @@ const OrderStatusSection = ({
191
190
  ],
192
191
  overallRate: {
193
192
  label: t('MyOrderPage:yourOverallRate'),
194
- value: buyingType === 'buy' ? currentSalesPrice : monthlyInstallment
193
+ value: buyingType === 'buy' ? totalPrice : monthlyInstallment
195
194
  }
196
195
  };
197
196
 
@@ -225,10 +224,11 @@ const OrderStatusSection = ({
225
224
  delivery
226
225
  };
227
226
 
228
- const title = <span>
229
- {t('orderStatus.title')}:&nbsp;
230
- <span className={styles.orderStatus}>{t(`orderStatus.${status}`)}</span>
231
- </span>;
227
+ const title = wonStatus === 'pending' ? <span>
228
+ {t('orderStatus.title')}:&nbsp;
229
+ <span className={styles.orderStatus}>{t(`orderStatus.${status}`)}</span>
230
+ </span>
231
+ : <span>{t('orderStatus.myOrder')}</span>;
232
232
 
233
233
  return (
234
234
  <DashboardSection key={index} title={title}>
@@ -314,7 +314,7 @@ class FiltersContainer extends React.Component<IFiltersContainerProps, {}> {
314
314
  if (isHistogram) {
315
315
  const histogramData = histograms[filterField].length ? histograms[filterField] : RANGE_FILTERS[filter].options;
316
316
  const actualValues = {
317
- from: histogramData[0].from,
317
+ from: filters[filter].value.from ? filters[filter].value.from : histogramData[0].from,
318
318
  to: histogramData[histogramData.length - 1].to
319
319
  };
320
320