From 7c39a30957a59c379b6abe6702798923488a9021 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:38:07 +0200 Subject: [PATCH] feat(bills): link event label to its event detail page The Anlass / event name on the invoice detail page and the bills list now links through to /admin/events/:id when the invoice references a real event row. The list link stops propagation so it doesn't trigger the row's invoice navigation. Falls back to plain text when the invoice carries only a free-text event snapshot. Customer portal unchanged (no admin route access). --- frontend/src/pages/admin/bills/BillDetailPage.tsx | 9 ++++++++- frontend/src/pages/admin/bills/BillsListPage.tsx | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/admin/bills/BillDetailPage.tsx b/frontend/src/pages/admin/bills/BillDetailPage.tsx index cee6b480..cfdd0ece 100644 --- a/frontend/src/pages/admin/bills/BillDetailPage.tsx +++ b/frontend/src/pages/admin/bills/BillDetailPage.tsx @@ -386,7 +386,14 @@ export const BillDetailPage: React.FC = () => {
{inv.eventName && ( -
{t('bills.field.eventName', 'Event')}
{inv.eventName}{inv.eventDate ? ` · ${inv.eventDate}` : ''}
+
{t('bills.field.eventName', 'Event')}
+
+ {inv.eventId ? ( + {inv.eventName} + ) : inv.eventName} + {inv.eventDate ? ` · ${inv.eventDate}` : ''} +
+
)}
{t('bills.field.issueDate', 'Issued')}
{fmtDate(inv.issueDate)}
{t('bills.field.dueDate', 'Due')}
{fmtDate(inv.dueDate)}
diff --git a/frontend/src/pages/admin/bills/BillsListPage.tsx b/frontend/src/pages/admin/bills/BillsListPage.tsx index a4c413f8..3a5100cf 100644 --- a/frontend/src/pages/admin/bills/BillsListPage.tsx +++ b/frontend/src/pages/admin/bills/BillsListPage.tsx @@ -167,7 +167,13 @@ export const BillsListPage: React.FC = () => { )} {inv.customer.companyName || inv.customer.displayName || inv.customer.email} - {inv.eventName || '—'} + + {inv.eventName + ? (inv.eventId + ? e.stopPropagation()}>{inv.eventName} + : inv.eventName) + : '—'} + {inv.installmentTotal > 1 ? `${inv.installmentIndex + 1}/${inv.installmentTotal} · ${inv.installmentLabel || ''}` : '—'}