From 7fed3aa3d98575e45c59f647b40368068581f7da Mon Sep 17 00:00:00 2001 From: frakarr Date: Thu, 11 Dec 2025 20:51:13 +0100 Subject: [PATCH] Update Reports.tsx --- pages/Reports.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pages/Reports.tsx b/pages/Reports.tsx index d047e32..1f0d85e 100644 --- a/pages/Reports.tsx +++ b/pages/Reports.tsx @@ -92,6 +92,12 @@ export const ReportsPage: React.FC = () => { return { totalAmount, paypalAmount, manualAmount, count }; }, [filteredData]); + const getMonthLabel = (month: number) => { + if (month === 13) return "Extra"; + if (month >= 1 && month <= 12) return MONTH_NAMES[month - 1]; + return "-"; + }; + const handleExportCSV = () => { if (!activeCondo) return; @@ -100,7 +106,7 @@ export const ReportsPage: React.FC = () => { new Date(p.datePaid).toLocaleDateString(), p.familyName, p.familyUnit, - MONTH_NAMES[p.forMonth - 1], + getMonthLabel(p.forMonth), p.forYear, p.amount.toFixed(2), p.method, @@ -161,6 +167,7 @@ export const ReportsPage: React.FC = () => { > {MONTH_NAMES.map((m, i) => )} +
@@ -246,7 +253,7 @@ export const ReportsPage: React.FC = () => { - {MONTH_NAMES[t.forMonth - 1].substring(0, 3)} {t.forYear} + {getMonthLabel(t.forMonth).substring(0, 5)} {t.forYear}