@bytebrand/fe-ui-core-autobahn 1.0.202 → 1.0.203
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/ui/CreditKeyFigures.tsx +5 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.203",
|
|
4
4
|
"description": "auto.de md3 (Autobahn) design system — UI primitives, cards, chrome, VDP modules, theme CSS and locales. Ships raw TypeScript source (like fe-ui-core before it); each consumer's bundler compiles it.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"license": "UNLICENSED",
|
package/ui/CreditKeyFigures.tsx
CHANGED
|
@@ -12,10 +12,9 @@ import { formatEur, formatEurCents, formatPct } from '../utils/financeFormat';
|
|
|
12
12
|
* nominalInterestRate, effective rate = annualPercentageRate.
|
|
13
13
|
*/
|
|
14
14
|
export interface CreditKeyFiguresData {
|
|
15
|
-
/** contract term (paybackPeriod)
|
|
16
|
-
* "N Raten à" row: term − 1 when there is a final instalment (Schlussrate), else term. */
|
|
15
|
+
/** contract term (paybackPeriod) — exactly the layer's "Vertragslaufzeit" (e.g. 48, also with a Schlussrate). */
|
|
17
16
|
months?: number | null;
|
|
18
|
-
/** final instalment (Schlussrate) of the same calculation —
|
|
17
|
+
/** final instalment (Schlussrate) of the same calculation — not shown; kept for the hosts' data. */
|
|
19
18
|
finalInstallment?: number | null;
|
|
20
19
|
netLoan?: number | null;
|
|
21
20
|
total?: number | null;
|
|
@@ -39,9 +38,9 @@ export function creditKeyFigureLines(t: TranslationFunction, f: CreditKeyFigures
|
|
|
39
38
|
const line1: string[] = [];
|
|
40
39
|
const line2: string[] = [];
|
|
41
40
|
if (real(f.months)) {
|
|
42
|
-
// the layer's "N Raten à" count
|
|
43
|
-
const
|
|
44
|
-
|
|
41
|
+
// the layer's "Vertragslaufzeit" (not the "N Raten à" count, which is one less with a Schlussrate)
|
|
42
|
+
const months = Math.round(f.months);
|
|
43
|
+
line1.push(t('autobahn:finance.kfMonths', { months, defaultValue: `${months} Mon.` }));
|
|
45
44
|
}
|
|
46
45
|
if (real(f.netLoan)) {
|
|
47
46
|
const v = formatEur(Math.round(f.netLoan));
|