import { Badge, Card, EmptyState, Stat } from '../ui' import { aboView } from '../../lib/financeView' import { isNegText } from '../../lib/financeUi' /** * Block 5: „Abos“. Einnahmen pro Monat (aktiv und Zahlung fehlgeschlagen), zahlende Kunden, gefährdete Einnahmen * (nur wenn > 0) und die Liste Kunde · Produkt · Status · Betrag · nächste Abbuchung. Konnten die Abos nicht * geladen werden, steht stattdessen die Meldung des Servers da (keine Zahlen). */ export default function AboCard({ abos }) { const v = aboView(abos) if (v.error) { return (

{v.error}

) } return (
{v.atRiskText && }
{v.rows.length === 0 ? ( ) : (
    {v.rows.map((row) => (
  • {row.customer} · {row.product}
    {row.amountText}
    {row.statusLabel} nächste Abbuchung: {row.nextText}
  • ))}
)}
) }