diff --git a/public/app.js b/public/app.js index b9251b8..e9d1938 100644 --- a/public/app.js +++ b/public/app.js @@ -584,6 +584,13 @@ function renderViewAsBanner(me) { } /* ------------------------------------------------------------- Rechnungen --- */ +// @rechnungsnummer-anfang +/** Rechnungsnummer mit dem Projekt darunter (Stripe-Metadaten projektName, Feld `projekt`); beides maskiert. */ +function invoiceNumberHtml(i) { + const project = i.projekt ? `${escapeHtml(i.projekt)}` : '' + return `${escapeHtml(i.number)}${project}` +} +// @rechnungsnummer-ende async function loadCustomerInvoices() { const body = document.getElementById('invoices-body') if (!body) return @@ -615,7 +622,7 @@ async function loadCustomerInvoices() { ${invoices.map((i) => ` - ${escapeHtml(i.number)} + ${invoiceNumberHtml(i)} ${fmtDateShort(i.date)} ${fmtEuro(i.amount)} ${fmtEuro(i.balance)} @@ -632,6 +639,19 @@ async function loadCustomerInvoices() { } } +// Abschnitt "Aufträge" im Reiter Rechnungen (public/auftrag-portal.js): Fehler lassen den Abschnitt weg und stören die Rechnungen nicht. +function loadCustomerOrders() { + return import('/auftrag-portal.js') + .then((m) => m.initAuftraege({ + section: document.getElementById('orders-section'), + body: document.getElementById('orders-body'), + invoicesTitle: document.getElementById('invoices-title'), + request: api, + viewAs: chatState.viewAs, + })) + .catch(() => {}) +} + /* -------------------------------------------------------------- Aktivität --- */ // Abschnitt "Was wir zuletzt erledigt haben" unter Projekte: je Auftrag eine Karte mit Status, Fortschrittsleiste // und Arbeiten (Bausteine der Projektdetails; Texte kommen aufbereitet vom Server). Zuerst die drei neuesten, @@ -2063,6 +2083,7 @@ async function initDashboardPage() { if (aboParam) window.history.replaceState(null, '', `/dashboard.html${window.location.hash}`) loadContracts({ afterCheckout: aboParam === 'success' }) loadCustomerInvoices() + loadCustomerOrders() activityScrollPending = currentHash() === 'fortschritt' loadCustomerActivity().then(scrollToActivity) diff --git a/public/auftrag.css b/public/auftrag.css index 8463188..4899a59 100644 --- a/public/auftrag.css +++ b/public/auftrag.css @@ -149,7 +149,7 @@ body.ab-seite { .ab-portal .ab-details[open] > summary { margin-bottom: 4px; } .ab-portal .ab-knopf { border-radius: 999px; } .ab-rechnungen-titel { font-size: 20px; margin: 0 0 10px; } -.inv-project { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--kb-muted, #6b6b70); overflow-wrap: anywhere; } +.inv-project { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--kb-muted, rgba(255, 255, 255, 0.6)); overflow-wrap: anywhere; } /* ------------------------------------------------------------------ Installierte App --- */ .ab-app-back { display: none; } diff --git a/public/dashboard.html b/public/dashboard.html index 0401f1d..716e943 100644 --- a/public/dashboard.html +++ b/public/dashboard.html @@ -26,6 +26,7 @@ +