feat: allow removing deadline for running workspace (#16085)

Fixes https://github.com/coder/coder/issues/9775

When a workspace's TTL is removed, and the workspace is running, the
deadline is removed from the workspace.

This also modifies the frontend to not show a confirmation dialog when
the change is to remove autostop.
This commit is contained in:
Danielle Maywood
2025-01-13 21:37:57 +00:00
committed by GitHub
parent 048a10a318
commit 7c595e2631
4 changed files with 114 additions and 32 deletions
@@ -118,7 +118,10 @@ export const WorkspaceSchedulePage: FC = () => {
await submitScheduleMutation.mutateAsync(data);
if (data.autostopChanged) {
if (
data.autostopChanged &&
getAutostop(workspace).autostopEnabled
) {
setIsConfirmingApply(true);
}
}}