File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
xServices/workspaceSchedule Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import axios , { AxiosRequestHeaders } from "axios"
2+ import dayjs from "dayjs"
23import * as Types from "./types"
34import { WorkspaceBuildTransition } from "./types"
45import * as TypesGen from "./typesGenerated"
5- import dayjs from "dayjs"
66
77const CONTENT_TYPE_JSON : AxiosRequestHeaders = {
88 "Content-Type" : "application/json" ,
Original file line number Diff line number Diff line change 22 * @fileoverview workspaceScheduleBanner is an xstate machine backing a form,
33 * presented as an Alert/banner, for reactively updating a workspace schedule.
44 */
5+ import dayjs from "dayjs"
56import { createMachine } from "xstate"
67import * as API from "../../api/api"
7- import dayjs from "dayjs"
88import { displayError , displaySuccess } from "../../components/GlobalSnackbar/utils"
99
1010export const Language = {
1111 errorExtension : "Failed to extend workspace deadline." ,
1212 successExtension : "Successfully extended workspace deadline." ,
1313}
1414
15- export type WorkspaceScheduleBannerEvent = { type : "UPDATE_DEADLINE" ; workspaceId : string , newDeadline : dayjs . Dayjs }
15+ export type WorkspaceScheduleBannerEvent = {
16+ type : "UPDATE_DEADLINE"
17+ workspaceId : string
18+ newDeadline : dayjs . Dayjs
19+ }
1620
1721export const workspaceScheduleBannerMachine = createMachine (
1822 {
@@ -57,7 +61,7 @@ export const workspaceScheduleBannerMachine = createMachine(
5761
5862 services : {
5963 updateDeadline : async ( _ , event ) => {
60- await API . putWorkspaceExtension ( event . workspaceId , event . newDeadline )
64+ await API . putWorkspaceExtension ( event . workspaceId , event . newDeadline )
6165 } ,
6266 } ,
6367 } ,
You can’t perform that action at this time.
0 commit comments