fix: improve mail document ID rendering and disable actions for ignored emails
Build and Push Multi-Platform Images / build-and-push (push) Successful in 18s

This commit is contained in:
2026-05-18 21:07:52 +02:00
parent 1e7e8cf6da
commit 792733952a
+16 -13
View File
@@ -102,18 +102,18 @@ export default function MailDetailPage() {
key: 'PaperlessDocumentIds',
width: 130,
render: (ids: Record<string, number> | null) => {
if (!ids) return null;
const entries = Object.entries(ids);
if (!ids || typeof ids !== 'object') return null;
const entries = Object.entries(ids).filter(([, v]) => v != null);
if (entries.length === 0) return null;
const paperlessUrl = getEnv('PAPERLESS_URL');
return (
<Space size={[0, 4]} wrap>
{entries.map(([, id]) => {
const paperlessUrl = getEnv('PAPERLESS_URL');
return (
{entries.map(([rangeKey, id]) =>
paperlessUrl ? (
<a
key={id}
href={paperlessUrl ? `${paperlessUrl}/documents/${id}` : undefined}
key={rangeKey}
href={`${paperlessUrl}/documents/${id}`}
target="_blank"
rel="noopener noreferrer"
onClick={(e) => e.stopPropagation()}
@@ -123,8 +123,10 @@ export default function MailDetailPage() {
{id}
</Tag>
</a>
);
})}
) : (
<Tag color="blue" key={rangeKey}>{id}</Tag>
)
)}
</Space>
);
}
@@ -151,13 +153,14 @@ export default function MailDetailPage() {
cancelText="Nein"
placement="bottomRight"
>
<Button danger icon={<CloseCircleOutlined />}>
<Button danger icon={<CloseCircleOutlined />} disabled={email.Status === 1}>
Als ignoriert markieren
</Button>
</Popconfirm>
<Button
type="primary"
icon={<FileTextOutlined />}
<Button
type="primary"
icon={<FileTextOutlined />}
disabled={email.Status === 1}
onClick={async () => {
if (!email) return;
const hide = message.loading('Prüfe Vorschaubilder...', 0);