8000 feat: update workspace deadline when workspace ttl updated by johnstcn · Pull Request #2165 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: update workspace deadline when workspace ttl updated #2165

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 20 commits into from
Jun 9, 2022
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
Next Next commit
apply suggestions from code review
  • Loading branch information
johnstcn committed Jun 9, 2022
commit a372dce38dcd284abb2c7c4504048b7c28824505
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface WorkspaceScheduleFormProps {
fieldErrors?: FieldErrors
initialValues?: WorkspaceScheduleFormValues
isLoading: boolean
now: dayjs.Dayjs
now?: dayjs.Dayjs
onCancel: () => void
onSubmit: (values: WorkspaceScheduleFormValues) => void
workspace: Workspace
Expand Down Expand Up @@ -182,7 +182,7 @@ export const WorkspaceScheduleForm: FC<WorkspaceScheduleFormProps> = ({
...WorkspaceScheduleFormInitialValues,
},
isLoading,
now: now,
now = dayjs(),
onCancel,
onSubmit,
workspace,
Expand Down Expand Up @@ -265,7 +265,7 @@ export const WorkspaceScheduleForm: FC<WorkspaceScheduleFormProps> = ({
</FormControl>

<TextField
{...formHelpers("ttl", ttlShutdownAt(now, workspace, form.values.timezone, form.values.ttl))}
{...formHelpers("ttl", ttlShutdownAt(now!, workspace, form.values.timezone, form.values.ttl))}
disabled={isLoading}
inputProps={{ min: 0, step: 1 }}
label={Language.ttlLabel}
Expand Down
0