fix(campaigns): start_date modal + hide future-campaign tests from queue
Backend: activate endpoint returns 409 with structured warning when start_date is in the future; accepts force=true to bypass. test_crud_service: always excludes tests from draft campaigns with future start_date so they do not appear in the team queue prematurely. Frontend: catches 409 on activate and shows amber confirmation modal with Keep scheduled / Activate now anyway options.
This commit is contained in:
@@ -134,8 +134,12 @@ export async function removeTestFromCampaign(
|
||||
}
|
||||
|
||||
/** Activate a campaign. */
|
||||
export async function activateCampaign(campaignId: string): Promise<Campaign> {
|
||||
const { data } = await client.post<Campaign>(`/campaigns/${campaignId}/activate`);
|
||||
export async function activateCampaign(
|
||||
campaignId: string,
|
||||
options?: { force?: boolean },
|
||||
): Promise<Campaign> {
|
||||
const params = options?.force ? "?force=true" : "";
|
||||
const { data } = await client.post<Campaign>(`/campaigns/${campaignId}/activate${params}`);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user