Use central metric cards for Campaign summaries
This commit is contained in:
@@ -205,11 +205,11 @@ export default function CampaignOverviewPage({ settings, campaignId }: {settings
|
|||||||
<MetricCard label="i18n:govoplan-campaign.recipients.78cbf8eb" value={versionMetrics.recipientCount} tone="neutral" detail="i18n:govoplan-campaign.active_inline_recipients.8ba58f6e" />
|
<MetricCard label="i18n:govoplan-campaign.recipients.78cbf8eb" value={versionMetrics.recipientCount} tone="neutral" detail="i18n:govoplan-campaign.active_inline_recipients.8ba58f6e" />
|
||||||
<MetricCard label="i18n:govoplan-campaign.template_health.22e14b59" value={versionMetrics.templateHealthValue} tone={versionMetrics.templateHealthTone} detail={versionMetrics.templateHealthDetail} />
|
<MetricCard label="i18n:govoplan-campaign.template_health.22e14b59" value={versionMetrics.templateHealthValue} tone={versionMetrics.templateHealthTone} detail={versionMetrics.templateHealthDetail} />
|
||||||
</div>
|
</div>
|
||||||
<div className="summary-grid overview-summary-grid">
|
<div className="metric-grid inside">
|
||||||
<SummaryTile label="i18n:govoplan-campaign.validation_errors.e54ca4fe" value={summaryValue(data.currentVersion?.validation_summary, ["error_count", "errors", "blocked"])} />
|
<MetricCard label="i18n:govoplan-campaign.validation_errors.e54ca4fe" value={summaryValue(data.currentVersion?.validation_summary, ["error_count", "errors", "blocked"])} />
|
||||||
<SummaryTile label="i18n:govoplan-campaign.warnings.1430f976" value={summaryValue(data.currentVersion?.validation_summary, ["warning_count", "warnings"])} />
|
<MetricCard label="i18n:govoplan-campaign.warnings.1430f976" value={summaryValue(data.currentVersion?.validation_summary, ["warning_count", "warnings"])} />
|
||||||
<SummaryTile label="i18n:govoplan-campaign.built_messages.1fb804f2" value={summaryValue(data.currentVersion?.build_summary, ["built_count", "built", "messages_built"])} />
|
<MetricCard label="i18n:govoplan-campaign.built_messages.1fb804f2" value={summaryValue(data.currentVersion?.build_summary, ["built_count", "built", "messages_built"])} />
|
||||||
<SummaryTile label="i18n:govoplan-campaign.jobs_total.98da65bc" value={data.summary?.cards?.jobs_total ?? "—"} />
|
<MetricCard label="i18n:govoplan-campaign.jobs_total.98da65bc" value={data.summary?.cards?.jobs_total ?? "—"} />
|
||||||
</div>
|
</div>
|
||||||
<div className="admin-table-surface version-history-table-surface">
|
<div className="admin-table-surface version-history-table-surface">
|
||||||
<DataGrid
|
<DataGrid
|
||||||
@@ -375,12 +375,3 @@ function lockDialogLabel(pending: PendingLockAction): string {
|
|||||||
if (pending?.action === "permanent") return "i18n:govoplan-campaign.lock_permanently.cc0ce9e7";
|
if (pending?.action === "permanent") return "i18n:govoplan-campaign.lock_permanently.cc0ce9e7";
|
||||||
return "i18n:govoplan-campaign.confirm.04a21221";
|
return "i18n:govoplan-campaign.confirm.04a21221";
|
||||||
}
|
}
|
||||||
|
|
||||||
function SummaryTile({ label, value }: {label: string;value: string | number;}) {
|
|
||||||
return (
|
|
||||||
<div className="summary-tile">
|
|
||||||
<span>{label}</span>
|
|
||||||
<strong>{value}</strong>
|
|
||||||
</div>);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -512,13 +512,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.overview-config-actions a { text-decoration: none; }
|
.overview-config-actions a { text-decoration: none; }
|
||||||
.overview-summary-grid {
|
|
||||||
grid-template-columns: repeat(4, minmax(120px, 1fr));
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1100px) {
|
@media (max-width: 1100px) {
|
||||||
.overview-config-grid,
|
.overview-config-grid { grid-template-columns: 1fr; }
|
||||||
.overview-summary-grid { grid-template-columns: 1fr; }
|
|
||||||
.overview-config-card { grid-template-rows: auto auto auto auto; }
|
.overview-config-card { grid-template-rows: auto auto auto auto; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,9 +745,6 @@
|
|||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
.recipient-field-input {
|
|
||||||
min-width: 140px;
|
|
||||||
}
|
|
||||||
.attachment-summary-button {
|
.attachment-summary-button {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user