Skip to content

Commit

Permalink
Allows for aborting scheduled campaigns (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
pushchris authored Apr 23, 2023
1 parent 4813cce commit 7bd7734
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions apps/ui/src/views/campaign/CampaignDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,37 @@ export default function CampaignDetail() {
]

const action = {
draft: <Button icon={<SendIcon />} onClick={() => setIsLaunchOpen(true)}>Launch Campaign</Button>,
aborted: <Button icon={<RestartIcon />} onClick={() => setIsLaunchOpen(true)}>Restart Campaign</Button>,
draft: (
<Button
icon={<SendIcon />}
onClick={() => setIsLaunchOpen(true)}
>Launch Campaign</Button>
),
aborted: (
<Button
icon={<RestartIcon />}
onClick={() => setIsLaunchOpen(true)}
>Restart Campaign</Button>
),
pending: <></>,
scheduled: <Button icon={<SendIcon />} onClick={() => setIsLaunchOpen(true)}>Change Schedule</Button>,
running: <Button icon={<ForbiddenIcon />} onClick={async () => await handleAbort()}>Abort Campaign</Button>,
scheduled: (
<>
<Button
icon={<SendIcon />}
onClick={() => setIsLaunchOpen(true)}
>Change Schedule</Button>
<Button
icon={<ForbiddenIcon />}
onClick={async () => await handleAbort()}
>Abort Campaign</Button>
</>
),
running: (
<Button
icon={<ForbiddenIcon />}
onClick={async () => await handleAbort()}
>Abort Campaign</Button>
),
finished: <></>,
}

Expand Down

0 comments on commit 7bd7734

Please sign in to comment.