From 50cc1f7d82595429c5c7aecf8b80f132508b7f54 Mon Sep 17 00:00:00 2001 From: Wiktor Przybylski Date: Tue, 20 Feb 2024 21:47:22 +0100 Subject: [PATCH] little tweaking with colspan --- src/app/Summary.tsx | 378 +++++++++++++++++++++----------------------- 1 file changed, 180 insertions(+), 198 deletions(-) diff --git a/src/app/Summary.tsx b/src/app/Summary.tsx index a4be7a6..e9265b3 100644 --- a/src/app/Summary.tsx +++ b/src/app/Summary.tsx @@ -399,103 +399,94 @@ export function Summary({ -
-
- - - Podział kosztów - na kategorie - - - - - - {Object.values(["Kategoria", "Wartość"]).map( - (x) => ( - - {getTranslations(x)} - - ) - )} - - - - {Object.entries(currentDataset.koszty).map( - ([key, value], index) => - parseFloat(value) < 0 && ( - - - {getTranslations(key)} - - - {value} zł - - - ) +
+ + + Podział kosztów + na kategorie + + +
+ + + {Object.values(["Kategoria", "Wartość"]).map( + (x) => ( + + {getTranslations(x)} + + ) )} - - - - Suma - - {Object.values(currentDataset.koszty) - .reduce( - (a: Decimal, b: string) => a.add(b), - new Decimal(0) - ) - .toFixed(2)}{" "} - zł - - - -
-
-
-
-
- - -
- - - - {pieDataset.cost.map((entry, index) => ( - + + + {Object.entries(currentDataset.koszty).map( + ([key, value], index) => + parseFloat(value) < 0 && ( + + + {getTranslations(key)} + + - ))} - - - - - -
-
-
-
- -
+ > + {value} zł + + + ) + )} + + + + Suma + + {Object.values(currentDataset.koszty) + .reduce( + (a: Decimal, b: string) => a.add(b), + new Decimal(0) + ) + .toFixed(2)}{" "} + zł + + + + + + + + + +
+ + + + {pieDataset.cost.map((entry, index) => ( + + ))} + + + + + +
+
+
+ +
Opisane koszty @@ -580,113 +571,104 @@ export function Summary({ -
-
- {" "} - - - Podział wpływów - na kategorie - - - - - - {Object.values(["Kategoria", "Wartość"]).map( - (x) => ( - + + + Podział wpływów + na kategorie + + +
+ + + {Object.values(["Kategoria", "Wartość"]).map( + (x) => ( + + {getTranslations(x)} + + ) + )} + + + + {Object.entries(currentDataset.income).map( + ([key, value], index) => + parseFloat(value) > 0 && ( + + - {getTranslations(x)} - - ) - )} - - - - {Object.entries(currentDataset.income).map( - ([key, value], index) => - parseFloat(value) > 0 && ( - - - {getTranslations(key)} - - - {value} zł - - + {getTranslations(key)} + + + {value} zł + + + ) + )} + + + + Suma + + {Object.values(currentDataset.income) + .reduce( + (a: Decimal, b: string) => a.add(b), + new Decimal(0) ) - )} - - - - Suma - - {Object.values(currentDataset.income) - .reduce( - (a: Decimal, b: string) => a.add(b), - new Decimal(0) - ) - .toFixed(2)}{" "} - zł - - - -
-
-
-
- -
- - -
- - - - {getPieChartDataset( + .toFixed(2)}{" "} + zł + + + + + + + + +
+ + + ( - - ))} - - - - - -
-
-
-
- -
+ ).income + } + paddingAngle={5} + cx="50%" + cy="50%" + > + {getPieChartDataset( + currentYear, + currentMonth + ).income.map((entry, index) => ( + + ))} + + + + + +
+
+
+
Opisane wpływy