File tree 2 files changed +8
-4
lines changed
xServices/workspaceSchedule
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import axios , { AxiosRequestHeaders } from "axios"
2
+ import dayjs from "dayjs"
2
3
import * as Types from "./types"
3
4
import { WorkspaceBuildTransition } from "./types"
4
5
import * as TypesGen from "./typesGenerated"
5
- import dayjs from "dayjs"
6
6
7
7
const CONTENT_TYPE_JSON : AxiosRequestHeaders = {
8
8
"Content-Type" : "application/json" ,
Original file line number Diff line number Diff line change 2
2
* @fileoverview workspaceScheduleBanner is an xstate machine backing a form,
3
3
* presented as an Alert/banner, for reactively updating a workspace schedule.
4
4
*/
5
+ import dayjs from "dayjs"
5
6
import { createMachine } from "xstate"
6
7
import * as API from "../../api/api"
7
- import dayjs from "dayjs"
8
8
import { displayError , displaySuccess } from "../../components/GlobalSnackbar/utils"
9
9
10
10
export const Language = {
11
11
errorExtension : "Failed to extend workspace deadline." ,
12
12
successExtension : "Successfully extended workspace deadline." ,
13
13
}
14
14
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
+ }
16
20
17
21
export const workspaceScheduleBannerMachine = createMachine (
18
22
{
@@ -57,7 +61,7 @@ export const workspaceScheduleBannerMachine = createMachine(
57
61
58
62
services : {
59
63
updateDeadline : async ( _ , event ) => {
60
- await API . putWorkspaceExtension ( event . workspaceId , event . newDeadline )
64
+ await API . putWorkspaceExtension ( event . workspaceId , event . newDeadline )
61
65
} ,
62
66
} ,
63
67
} ,
You can’t perform that action at this time.
0 commit comments