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;
|
return email.fromName || email.fromAddress;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Keine Mailbox-Konten vorhanden
|
// Shared Card-Titel mit Quicklinks zur Kundenakte – wird sowohl im
|
||||||
if (!accountsLoading && accounts.length === 0) {
|
// Normal-Zweig als auch im "keine Mailbox vorhanden"-Zweig gezeigt,
|
||||||
return (
|
// damit man auch ohne eingerichtetes Postfach direkt zu den
|
||||||
<Card title="E-Mails">
|
// Stressfrei-Wechseln-Adressen springen kann.
|
||||||
<div className="flex flex-col items-center justify-center py-8 text-gray-500">
|
const cardTitle = (
|
||||||
<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={
|
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<span>E-Mails</span>
|
<span>E-Mails</span>
|
||||||
<Link
|
<Link
|
||||||
@@ -309,7 +296,26 @@ export default function ContractEmailsSection({
|
|||||||
Stressfrei wechseln Adressen
|
Stressfrei wechseln Adressen
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</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={
|
actions={
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
{selectedFolder !== 'TRASH' && (
|
{selectedFolder !== 'TRASH' && (
|
||||||
|
|||||||
Reference in New Issue
Block a user