Quicklinks auch im "Kein Postfach"-Zustand der E-Mails-Card anzeigen
Der "Stressfrei wechseln Adressen"-Link (sowie "Postfach öffnen") war nur im Normal-Zweig sichtbar, nicht aber wenn der Kunde noch gar kein Mailbox-Konto hat. cardTitle in einer gemeinsamen Variable extrahiert und in beiden Branches verwendet. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -268,24 +268,11 @@ export default function ContractEmailsSection({
|
||||
return email.fromName || email.fromAddress;
|
||||
};
|
||||
|
||||
// Keine Mailbox-Konten vorhanden
|
||||
if (!accountsLoading && accounts.length === 0) {
|
||||
return (
|
||||
<Card title="E-Mails">
|
||||
<div className="flex flex-col items-center justify-center py-8 text-gray-500">
|
||||
<Mail className="w-10 h-10 mb-2 opacity-30" />
|
||||
<p className="text-sm">Keine E-Mail-Konten vorhanden</p>
|
||||
<p className="text-xs mt-1">
|
||||
Erstellen Sie eine E-Mail-Adresse beim Kunden mit aktivierter Mailbox
|
||||
</p>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={
|
||||
// Shared Card-Titel mit Quicklinks zur Kundenakte – wird sowohl im
|
||||
// Normal-Zweig als auch im "keine Mailbox vorhanden"-Zweig gezeigt,
|
||||
// damit man auch ohne eingerichtetes Postfach direkt zu den
|
||||
// Stressfrei-Wechseln-Adressen springen kann.
|
||||
const cardTitle = (
|
||||
<div className="flex items-center gap-3">
|
||||
<span>E-Mails</span>
|
||||
<Link
|
||||
@@ -309,7 +296,26 @@ export default function ContractEmailsSection({
|
||||
Stressfrei wechseln Adressen
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
|
||||
// Keine Mailbox-Konten vorhanden
|
||||
if (!accountsLoading && accounts.length === 0) {
|
||||
return (
|
||||
<Card title={cardTitle}>
|
||||
<div className="flex flex-col items-center justify-center py-8 text-gray-500">
|
||||
<Mail className="w-10 h-10 mb-2 opacity-30" />
|
||||
<p className="text-sm">Keine E-Mail-Konten vorhanden</p>
|
||||
<p className="text-xs mt-1">
|
||||
Erstellen Sie eine E-Mail-Adresse beim Kunden mit aktivierter Mailbox
|
||||
</p>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={cardTitle}
|
||||
actions={
|
||||
<div className="flex items-center gap-2">
|
||||
{selectedFolder !== 'TRASH' && (
|
||||
|
||||
Reference in New Issue
Block a user