Skip to content

feat(campaign-stats): conditionally show autosending button - #226

Open
ajohn25 wants to merge 1 commit into
mainfrom
feat-stats-btns
Open

feat(campaign-stats): conditionally show autosending button#226
ajohn25 wants to merge 1 commit into
mainfrom
feat-stats-btns

Conversation

@ajohn25

@ajohn25 ajohn25 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Description

This refactors the buttons on the campaign stats page in the following way:

  1. If a campaign isn't ready to start, only the Edit button appears (so the admin can go to the edit page and fill in details
  2. If a campaign is ready to start, a "Start campaign" button appears. When clicked, it's replaced by the Autosending button (if autosending is enabled
  3. If a campaign is started (and autosending is enabled), show the Autosending button

A few related bug fixes are also added here:

  1. Checking for the ENABLE_AUTOSENDING variable before showing the Autosending button
  2. Fetching autosending campaigns using cache-and-network policy, so that clicking "Start campaign" followed by "Autosending" allows admins to immediately begin autosending the newly started campaign, rather than having to refresh the page

Motivation and Context

Admins reported confusion about clicking the autosending button for the campaign and not seeing it show up because the campaign was unstarted

How Has This Been Tested?

This has been tested locally

Screenshots (if appropriate):

Documentation Changes

Checklist:

  • My change requires a change to the documentation.
  • I have included updates for the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant