fix(campaigns): hide direct remove-test button on active campaigns
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled

Direct test removal is now gated to draft-only at the service layer
(active campaigns must go through a modification request that a
manager approves). The trash-icon button on the tests table still
showed for active campaigns and would always fail with a 400 —
restrict it to draft, matching the backend gate.
This commit is contained in:
kitos
2026-07-04 11:56:04 +02:00
parent 164ef25393
commit af65681179
+1 -1
View File
@@ -734,7 +734,7 @@ export default function CampaignDetailPage() {
>
<Clock className="h-4 w-4" />
</button>
{canManage && (campaign.status === "draft" || campaign.status === "active") && (
{canManage && campaign.status === "draft" && (
<button
onClick={() => removeMutation.mutate(ct.id)}
disabled={removeMutation.isPending}