@bytebrand/fe-ui-core 4.2.186 → 4.2.187

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.186",
3
+ "version": "4.2.187",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -37,6 +37,7 @@ interface IProps {
37
37
  showModal?: (id: string, props?: any) => void;
38
38
  hideModal: (id: string) => void;
39
39
  onCarFavorite: (event: MouseEvent<HTMLElement>) => void;
40
+ showDownPayment:boolean;
40
41
  }
41
42
 
42
43
  interface IState {
@@ -239,6 +240,7 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
239
240
  showNewLabel,
240
241
  make,
241
242
  model,
243
+ showDownPayment,
242
244
  subModel,
243
245
  powerKW,
244
246
  powerPS,
@@ -267,6 +269,7 @@ class VehicleDetailedSlider extends Component<IProps, IState> {
267
269
  t,
268
270
  financingConfig,
269
271
  showNewLabel,
272
+ showDownPayment,
270
273
  historyPriceDifference: price ? price.historyPriceDifference : 0,
271
274
  historyPriceDifferencePerCent: price ? price.historyPriceDifferencePerCent : 0,
272
275
  activeTab
@@ -12,13 +12,14 @@ interface IProps {
12
12
  historyPriceDifferencePerCent: number;
13
13
  financingConfig?:any;
14
14
  activeTab?:number;
15
+ showDownPayment:boolean;
15
16
  }
16
17
 
17
18
  const MIN_PERCENT = 5;
18
19
  const MIN_PRICE_DIFFERENCE = 500;
19
20
  const EUR = `\u20AC`;
20
21
 
21
- const PriceData: React.FunctionComponent<IProps> = ({ t, showNewLabel, historyPriceDifference, historyPriceDifferencePerCent, financingConfig, activeTab }) => {
22
+ const PriceData: React.FunctionComponent<IProps> = ({ t, showDownPayment,showNewLabel, historyPriceDifference, historyPriceDifferencePerCent, financingConfig, activeTab }) => {
22
23
  const percentageOfFirstInstallment = activeTab === 0 ? financingConfig!.financing.percentageOfFirstInstallment : financingConfig!.leasing.percentageOfFirstInstallment;
23
24
  return (
24
25
  <div className={styles.topWrapper}>
@@ -29,7 +30,7 @@ const PriceData: React.FunctionComponent<IProps> = ({ t, showNewLabel, historyPr
29
30
  {` ${EUR} ${t('slider.save')}`}
30
31
  </Badge>
31
32
  )}
32
- {(!isNil(percentageOfFirstInstallment) && activeTab !== 2) &&
33
+ {(!isNil(percentageOfFirstInstallment) && activeTab !== 2 && showDownPayment) &&
33
34
  <Badge type='lightBlue' className={styles.percentageOfFirstInstallment}>{`${percentageOfFirstInstallment}${percentageOfFirstInstallment > 0 ? '%' : EUR} ${t('slider.firstInstallment')}`}</Badge>}
34
35
  {historyPriceDifferencePerCent >= MIN_PERCENT && (
35
36
  <Badge type='red' className={styles.priceDifferencePerCent}>