53 lines
2.1 KiB
TypeScript
53 lines
2.1 KiB
TypeScript
import type { ApiSettings } from "../../types";
|
|
import { Button } from "@govoplan/core-webui";
|
|
import { Card } from "@govoplan/core-webui";
|
|
import VersionLine from "./components/VersionLine";
|
|
import { ActionBlockerHint, DocumentationHelpLink, PageActionBar, PageLayout } from "@govoplan/core-webui";
|
|
import { useCampaignWorkspaceData } from "./hooks/useCampaignWorkspaceData";
|
|
|
|
export default function CampaignAuditPage({ settings, campaignId }: {settings: ApiSettings;campaignId: string;}) {
|
|
const { data, loading, error, reload } = useCampaignWorkspaceData(settings, campaignId);
|
|
const version = data.currentVersion;
|
|
|
|
return (
|
|
<PageLayout
|
|
archetype="detail"
|
|
mode="workspace"
|
|
title="i18n:govoplan-campaign.audit_log.3cfc5f1c"
|
|
description={<VersionLine version={version} versions={data.versions} loadedAt={version?.updated_at} />}
|
|
loading={loading}
|
|
loadingLabel="i18n:govoplan-campaign.loading_audit_data.af52b968"
|
|
error={error}
|
|
actions={<PageActionBar
|
|
variant="detail"
|
|
refreshable
|
|
reloadAction={{ onReload: () => void reload({ force: true }), loading }}
|
|
/>}
|
|
>
|
|
<Card title="i18n:govoplan-campaign.recent_audit_events.7ec32b1d">
|
|
<ActionBlockerHint
|
|
tone="info"
|
|
reason={{
|
|
summary: "Campaign-specific audit projection is not available on this page.",
|
|
details: "Campaign actions already emit bounded platform audit evidence. Authorized readers can inspect it in the Audit administration surface.",
|
|
requiredAction: "Open tenant audit and filter by the campaign identifier.",
|
|
actor: "Audit reader or system operator",
|
|
target: "Administration > Tenant audit"
|
|
}}
|
|
documentation={{
|
|
topicId: "campaigns.reference.composition-assurance",
|
|
documentationType: "admin"
|
|
}}
|
|
/>
|
|
<DocumentationHelpLink
|
|
reference={{
|
|
topicId: "campaigns.reference.composition-assurance",
|
|
documentationType: "user"
|
|
}}
|
|
label="Open Campaign assurance documentation"
|
|
/>
|
|
</Card>
|
|
</PageLayout>);
|
|
|
|
}
|