Skip to content

chore(site): remove workspace schedule machine #10583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix confirm apply
  • Loading branch information
BrunoQuaresma committed Nov 8, 2023
commit a3a09ae346516be5c692439f1b5d94b4fbe14684
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const WorkspaceSchedulePage: FC = () => {
navigate(`/@${username}/${workspaceName}`);
}}
onSubmit={async (values) => {
await submitScheduleMutation.mutateAsync({
const data = {
workspace,
autostart: formValuesToAutostartRequest(values),
ttl: formValuesToTTLRequest(values),
Expand All @@ -120,8 +120,13 @@ export const WorkspaceSchedulePage: FC = () => {
values,
),
autostopChanged: scheduleChanged(getAutostop(workspace), values),
});
setIsConfirmingApply(true);
};

await submitScheduleMutation.mutateAsync(data);

if (data.autostopChanged) {
setIsConfirmingApply(true);
}
}}
/>
)}
Expand Down