feat: govern attachment exceptions and ownership transfers
This commit is contained in:
@@ -471,6 +471,11 @@ export type CampaignMockSendPayload = {
|
||||
export type CampaignReviewStatePayload = {
|
||||
inspection_complete: boolean;
|
||||
reviewed_message_keys: string[];
|
||||
issue_decisions: Array<{
|
||||
job_id: string;
|
||||
decision: "accept";
|
||||
reason?: string | null;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type CampaignSendJobPayload = {
|
||||
|
||||
@@ -251,8 +251,8 @@ export default function GlobalSettingsPage({ settings, auth, campaignId, view =
|
||||
effectiveClassName="campaign-policy-effective-note"
|
||||
label="i18n:govoplan-campaign.default_missing_behavior.ffbd9cd7"
|
||||
note="i18n:govoplan-campaign.used_by_attachment_rules_that_do_not_override_mi.ab8bc0d5"
|
||||
control={<PolicySelectControl value={getText(attachments, "missing_behavior", "ask")} disabled={locked} onChange={(value) => patch(["attachments", "missing_behavior"], value)} />}
|
||||
effective={behaviorSummary(getText(attachments, "missing_behavior", "ask"))} />
|
||||
control={<PolicySelectControl value={getText(attachments, "missing_behavior", "warn")} disabled={locked} onChange={(value) => patch(["attachments", "missing_behavior"], value)} />}
|
||||
effective={behaviorSummary(getText(attachments, "missing_behavior", "warn"))} />
|
||||
|
||||
<PolicyRow
|
||||
className="campaign-policy-row"
|
||||
|
||||
@@ -156,6 +156,9 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
const [showAllReviewJobs, setShowAllReviewJobs] = useState(false);
|
||||
const [jobsLoadedKey, setJobsLoadedKey] = useState("");
|
||||
const [reviewedMessageKeys, setReviewedMessageKeys] = useState<Set<string>>(() => new Set());
|
||||
const [reviewIssueDecisions, setReviewIssueDecisions] = useState<
|
||||
Record<string, string>
|
||||
>({});
|
||||
const [newlyReviewedRequiredKeys, setNewlyReviewedRequiredKeys] = useState<Set<string>>(() => new Set());
|
||||
const [selectedBuiltIndex, setSelectedBuiltIndex] = useState<number | null>(null);
|
||||
const [singleSendConfirmIndex, setSingleSendConfirmIndex] = useState<number | null>(null);
|
||||
@@ -182,7 +185,7 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
const imapDiagnosticsRef = useRef<CampaignJobsResponse>(emptyCampaignJobsResponse());
|
||||
const [selectedDeliveryJobDetail, setSelectedDeliveryJobDetail] = useState<Record<string, unknown> | null>(null);
|
||||
const persistedReview = storedMessageReviewState(version);
|
||||
const persistedReviewKey = `${persistedReview.buildToken}|${persistedReview.inspectionComplete ? "1" : "0"}|${persistedReview.reviewedMessageKeys.join(",")}`;
|
||||
const persistedReviewKey = `${persistedReview.buildToken}|${persistedReview.inspectionComplete ? "1" : "0"}|${persistedReview.reviewedMessageKeys.join(",")}|${JSON.stringify(persistedReview.issueDecisions)}`;
|
||||
|
||||
useEffect(() => {
|
||||
setBuiltReviewRows([]);
|
||||
@@ -192,6 +195,7 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
setReviewQuery({ sort: null, filters: {} });
|
||||
setJobsLoadedKey("");
|
||||
setNewlyReviewedRequiredKeys(new Set());
|
||||
setReviewIssueDecisions({});
|
||||
setSelectedBuiltIndex(null);
|
||||
setMockResult(null);
|
||||
setSelectedMockMessage(null);
|
||||
@@ -215,6 +219,12 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
useEffect(() => {
|
||||
setMessageReviewComplete(persistedReview.inspectionComplete);
|
||||
setReviewedMessageKeys(new Set(persistedReview.reviewedMessageKeys));
|
||||
setReviewIssueDecisions(Object.fromEntries(
|
||||
persistedReview.issueDecisions.flatMap((item) => {
|
||||
const jobId = String(item.job_id ?? "").trim();
|
||||
return jobId ? [[jobId, String(item.reason ?? "")]] : [];
|
||||
})
|
||||
));
|
||||
}, [version?.id, persistedReviewKey]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -1010,7 +1020,14 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
const reviewed = new Set<string>(reviewedMessageKeys);
|
||||
await updateCampaignReviewState(settings, campaignId, version.id, {
|
||||
inspection_complete: true,
|
||||
reviewed_message_keys: [...reviewed]
|
||||
reviewed_message_keys: [...reviewed],
|
||||
issue_decisions: Object.entries(reviewIssueDecisions).map(
|
||||
([jobId, reason]) => ({
|
||||
job_id: jobId,
|
||||
decision: "accept" as const,
|
||||
reason: reason.trim() || null
|
||||
})
|
||||
)
|
||||
});
|
||||
setReviewedMessageKeys(reviewed);
|
||||
setNewlyReviewedRequiredKeys(new Set());
|
||||
@@ -1063,15 +1080,6 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
if (index < 0) return;
|
||||
const reviewRow = filteredBuiltReviewRows[index] ?? row;
|
||||
const jobId = String(reviewRow.id ?? "");
|
||||
const reviewKey = String(reviewRow.review_key ?? builtMessageKey(reviewRow, index));
|
||||
setReviewedMessageKeys((current) => {
|
||||
const next = new Set(current);
|
||||
next.add(reviewKey);
|
||||
return next;
|
||||
});
|
||||
if (messageNeedsExplicitReview(reviewRow) && reviewRow.reviewed !== true) {
|
||||
setNewlyReviewedRequiredKeys((current) => new Set(current).add(reviewKey));
|
||||
}
|
||||
if (!jobId || reviewRow.resolved_recipients || reviewRow.attachments || reviewRow.issues) {
|
||||
setSelectedBuiltIndex(index);
|
||||
return;
|
||||
@@ -1091,6 +1099,35 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
}
|
||||
}
|
||||
|
||||
function acceptBuiltMessageReview(
|
||||
row: Record<string, unknown>,
|
||||
index: number,
|
||||
reasonRequired: boolean
|
||||
) {
|
||||
const jobId = String(row.id ?? "").trim();
|
||||
const reviewKey = String(
|
||||
row.review_key ?? builtMessageKey(row, index)
|
||||
);
|
||||
const reason = reviewIssueDecisions[jobId] ?? "";
|
||||
if (!jobId) {
|
||||
setError("The built message has no delivery job id.");
|
||||
return;
|
||||
}
|
||||
if (reasonRequired && !reason.trim()) {
|
||||
setError("Enter a reason for accepting the attachment exception.");
|
||||
return;
|
||||
}
|
||||
setReviewedMessageKeys((current) => new Set(current).add(reviewKey));
|
||||
setNewlyReviewedRequiredKeys((current) =>
|
||||
new Set(current).add(reviewKey)
|
||||
);
|
||||
setReviewIssueDecisions((current) => ({
|
||||
...current,
|
||||
[jobId]: reason
|
||||
}));
|
||||
setError("");
|
||||
}
|
||||
|
||||
async function sendSingleBuiltMessage() {
|
||||
if (!version || busy || singleSendConfirmIndex === null) return;
|
||||
const row = filteredBuiltReviewRows[singleSendConfirmIndex];
|
||||
@@ -1667,6 +1704,28 @@ export default function ReviewSendPage({ settings, auth, campaignId }: {settings
|
||||
index={selectedBuiltIndex}
|
||||
canStartSingleMessageSend={canStartSingleMessageSend}
|
||||
singleMessageSendBusy={busy === "send"}
|
||||
reviewed={reviewedMessageKeys.has(String(
|
||||
selectedBuiltMessage.review_key
|
||||
?? builtMessageKey(selectedBuiltMessage, selectedBuiltIndex)
|
||||
))}
|
||||
reviewReason={reviewIssueDecisions[
|
||||
String(selectedBuiltMessage.id ?? "")
|
||||
] ?? ""}
|
||||
onReviewReasonChange={(value) => {
|
||||
const jobId = String(selectedBuiltMessage.id ?? "").trim();
|
||||
if (!jobId) return;
|
||||
setReviewIssueDecisions((current) => ({
|
||||
...current,
|
||||
[jobId]: value
|
||||
}));
|
||||
}}
|
||||
onAcceptReview={(reasonRequired) =>
|
||||
acceptBuiltMessageReview(
|
||||
selectedBuiltMessage,
|
||||
selectedBuiltIndex,
|
||||
reasonRequired
|
||||
)
|
||||
}
|
||||
onSelect={openBuiltMessageAtIndex}
|
||||
onSendSingle={(targetIndex) => {
|
||||
const target = filteredBuiltReviewRows[targetIndex];
|
||||
|
||||
@@ -1,20 +1,30 @@
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import type { ApiSettings, AuthInfo, CampaignListItem } from "../../../types";
|
||||
import { KeyRound, Trash2 } from "lucide-react";
|
||||
import {
|
||||
ArrowRightLeft,
|
||||
Check,
|
||||
KeyRound,
|
||||
Trash2,
|
||||
XCircle
|
||||
} from "lucide-react";
|
||||
import {
|
||||
fetchResourceAccessExplanation,
|
||||
getCampaignShares,
|
||||
campaignShareTargetProvider,
|
||||
revokeCampaignShare,
|
||||
updateCampaignOwner,
|
||||
upsertCampaignShare,
|
||||
type CampaignShare,
|
||||
type ResourceAccessExplanationResponse } from
|
||||
"../../../api/campaigns";
|
||||
import {
|
||||
Button,
|
||||
decideOwnershipTransfer,
|
||||
listOwnershipTransfers,
|
||||
ReferenceSelect,
|
||||
ResourceAccessExplanation,
|
||||
requestResourceOwnership,
|
||||
startOwnershipTransfer,
|
||||
type OwnershipTransfer,
|
||||
type ReferenceOption,
|
||||
type ReferenceOptionProvider
|
||||
} from "@govoplan/core-webui";
|
||||
@@ -45,20 +55,56 @@ export default function CampaignAccessCard({
|
||||
}>({ users: [], groups: [] });
|
||||
const [shares, setShares] = useState<CampaignShare[]>([]);
|
||||
const [ownerOpen, setOwnerOpen] = useState(false);
|
||||
const [requestOpen, setRequestOpen] = useState(false);
|
||||
const [shareOpen, setShareOpen] = useState(false);
|
||||
const [revokeTarget, setRevokeTarget] = useState<CampaignShare | null>(null);
|
||||
const [ownerType, setOwnerType] = useState<TargetType>(campaign.owner_group_id ? "group" : "user");
|
||||
const [ownerId, setOwnerId] = useState(campaign.owner_group_id || campaign.owner_user_id || "");
|
||||
const [ownerReason, setOwnerReason] = useState("");
|
||||
const [ownerExpiryDays, setOwnerExpiryDays] = useState(7);
|
||||
const [ownerRequestKey, setOwnerRequestKey] = useState("");
|
||||
const [requestTargetType, setRequestTargetType] = useState<TargetType>("user");
|
||||
const [requestGroupId, setRequestGroupId] = useState("");
|
||||
const [requestReason, setRequestReason] = useState("");
|
||||
const [requestKey, setRequestKey] = useState("");
|
||||
const [shareType, setShareType] = useState<TargetType>("user");
|
||||
const [shareTargetId, setShareTargetId] = useState("");
|
||||
const [sharePermission, setSharePermission] = useState<"read" | "write">("read");
|
||||
const [accessExplanationOpen, setAccessExplanationOpen] = useState(false);
|
||||
const [accessExplanation, setAccessExplanation] = useState<ResourceAccessExplanationResponse | null>(null);
|
||||
const [accessExplanationLoading, setAccessExplanationLoading] = useState(false);
|
||||
const [ownershipTransfers, setOwnershipTransfers] = useState<OwnershipTransfer[]>([]);
|
||||
const [busy, setBusy] = useState(false);
|
||||
const currentOwnerType: TargetType = campaign.owner_group_id ? "group" : "user";
|
||||
const currentOwnerId = campaign.owner_group_id || campaign.owner_user_id || "";
|
||||
const ownerDirty = ownerOpen && (ownerType !== currentOwnerType || ownerId !== currentOwnerId);
|
||||
const actorId = auth.principal?.membership_id || auth.user.id;
|
||||
const actorGroupIds = new Set(
|
||||
auth.principal?.group_ids ?? auth.groups.map((group) => group.id)
|
||||
);
|
||||
const actorIsCurrentOwner = (
|
||||
currentOwnerType === "user"
|
||||
? currentOwnerId === actorId
|
||||
: actorGroupIds.has(currentOwnerId)
|
||||
);
|
||||
const canProposeOwnership = actorIsCurrentOwner && hasScope(
|
||||
auth,
|
||||
"campaigns:campaign:share"
|
||||
);
|
||||
const canRequestOwnership = !actorIsCurrentOwner && hasScope(
|
||||
auth,
|
||||
"campaigns:campaign:read"
|
||||
);
|
||||
const ownerDirty = ownerOpen && (
|
||||
ownerType !== currentOwnerType
|
||||
|| ownerId !== currentOwnerId
|
||||
|| Boolean(ownerReason)
|
||||
|| ownerExpiryDays !== 7
|
||||
);
|
||||
const requestDirty = requestOpen && (
|
||||
requestTargetType !== "user"
|
||||
|| Boolean(requestGroupId)
|
||||
|| Boolean(requestReason)
|
||||
);
|
||||
const shareDirty = shareOpen && (shareType !== "user" || Boolean(shareTargetId) || sharePermission !== "read");
|
||||
const canExplainResourceAccess =
|
||||
hasScope(auth, "admin:users:read") ||
|
||||
@@ -75,40 +121,62 @@ export default function CampaignAccessCard({
|
||||
);
|
||||
|
||||
useUnsavedDraftGuard({
|
||||
dirty: ownerDirty || shareDirty,
|
||||
dirty: ownerDirty || requestDirty || shareDirty,
|
||||
onSave: saveActiveDialog,
|
||||
onDiscard: () => {
|
||||
closeOwnerDialog();
|
||||
closeRequestDialog();
|
||||
closeShareDialog();
|
||||
}
|
||||
});
|
||||
|
||||
async function load() {
|
||||
let nextShares: CampaignShare[] = [];
|
||||
let nextTransfers: OwnershipTransfer[] = [];
|
||||
try {
|
||||
const nextShares = (await getCampaignShares(settings, campaign.id))
|
||||
nextTransfers = await listOwnershipTransfers(settings, {
|
||||
resourceType: "campaign",
|
||||
resourceId: campaign.id,
|
||||
limit: 100
|
||||
});
|
||||
setOwnershipTransfers(nextTransfers);
|
||||
} catch (err) {
|
||||
onError(err instanceof Error ? err.message : String(err));
|
||||
}
|
||||
try {
|
||||
nextShares = (await getCampaignShares(settings, campaign.id))
|
||||
.filter((item) => !item.revoked_at);
|
||||
const userIds = uniqueTargetIds(
|
||||
nextShares,
|
||||
"user",
|
||||
campaign.owner_user_id
|
||||
);
|
||||
const groupIds = uniqueTargetIds(
|
||||
nextShares,
|
||||
"group",
|
||||
campaign.owner_group_id
|
||||
);
|
||||
const controller = new AbortController();
|
||||
setShares(nextShares);
|
||||
setAvailable(true);
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : String(err);
|
||||
if (message.startsWith("403 ")) {
|
||||
setAvailable(false);
|
||||
} else {
|
||||
onError(message);
|
||||
}
|
||||
}
|
||||
const userIds = uniqueTargetIds(
|
||||
nextShares,
|
||||
nextTransfers,
|
||||
"user",
|
||||
campaign.owner_user_id
|
||||
);
|
||||
const groupIds = uniqueTargetIds(
|
||||
nextShares,
|
||||
nextTransfers,
|
||||
"group",
|
||||
campaign.owner_group_id
|
||||
);
|
||||
const controller = new AbortController();
|
||||
try {
|
||||
const [users, groups] = await Promise.all([
|
||||
resolveReferenceOptions(userTargetProvider, userIds, controller.signal),
|
||||
resolveReferenceOptions(groupTargetProvider, groupIds, controller.signal)
|
||||
]);
|
||||
setTargets({ users, groups });
|
||||
setShares(nextShares);
|
||||
setAvailable(true);
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : String(err);
|
||||
if (message.startsWith("403 ")) setAvailable(false);else
|
||||
onError(message);
|
||||
onError(err instanceof Error ? err.message : String(err));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +210,34 @@ export default function CampaignAccessCard({
|
||||
setOwnerOpen(false);
|
||||
setOwnerType(currentOwnerType);
|
||||
setOwnerId(currentOwnerId);
|
||||
setOwnerReason("");
|
||||
setOwnerExpiryDays(7);
|
||||
setOwnerRequestKey("");
|
||||
}
|
||||
|
||||
function openOwnerDialog() {
|
||||
setOwnerType(currentOwnerType);
|
||||
setOwnerId("");
|
||||
setOwnerReason("");
|
||||
setOwnerExpiryDays(7);
|
||||
setOwnerRequestKey(crypto.randomUUID());
|
||||
setOwnerOpen(true);
|
||||
}
|
||||
|
||||
function closeRequestDialog() {
|
||||
setRequestOpen(false);
|
||||
setRequestTargetType("user");
|
||||
setRequestGroupId("");
|
||||
setRequestReason("");
|
||||
setRequestKey("");
|
||||
}
|
||||
|
||||
function openRequestDialog() {
|
||||
setRequestTargetType("user");
|
||||
setRequestGroupId("");
|
||||
setRequestReason("");
|
||||
setRequestKey(crypto.randomUUID());
|
||||
setRequestOpen(true);
|
||||
}
|
||||
|
||||
function closeShareDialog() {
|
||||
@@ -153,25 +249,78 @@ export default function CampaignAccessCard({
|
||||
|
||||
async function saveActiveDialog(): Promise<boolean> {
|
||||
if (ownerDirty) return saveOwner();
|
||||
if (requestDirty) return requestOwnership();
|
||||
if (shareDirty) return saveShare();
|
||||
return true;
|
||||
}
|
||||
|
||||
async function saveOwner(): Promise<boolean> {
|
||||
if (!ownerId) return false;
|
||||
if (!ownerId || ownerId === currentOwnerId && ownerType === currentOwnerType) {
|
||||
return false;
|
||||
}
|
||||
setBusy(true);
|
||||
try {
|
||||
await updateCampaignOwner(settings, campaign.id, ownerType === "user" ?
|
||||
{ owner_user_id: ownerId, owner_group_id: null } :
|
||||
{ owner_user_id: null, owner_group_id: ownerId });
|
||||
setOwnerOpen(false);
|
||||
await onChanged();
|
||||
await startOwnershipTransfer(settings, {
|
||||
resource: {
|
||||
module_id: "campaigns",
|
||||
resource_type: "campaign",
|
||||
resource_id: campaign.id
|
||||
},
|
||||
target_owner: { type: ownerType, id: ownerId },
|
||||
idempotency_key: ownerRequestKey || crypto.randomUUID(),
|
||||
reason: ownerReason.trim() || null,
|
||||
expiry_days: ownerExpiryDays
|
||||
});
|
||||
closeOwnerDialog();
|
||||
await load();
|
||||
return true;
|
||||
} catch (err) {onError(err instanceof Error ? err.message : String(err));return false;} finally
|
||||
{setBusy(false);}
|
||||
}
|
||||
|
||||
async function requestOwnership(): Promise<boolean> {
|
||||
const targetId = requestTargetType === "user" ? actorId : requestGroupId;
|
||||
if (!targetId) return false;
|
||||
setBusy(true);
|
||||
try {
|
||||
await requestResourceOwnership(settings, {
|
||||
resource: {
|
||||
module_id: "campaigns",
|
||||
resource_type: "campaign",
|
||||
resource_id: campaign.id
|
||||
},
|
||||
target_owner: { type: requestTargetType, id: targetId },
|
||||
idempotency_key: requestKey || crypto.randomUUID(),
|
||||
reason: requestReason.trim() || null,
|
||||
expiry_days: 7
|
||||
});
|
||||
closeRequestDialog();
|
||||
await load();
|
||||
return true;
|
||||
} catch (err) {
|
||||
onError(err instanceof Error ? err.message : String(err));
|
||||
return false;
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function performOwnershipAction(
|
||||
transfer: OwnershipTransfer,
|
||||
action: "owner-approval" | "acceptance" | "decline" | "cancel"
|
||||
) {
|
||||
setBusy(true);
|
||||
try {
|
||||
await decideOwnershipTransfer(settings, transfer.id, action);
|
||||
await onChanged();
|
||||
await load();
|
||||
} catch (err) {
|
||||
onError(err instanceof Error ? err.message : String(err));
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function saveShare(): Promise<boolean> {
|
||||
if (!shareTargetId) return false;
|
||||
setBusy(true);
|
||||
@@ -237,17 +386,74 @@ export default function CampaignAccessCard({
|
||||
{ id: "actions", header: "i18n:govoplan-campaign.actions.c3cd636a", width: 72, resizable: false, sticky: "end", align: "right", render: (row) => <TableActionGroup actions={[{ id: "remove", label: "i18n:govoplan-campaign.remove.e963907d", icon: <Trash2 aria-hidden="true" />, variant: "danger", onClick: () => setRevokeTarget(row) }]} /> }],
|
||||
[targetMap]);
|
||||
|
||||
if (available === false) return null;
|
||||
const canAcceptForGroup = hasScope(
|
||||
auth,
|
||||
"campaigns:ownership:accept_group"
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card title="i18n:govoplan-campaign.ownership_and_sharing.867283c0" actions={<div className="button-row compact-actions"><Button onClick={() => setOwnerOpen(true)} disabled={available !== true}>i18n:govoplan-campaign.change_owner.d3ce16a8</Button><Button onClick={() => setShareOpen(true)} disabled={available !== true}>i18n:govoplan-campaign.share.09ca55ca</Button><Button onClick={() => void openAccessExplanation()} disabled={available !== true || !canExplainResourceAccess}><KeyRound size={16} aria-hidden="true" /> i18n:govoplan-campaign.explain_access.4d5fac37</Button></div>}>
|
||||
<Card title="i18n:govoplan-campaign.ownership_and_sharing.867283c0" actions={<div className="button-row compact-actions">{canProposeOwnership ? <Button onClick={openOwnerDialog}><ArrowRightLeft size={16} aria-hidden="true" /> Transfer ownership</Button> : null}{canRequestOwnership ? <Button onClick={openRequestDialog}><ArrowRightLeft size={16} aria-hidden="true" /> Request ownership</Button> : null}<Button onClick={() => setShareOpen(true)} disabled={available !== true}>i18n:govoplan-campaign.share.09ca55ca</Button><Button onClick={() => void openAccessExplanation()} disabled={!canExplainResourceAccess}><KeyRound size={16} aria-hidden="true" /> i18n:govoplan-campaign.explain_access.4d5fac37</Button></div>}>
|
||||
<p><strong>i18n:govoplan-campaign.owner.719379ae</strong> {ownerLabel}</p>
|
||||
<p className="muted small-note">i18n:govoplan-campaign.permissions_define_what_a_role_may_do_ownership_.9f8baaa2</p>
|
||||
<DataGrid id={`campaign-${campaign.id}-shares`} rows={shares} columns={columns} getRowKey={(row) => row.id} emptyText={available === null ? "i18n:govoplan-campaign.loading_campaign_access.056299e3" : "i18n:govoplan-campaign.this_campaign_has_no_explicit_shares.978012d1"} />
|
||||
<p className="muted small-note">Ownership changes require acceptance by the new owner. They never transfer private encryption keys. A completed transfer clears owner-scoped mail profile selection and requires revalidation.</p>
|
||||
{ownershipTransfers.length > 0 ? (
|
||||
<section className="campaign-ownership-transfers">
|
||||
<h3>Ownership requests and history</h3>
|
||||
<div className="campaign-ownership-transfer-list">
|
||||
{ownershipTransfers.map((transfer) => {
|
||||
const actions = ownershipTransferActions(transfer, {
|
||||
actorId,
|
||||
actorGroupIds,
|
||||
canShare: hasScope(auth, "campaigns:campaign:share"),
|
||||
canAcceptForGroup
|
||||
});
|
||||
return (
|
||||
<div className="campaign-ownership-transfer" key={transfer.id}>
|
||||
<div className="campaign-ownership-transfer-main">
|
||||
<span>
|
||||
<strong>{ownershipSubjectLabel(transfer.target_owner, targetMap)}</strong>
|
||||
<small>{ownershipPendingParty(transfer)}</small>
|
||||
</span>
|
||||
<StatusBadge status={transfer.status} label={transfer.status.replace(/_/g, " ")} />
|
||||
</div>
|
||||
<div className="campaign-ownership-transfer-meta">
|
||||
<span>{transfer.kind.replace(/_/g, " ")}</span>
|
||||
<span>Expires {formatOwnershipDate(transfer.expires_at)}</span>
|
||||
{transfer.reason ? <span>{transfer.reason}</span> : null}
|
||||
</div>
|
||||
{actions.length > 0 ? (
|
||||
<div className="button-row compact-actions">
|
||||
{actions.map((action) => (
|
||||
<Button
|
||||
key={action.id}
|
||||
variant={action.variant}
|
||||
disabled={busy}
|
||||
onClick={() => void performOwnershipAction(transfer, action.id)}
|
||||
>
|
||||
{action.id === "acceptance" || action.id === "owner-approval" ? <Check size={15} aria-hidden="true" /> : <XCircle size={15} aria-hidden="true" />}
|
||||
{action.label}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
) : null}
|
||||
{available === true ? (
|
||||
<DataGrid id={`campaign-${campaign.id}-shares`} rows={shares} columns={columns} getRowKey={(row) => row.id} emptyText="i18n:govoplan-campaign.this_campaign_has_no_explicit_shares.978012d1" />
|
||||
) : (
|
||||
<p className="muted small-note">
|
||||
{available === null
|
||||
? "i18n:govoplan-campaign.loading_campaign_access.056299e3"
|
||||
: "Explicit shares are visible only to authorized campaign access managers."}
|
||||
</p>
|
||||
)}
|
||||
</Card>
|
||||
|
||||
<Dialog open={ownerOpen} className="campaign-access-dialog" title="i18n:govoplan-campaign.change_campaign_owner.63f80aef" onClose={() => !busy && closeOwnerDialog()} footer={<><Button onClick={closeOwnerDialog} disabled={busy}>i18n:govoplan-campaign.cancel.77dfd213</Button><Button variant="primary" onClick={() => void saveOwner()} disabled={busy || !ownerId}>i18n:govoplan-campaign.save_owner.b6763847</Button></>}>
|
||||
<Dialog open={ownerOpen} className="campaign-access-dialog" title="Transfer campaign ownership" onClose={() => !busy && closeOwnerDialog()} footer={<><Button onClick={closeOwnerDialog} disabled={busy}>i18n:govoplan-campaign.cancel.77dfd213</Button><Button variant="primary" onClick={() => void saveOwner()} disabled={busy || !ownerId || ownerType === currentOwnerType && ownerId === currentOwnerId}>Propose transfer</Button></>}>
|
||||
<FormField label="i18n:govoplan-campaign.owner_type.6b86eacc"><select value={ownerType} onChange={(event) => {const next = event.target.value as TargetType;setOwnerType(next);setOwnerId("");}}><option value="user">i18n:govoplan-campaign.user.9f8a2389</option><option value="group">i18n:govoplan-campaign.group.171a0606</option></select></FormField>
|
||||
<FormField label="i18n:govoplan-campaign.owner.89ff3122">
|
||||
<ReferenceSelect
|
||||
@@ -259,7 +465,40 @@ export default function CampaignAccessCard({
|
||||
placeholder="i18n:govoplan-campaign.select.349ac8fb"
|
||||
/>
|
||||
</FormField>
|
||||
<p className="muted small-note">Changing the owner clears a selected reusable mail profile from the editable current version and requires profile reselection plus validation before live delivery.</p>
|
||||
<FormField label="Reason" help="Optional context shown to the proposed owner and retained in the decision history.">
|
||||
<textarea rows={3} maxLength={4000} value={ownerReason} onChange={(event) => setOwnerReason(event.target.value)} />
|
||||
</FormField>
|
||||
<FormField label="Expires after">
|
||||
<select value={ownerExpiryDays} onChange={(event) => setOwnerExpiryDays(Number(event.target.value))}>
|
||||
<option value={1}>1 day</option>
|
||||
<option value={3}>3 days</option>
|
||||
<option value={7}>7 days</option>
|
||||
<option value={14}>14 days</option>
|
||||
<option value={30}>30 days</option>
|
||||
</select>
|
||||
</FormField>
|
||||
<p className="muted small-note">The current owner remains responsible until the target accepts. The transfer is cancelled safely if it expires.</p>
|
||||
</Dialog>
|
||||
|
||||
<Dialog open={requestOpen} className="campaign-access-dialog" title="Request campaign ownership" onClose={() => !busy && closeRequestDialog()} footer={<><Button onClick={closeRequestDialog} disabled={busy}>i18n:govoplan-campaign.cancel.77dfd213</Button><Button variant="primary" onClick={() => void requestOwnership()} disabled={busy || requestTargetType === "group" && !requestGroupId}>Submit request</Button></>}>
|
||||
<FormField label="Requested owner">
|
||||
<select value={requestTargetType} onChange={(event) => { setRequestTargetType(event.target.value as TargetType); setRequestGroupId(""); }}>
|
||||
<option value="user">My account</option>
|
||||
{canAcceptForGroup && auth.groups.length > 0 ? <option value="group">A group I manage</option> : null}
|
||||
</select>
|
||||
</FormField>
|
||||
{requestTargetType === "group" ? (
|
||||
<FormField label="Group">
|
||||
<select value={requestGroupId} onChange={(event) => setRequestGroupId(event.target.value)}>
|
||||
<option value="">Select a group</option>
|
||||
{auth.groups.map((group) => <option key={group.id} value={group.id}>{group.name}</option>)}
|
||||
</select>
|
||||
</FormField>
|
||||
) : null}
|
||||
<FormField label="Reason" help="Optional context for the current owner.">
|
||||
<textarea rows={3} maxLength={4000} value={requestReason} onChange={(event) => setRequestReason(event.target.value)} />
|
||||
</FormField>
|
||||
<p className="muted small-note">The current owner must approve this request. You must then accept once more before ownership changes.</p>
|
||||
</Dialog>
|
||||
|
||||
<Dialog open={shareOpen} className="campaign-access-dialog" title="i18n:govoplan-campaign.share_campaign.b605982b" onClose={() => !busy && closeShareDialog()} footer={<><Button onClick={closeShareDialog} disabled={busy}>i18n:govoplan-campaign.cancel.77dfd213</Button><Button variant="primary" onClick={() => void saveShare()} disabled={busy || !shareTargetId}>i18n:govoplan-campaign.save_share.bcf6ed94</Button></>}>
|
||||
@@ -288,6 +527,7 @@ export default function CampaignAccessCard({
|
||||
|
||||
function uniqueTargetIds(
|
||||
shares: readonly CampaignShare[],
|
||||
transfers: readonly OwnershipTransfer[],
|
||||
targetType: TargetType,
|
||||
ownerId?: string | null
|
||||
): string[] {
|
||||
@@ -295,10 +535,152 @@ function uniqueTargetIds(
|
||||
...(ownerId ? [ownerId] : []),
|
||||
...shares
|
||||
.filter((share) => share.target_type === targetType)
|
||||
.map((share) => share.target_id)
|
||||
.map((share) => share.target_id),
|
||||
...transfers.flatMap((transfer) => [
|
||||
...(transfer.current_owner.type === targetType
|
||||
? [transfer.current_owner.id]
|
||||
: []),
|
||||
...(transfer.target_owner.type === targetType
|
||||
? [transfer.target_owner.id]
|
||||
: [])
|
||||
])
|
||||
])];
|
||||
}
|
||||
|
||||
type OwnershipUiAction = {
|
||||
id: "owner-approval" | "acceptance" | "decline" | "cancel";
|
||||
label: string;
|
||||
variant?: "primary" | "danger";
|
||||
};
|
||||
|
||||
function ownershipTransferActions(
|
||||
transfer: OwnershipTransfer,
|
||||
context: {
|
||||
actorId: string;
|
||||
actorGroupIds: ReadonlySet<string>;
|
||||
canShare: boolean;
|
||||
canAcceptForGroup: boolean;
|
||||
}
|
||||
): OwnershipUiAction[] {
|
||||
const controlsCurrent = controlsOwnershipSubject(
|
||||
transfer.current_owner,
|
||||
context
|
||||
);
|
||||
const controlsTarget = controlsOwnershipSubject(
|
||||
transfer.target_owner,
|
||||
context
|
||||
);
|
||||
if (transfer.status === "awaiting_owner_approval") {
|
||||
return [
|
||||
...(controlsCurrent && context.canShare
|
||||
? [
|
||||
{
|
||||
id: "owner-approval" as const,
|
||||
label: "Approve",
|
||||
variant: "primary" as const
|
||||
},
|
||||
{
|
||||
id: "decline" as const,
|
||||
label: "Decline",
|
||||
variant: "danger" as const
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(controlsTarget
|
||||
? [
|
||||
{
|
||||
id: "cancel" as const,
|
||||
label: "Cancel request",
|
||||
variant: "danger" as const
|
||||
}
|
||||
]
|
||||
: [])
|
||||
];
|
||||
}
|
||||
if (transfer.status === "awaiting_target_acceptance") {
|
||||
return [
|
||||
...(controlsTarget
|
||||
? [
|
||||
{
|
||||
id: "acceptance" as const,
|
||||
label: "Accept ownership",
|
||||
variant: "primary" as const
|
||||
},
|
||||
{
|
||||
id: "decline" as const,
|
||||
label: "Decline",
|
||||
variant: "danger" as const
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(controlsCurrent && context.canShare
|
||||
? [
|
||||
{
|
||||
id: "cancel" as const,
|
||||
label: "Cancel transfer",
|
||||
variant: "danger" as const
|
||||
}
|
||||
]
|
||||
: [])
|
||||
];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function controlsOwnershipSubject(
|
||||
subject: { type: string; id: string },
|
||||
context: {
|
||||
actorId: string;
|
||||
actorGroupIds: ReadonlySet<string>;
|
||||
canAcceptForGroup: boolean;
|
||||
}
|
||||
): boolean {
|
||||
if (subject.type === "group") {
|
||||
return (
|
||||
context.canAcceptForGroup
|
||||
&& context.actorGroupIds.has(subject.id)
|
||||
);
|
||||
}
|
||||
return subject.type === "user" && subject.id === context.actorId;
|
||||
}
|
||||
|
||||
function ownershipSubjectLabel(
|
||||
subject: { type: string; id: string },
|
||||
targets: ReadonlyMap<string, ReferenceOption>
|
||||
): string {
|
||||
return (
|
||||
targets.get(`${subject.type}:${subject.id}`)?.label
|
||||
|| `${subject.type} ${subject.id}`
|
||||
);
|
||||
}
|
||||
|
||||
function ownershipPendingParty(transfer: OwnershipTransfer): string {
|
||||
if (transfer.status === "awaiting_owner_approval") {
|
||||
return "Waiting for the current owner";
|
||||
}
|
||||
if (transfer.status === "awaiting_target_acceptance") {
|
||||
return "Waiting for the proposed owner";
|
||||
}
|
||||
if (transfer.status === "awaiting_recovery_approvals") {
|
||||
return `Waiting for recovery quorum (${transfer.approvals.length}/${transfer.required_approvals})`;
|
||||
}
|
||||
if (transfer.status === "recovery_scheduled") {
|
||||
return transfer.execute_after
|
||||
? `Recovery available after ${formatOwnershipDate(transfer.execute_after)}`
|
||||
: "Recovery approval complete";
|
||||
}
|
||||
return transfer.decisions.at(-1)?.action.replace(/_/g, " ") || transfer.status;
|
||||
}
|
||||
|
||||
function formatOwnershipDate(value: string): string {
|
||||
const date = new Date(value);
|
||||
if (Number.isNaN(date.getTime())) return value;
|
||||
return new Intl.DateTimeFormat(undefined, {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "short"
|
||||
}).format(date);
|
||||
}
|
||||
|
||||
async function resolveReferenceOptions(
|
||||
provider: ReferenceOptionProvider,
|
||||
values: readonly string[],
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { Button, i18nMessage } from "@govoplan/core-webui";
|
||||
import {
|
||||
Button,
|
||||
FormField,
|
||||
i18nMessage
|
||||
} from "@govoplan/core-webui";
|
||||
|
||||
import CampaignMessagePreviewOverlay, {
|
||||
type CampaignMessagePreviewAttachment
|
||||
@@ -16,6 +20,10 @@ import {
|
||||
numberOrUndefined,
|
||||
stringOrUndefined
|
||||
} from "./reviewFormatters";
|
||||
import {
|
||||
messageNeedsExplicitReview,
|
||||
messageRequiresAttachmentOverrideReason
|
||||
} from "./builtMessageQuery";
|
||||
|
||||
export default function BuiltMessagePreview({
|
||||
campaignJson,
|
||||
@@ -24,6 +32,10 @@ export default function BuiltMessagePreview({
|
||||
index,
|
||||
canStartSingleMessageSend,
|
||||
singleMessageSendBusy,
|
||||
reviewed,
|
||||
reviewReason,
|
||||
onReviewReasonChange,
|
||||
onAcceptReview,
|
||||
onSelect,
|
||||
onSendSingle,
|
||||
onClose
|
||||
@@ -34,6 +46,10 @@ export default function BuiltMessagePreview({
|
||||
index: number;
|
||||
canStartSingleMessageSend: boolean;
|
||||
singleMessageSendBusy: boolean;
|
||||
reviewed: boolean;
|
||||
reviewReason: string;
|
||||
onReviewReasonChange: (value: string) => void;
|
||||
onAcceptReview: (reasonRequired: boolean) => void;
|
||||
onSelect: (index: number) => void;
|
||||
onSendSingle: (index: number) => void;
|
||||
onClose: () => void;
|
||||
@@ -73,6 +89,8 @@ export default function BuiltMessagePreview({
|
||||
row,
|
||||
canStartSingleMessageSend
|
||||
);
|
||||
const explicitReview = messageNeedsExplicitReview(row);
|
||||
const reasonRequired = messageRequiresAttachmentOverrideReason(row);
|
||||
|
||||
return (
|
||||
<CampaignMessagePreviewOverlay
|
||||
@@ -109,14 +127,47 @@ export default function BuiltMessagePreview({
|
||||
onLast: () => onSelect(rows.length - 1)
|
||||
}}
|
||||
actions={
|
||||
<Button
|
||||
variant="primary"
|
||||
disabled={singleMessageSendBusy || Boolean(singleSendDisabledReason)}
|
||||
title={singleSendDisabledReason || "Test, send, or resend only this built message"}
|
||||
onClick={() => onSendSingle(index)}
|
||||
>
|
||||
{singleMessageSendBusy ? "Sending..." : "Message actions..."}
|
||||
</Button>
|
||||
<div className="built-message-review-actions">
|
||||
{explicitReview && !reviewed ? (
|
||||
<>
|
||||
<FormField
|
||||
label={
|
||||
reasonRequired
|
||||
? "Reason for accepting attachment exception"
|
||||
: "Review note"
|
||||
}
|
||||
help={
|
||||
reasonRequired
|
||||
? "Required. This reason is stored with the frozen build evidence."
|
||||
: "Optional note stored with the review decision."
|
||||
}
|
||||
>
|
||||
<input
|
||||
value={reviewReason}
|
||||
maxLength={4000}
|
||||
onChange={(event) =>
|
||||
onReviewReasonChange(event.target.value)
|
||||
}
|
||||
/>
|
||||
</FormField>
|
||||
<Button
|
||||
variant="primary"
|
||||
disabled={reasonRequired && !reviewReason.trim()}
|
||||
onClick={() => onAcceptReview(reasonRequired)}
|
||||
>
|
||||
Accept review conditions
|
||||
</Button>
|
||||
</>
|
||||
) : null}
|
||||
<Button
|
||||
variant={explicitReview && !reviewed ? undefined : "primary"}
|
||||
disabled={singleMessageSendBusy || Boolean(singleSendDisabledReason)}
|
||||
title={singleSendDisabledReason || "Test, send, or resend only this built message"}
|
||||
onClick={() => onSendSingle(index)}
|
||||
>
|
||||
{singleMessageSendBusy ? "Sending..." : "Message actions..."}
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
onClose={onClose}
|
||||
/>
|
||||
|
||||
@@ -61,22 +61,39 @@ export function storedMessageReviewState(version: CampaignVersionDetail | null):
|
||||
buildToken: string;
|
||||
inspectionComplete: boolean;
|
||||
reviewedMessageKeys: string[];
|
||||
issueDecisions: Array<Record<string, unknown>>;
|
||||
} {
|
||||
const build = asRecord(version?.build_summary);
|
||||
const buildToken = String(build.build_token ?? build.built_at ?? "");
|
||||
const review = asRecord(asRecord(version?.editor_state).review_send);
|
||||
if (!buildToken || String(review.build_token ?? "") !== buildToken) {
|
||||
return { buildToken, inspectionComplete: false, reviewedMessageKeys: [] };
|
||||
return {
|
||||
buildToken,
|
||||
inspectionComplete: false,
|
||||
reviewedMessageKeys: [],
|
||||
issueDecisions: []
|
||||
};
|
||||
}
|
||||
return {
|
||||
buildToken,
|
||||
inspectionComplete: review.inspection_complete === true,
|
||||
reviewedMessageKeys: asArray(review.reviewed_message_keys).filter(
|
||||
(value): value is string => typeof value === "string"
|
||||
)
|
||||
),
|
||||
issueDecisions: asArray(review.issue_decisions).map(asRecord)
|
||||
};
|
||||
}
|
||||
|
||||
export function messageRequiresAttachmentOverrideReason(
|
||||
row: Record<string, unknown>
|
||||
): boolean {
|
||||
return asArray(row.issues).some((value) => {
|
||||
const issue = asRecord(value);
|
||||
return String(issue.behavior ?? "").toLowerCase() === "ask"
|
||||
&& String(issue.source ?? "").startsWith("attachments");
|
||||
});
|
||||
}
|
||||
|
||||
export function builtMessageKey(row: Record<string, unknown>, index: number): string {
|
||||
return String(row.entry_id ?? row.entry_index ?? index);
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ export function normalizeAttachmentRules(value: unknown): AttachmentRule[] {
|
||||
file_filter: getText(rule, "file_filter") || getText(rule, "file") || getText(rule, "filename") || getText(rule, "path"),
|
||||
include_subdirs: getBool(rule, "include_subdirs"),
|
||||
required: getBool(rule, "required", true),
|
||||
missing_behavior: getText(rule, "missing_behavior", "ask"),
|
||||
...(getText(rule, "missing_behavior") ? { missing_behavior: getText(rule, "missing_behavior") } : {}),
|
||||
ambiguous_behavior: getText(rule, "ambiguous_behavior", "ask"),
|
||||
...(isRecord(rule.zip) ? { zip: rule.zip } : {})
|
||||
}));
|
||||
|
||||
@@ -29,7 +29,7 @@ export function ensureCampaignDraft(version: CampaignVersionDetail | null): Reco
|
||||
send_without_attachments: true,
|
||||
send_without_attachments_behavior: "continue",
|
||||
global: [],
|
||||
missing_behavior: "ask",
|
||||
missing_behavior: "warn",
|
||||
ambiguous_behavior: "ask",
|
||||
...sourceAttachments
|
||||
};
|
||||
|
||||
@@ -161,7 +161,7 @@ export function AttachmentsStep({ draft, patch }: WizardStepProps) {
|
||||
</div>
|
||||
<div className="form-grid compact responsive-form-grid">
|
||||
<FormField label="i18n:govoplan-campaign.campaign_attachment_base_path.84827619"><input value={getText(attachments, "base_path", ".")} onChange={(event) => patch(["attachments", "base_path"], event.target.value)} /></FormField>
|
||||
<FormField label="i18n:govoplan-campaign.missing_behavior.de3d1ac7"><select value={getText(attachments, "missing_behavior", "ask")} onChange={(event) => patch(["attachments", "missing_behavior"], event.target.value)}>{behaviorOptions.map((option) => <option key={option}>{option}</option>)}</select></FormField>
|
||||
<FormField label="i18n:govoplan-campaign.missing_behavior.de3d1ac7"><select value={getText(attachments, "missing_behavior", "warn")} onChange={(event) => patch(["attachments", "missing_behavior"], event.target.value)}>{behaviorOptions.map((option) => <option key={option}>{option}</option>)}</select></FormField>
|
||||
<FormField label="i18n:govoplan-campaign.ambiguous_behavior.e86e724b"><select value={getText(attachments, "ambiguous_behavior", "ask")} onChange={(event) => patch(["attachments", "ambiguous_behavior"], event.target.value)}>{behaviorOptions.map((option) => <option key={option}>{option}</option>)}</select></FormField>
|
||||
<ToggleSwitch label="i18n:govoplan-campaign.allow_individual_attachments.a6ff0e87" checked={getBool(attachments, "allow_individual")} onChange={(checked) => patch(["attachments", "allow_individual"], checked)} />
|
||||
</div>
|
||||
|
||||
@@ -1351,6 +1351,22 @@
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.built-message-review-actions {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.built-message-review-actions .form-field {
|
||||
width: min(360px, 36vw);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.built-message-review-actions input {
|
||||
width: 100%;
|
||||
min-height: 34px;
|
||||
}
|
||||
|
||||
.message-preview-modal .message-display-panel {
|
||||
flex: 1 1 auto;
|
||||
grid-template-rows: auto minmax(0, 1fr) auto;
|
||||
@@ -2752,6 +2768,61 @@
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
.campaign-ownership-transfers {
|
||||
display: grid;
|
||||
gap: 7px;
|
||||
margin: 12px 0;
|
||||
}
|
||||
.campaign-ownership-transfers h3 {
|
||||
margin: 0;
|
||||
color: var(--text-strong);
|
||||
font-size: 13px;
|
||||
}
|
||||
.campaign-ownership-transfer-list {
|
||||
display: grid;
|
||||
border-block: var(--border-line);
|
||||
}
|
||||
.campaign-ownership-transfer {
|
||||
display: grid;
|
||||
gap: 7px;
|
||||
padding: 9px 2px;
|
||||
}
|
||||
.campaign-ownership-transfer + .campaign-ownership-transfer {
|
||||
border-top: var(--border-line);
|
||||
}
|
||||
.campaign-ownership-transfer-main,
|
||||
.campaign-ownership-transfer-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
}
|
||||
.campaign-ownership-transfer-main {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.campaign-ownership-transfer-main > span:first-child {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
}
|
||||
.campaign-ownership-transfer-main strong,
|
||||
.campaign-ownership-transfer-main small,
|
||||
.campaign-ownership-transfer-meta span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.campaign-ownership-transfer-main small,
|
||||
.campaign-ownership-transfer-meta {
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
.campaign-ownership-transfer-meta {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.campaign-ownership-transfer-meta span + span::before {
|
||||
margin-right: 9px;
|
||||
color: var(--line-strong);
|
||||
content: "·";
|
||||
}
|
||||
|
||||
/* Campaign policy tables. */
|
||||
.campaign-policy-row {
|
||||
|
||||
Reference in New Issue
Block a user