Stundenkonto und Vorschuss am Einrichtungs-Ticket und beim Kunden

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-10-16 13:45:39 +00:00
1 parent f0d39f2eee
commit dce7c3e53a
7 files changed
+154 -2

No files matched your search

+6 -1
View File
@@ -3,6 +3,7 @@ import { Card, Badge } from '../ui'
import { getCustomerAboStatus } from '../../lib/teamApi'
import { fmtDate, productLabelOf } from '../../lib/format'
import { storageLabel } from '../../lib/storageFormat'
import StundenkontoLeiste from './StundenkontoLeiste'
// Abo-Status eines Kunden (Reiter "Abo & Angebote"): Appwrite-Spiegel des Stripe-Abos, fuer alle Mitarbeiter
export default function AboStatusCard({ customerId }) {
@@ -19,13 +20,16 @@ export default function AboStatusCard({ customerId }) {
return () => { alive = false }
}, [customerId])
// Nur ein aktives Wartungs-Abo hat ein Stundenkonto (das Hosting-Abo nicht)
const mitKonto = Boolean(abo && abo.productKey === 'wartung' && abo.active)
return (
<Card title="Abo">
{error && <div className="msg err" role="alert">{error}</div>}
{!abo && !error && <div className="loading">Wird geladen …</div>}
{abo && !abo.status && <p className="muted">kein Abo</p>}
{abo && abo.status && (
<dl className="kv">
<dl className={mitKonto ? 'kv mb-2' : 'kv'}>
<dt>Abo</dt>
<dd className="flex items-center gap-2 wrap">
{productLabelOf(abo.productKey)}
@@ -37,6 +41,7 @@ export default function AboStatusCard({ customerId }) {
<dt>Zusatzspeicher</dt><dd>{storageLabel(abo.storageUnits)}</dd>
</dl>
)}
{mitKonto && <StundenkontoLeiste customerId={customerId} />}
</Card>
)
}