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
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:
@@ -734,7 +734,7 @@ export default function CampaignDetailPage() {
|
|||||||
>
|
>
|
||||||
<Clock className="h-4 w-4" />
|
<Clock className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
{canManage && (campaign.status === "draft" || campaign.status === "active") && (
|
{canManage && campaign.status === "draft" && (
|
||||||
<button
|
<button
|
||||||
onClick={() => removeMutation.mutate(ct.id)}
|
onClick={() => removeMutation.mutate(ct.id)}
|
||||||
disabled={removeMutation.isPending}
|
disabled={removeMutation.isPending}
|
||||||
|
|||||||
Reference in New Issue
Block a user