-
Notifications
You must be signed in to change notification settings - Fork 889
feat: edit workspace schedule page #1701
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
Changes from all commits
58ecefa
3f73a6c
30dff81
ecc6792
c0f28c3
d61a332
f60f59b
406d465
a6dff9d
7a14859
1158645
7a050db
1166924
947b4a0
4764e5c
ebc4965
747b52f
854f781
8bedc8a
6afbb74
5bacfb1
5b3adc3
81e7e05
531df3e
7ae590a
262d9e3
5d22197
eda8ad8
f59f056
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import dayjs from "dayjs" | |
import duration from "dayjs/plugin/duration" | ||
import relativeTime from "dayjs/plugin/relativeTime" | ||
import React from "react" | ||
import { Link as RouterLink } from "react-router-dom" | ||
import { Workspace } from "../../api/typesGenerated" | ||
import { MONOSPACE_FONT_FAMILY } from "../../theme/constants" | ||
import { extractTimezone, stripTimezone } from "../../util/schedule" | ||
|
@@ -78,7 +79,9 @@ export const WorkspaceSchedule: React.FC<WorkspaceScheduleProps> = ({ workspace | |
<span className={styles.scheduleValue}>{Language.autoStopDisplay(workspace)}</span> | ||
</div> | ||
<div> | ||
<Link className={styles.scheduleAction}>{Language.editScheduleLink}</Link> | ||
<Link className={styles.scheduleAction} component={RouterLink} to={`/workspaces/${workspace.id}/schedule`}> | ||
{Language.editScheduleLink} | ||
</Link> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review: The dashboard link to edit a workspace schedule now works! |
||
</div> | ||
</Stack> | ||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,5 @@ const Template: Story<WorkspaceScheduleFormProps> = (args) => <WorkspaceSchedule | |
export const Example = Template.bind({}) | ||
Example.args = { | ||
onCancel: () => action("onCancel"), | ||
onSubmit: () => { | ||
action("onSubmit") | ||
return Promise.resolve() | ||
}, | ||
onSubmit: () => action("onSubmit"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review: You'll see this show up in the In other words, there is a bit of a 'fire-n-forget' from Formik's point of view, but since we also pass in |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review:
A route
/workspaces/:workspace/schedule
was added to view the form