Adopt shared WebUI layout primitives
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { DescriptionList } from "@govoplan/core-webui";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { Check, RotateCcw, Search, X } from "lucide-react";
|
||||
import type { ApiSettings } from "../../types";
|
||||
@@ -463,7 +464,7 @@ export default function CampaignReportPage({ settings, campaignId }: {settings:
|
||||
<LoadingFrame loading={loading} label="i18n:govoplan-campaign.loading_report_data.0908ade5">
|
||||
<ContentGrid columns={2} collapseAt="workspace" className="">
|
||||
<Card title="i18n:govoplan-campaign.delivery_outcome.f9d7c085">
|
||||
<dl className="detail-list">
|
||||
<DescriptionList variant="inline">
|
||||
<div><dt>i18n:govoplan-campaign.generated.8eefdd52</dt><dd>{formatDateTime(data.summary?.generated_at)}</dd></div>
|
||||
{deliveryOutcomeShortcuts.map(({ label, value, shortcutId }) => {
|
||||
const active = activeJobGridShortcut === shortcutId;
|
||||
@@ -478,10 +479,10 @@ export default function CampaignReportPage({ settings, campaignId }: {settings:
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</dl>
|
||||
</DescriptionList>
|
||||
</Card>
|
||||
<Card title="i18n:govoplan-campaign.imap_and_execution_plan.4c80c058">
|
||||
<dl className="detail-list">
|
||||
<DescriptionList variant="inline">
|
||||
{imapOutcomeShortcuts.map(({ label, value, shortcutId }) => {
|
||||
const active = activeJobGridShortcut === shortcutId;
|
||||
return (
|
||||
@@ -499,10 +500,10 @@ export default function CampaignReportPage({ settings, campaignId }: {settings:
|
||||
<div><dt>i18n:govoplan-campaign.rate_limit.d08e55f5</dt><dd>{rateLimit.messages_per_minute ? i18nMessage("i18n:govoplan-campaign.value_minute.aeb1a9ea", { value0: String(rateLimit.messages_per_minute) }) : "—"}</dd></div>
|
||||
<div><dt>i18n:govoplan-campaign.minimum_remaining_duration.639b792c</dt><dd>{String(delivery.estimated_remaining_send_human ?? "—")}</dd></div>
|
||||
<div><dt>i18n:govoplan-campaign.execution_snapshot.5a67f098</dt><dd title={String(delivery.execution_snapshot_hash ?? "")}>{delivery.execution_snapshot_hash ? i18nMessage("i18n:govoplan-campaign.value.382bcd25", { value0: String(delivery.execution_snapshot_hash).slice(0, 12) }) : "i18n:govoplan-campaign.missing.92185dc5"}</dd></div>
|
||||
</dl>
|
||||
</DescriptionList>
|
||||
</Card>
|
||||
<Card title="Postbox receipt evidence">
|
||||
<dl className="detail-list">
|
||||
<DescriptionList variant="inline">
|
||||
<div>
|
||||
<dt>Evidence state</dt>
|
||||
<dd>
|
||||
@@ -523,7 +524,7 @@ export default function CampaignReportPage({ settings, campaignId }: {settings:
|
||||
<div><dt>Read</dt><dd>{String(postboxReceipts.read_delivery_count ?? "—")}</dd></div>
|
||||
<div><dt>Acknowledged</dt><dd>{String(postboxReceipts.acknowledged_delivery_count ?? "—")}</dd></div>
|
||||
<div><dt>Withdrawn / expired copies</dt><dd>{String(Number(postboxReceipts.withdrawn_message_count ?? 0) + Number(postboxReceipts.expired_message_count ?? 0))}</dd></div>
|
||||
</dl>
|
||||
</DescriptionList>
|
||||
</Card>
|
||||
<RetentionPrivacyCard retention={retention} />
|
||||
<Card title="i18n:govoplan-campaign.explicit_delivery_actions.b35e72a4">
|
||||
@@ -607,7 +608,7 @@ export default function CampaignReportPage({ settings, campaignId }: {settings:
|
||||
|
||||
{detail &&
|
||||
<div className="stacked-sections">
|
||||
<dl className="detail-list">
|
||||
<DescriptionList variant="inline">
|
||||
<div><dt>i18n:govoplan-campaign.recipient.90343260</dt><dd>{String(detail.job.recipient_email ?? "—")}</dd></div>
|
||||
<div><dt>i18n:govoplan-campaign.subject.8d183dbd</dt><dd>{String(detail.job.subject ?? "—")}</dd></div>
|
||||
<div><dt>i18n:govoplan-campaign.message_id.465056ba</dt><dd>{String(detail.job.message_id_header ?? "—")}</dd></div>
|
||||
@@ -619,7 +620,7 @@ export default function CampaignReportPage({ settings, campaignId }: {settings:
|
||||
<div><dt>i18n:govoplan-campaign.imap_state.03b83be0</dt><dd><StatusBadge status={String(detail.job.imap_status ?? "unknown")} label={deliveryStatusLabel(String(detail.job.imap_status ?? "unknown"))} /></dd></div>
|
||||
<div><dt>i18n:govoplan-campaign.attachments.6771ade6</dt><dd>{String(detail.job.matched_file_count ?? detail.job.attachment_count ?? 0)}</dd></div>
|
||||
<div><dt>Message SHA-256</dt><dd><code>{String(detail.job.eml_sha256 ?? "—")}</code></dd></div>
|
||||
</dl>
|
||||
</DescriptionList>
|
||||
<PostboxTargetEvidenceSection
|
||||
targets={
|
||||
Array.isArray(detail.job.resolved_postbox_targets)
|
||||
@@ -671,7 +672,7 @@ function RetentionPrivacyCard({ retention }: { retention?: CampaignRetentionRepo
|
||||
<Card title="i18n:govoplan-campaign.retention_and_privacy.24418676">
|
||||
<p>{retention.privacy_impact.summary}</p>
|
||||
{retention.policy_reason && <p className="muted">{retention.policy_reason}</p>}
|
||||
<dl className="detail-list">
|
||||
<DescriptionList variant="inline">
|
||||
<div>
|
||||
<dt>i18n:govoplan-campaign.policy_state.7e955a0d</dt>
|
||||
<dd>
|
||||
@@ -713,7 +714,7 @@ function RetentionPrivacyCard({ retention }: { retention?: CampaignRetentionRepo
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
</dl>
|
||||
</DescriptionList>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user