File tree 1 file changed +15
-13
lines changed
site/src/components/WorkspaceStats 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export const Language = {
46
46
47
47
export interface WorkspaceScheduleFormProps {
48
48
fieldErrors ?: FieldErrors
49
+ initialValues ?: WorkspaceScheduleFormValues
49
50
isLoading : boolean
50
51
onCancel : ( ) => void
51
52
onSubmit : ( values : WorkspaceScheduleFormValues ) => void
@@ -128,26 +129,27 @@ export const validationSchema = Yup.object({
128
129
129
130
export const WorkspaceScheduleForm : React . FC < WorkspaceScheduleFormProps > = ( {
130
131
fieldErrors,
132
+ initialValues = {
133
+ sunday : false ,
134
+ monday : true ,
135
+ tuesday : true ,
136
+ wednesday : true ,
137
+ thursday : true ,
138
+ friday : true ,
139
+ saturday : false ,
140
+
141
+ startTime : "09:30" ,
142
+ timezone : "" ,
143
+ ttl : 5 ,
144
+ } ,
131
145
isLoading,
132
146
onCancel,
133
147
onSubmit,
134
148
} ) => {
135
149
const styles = useStyles ( )
136
150
137
151
const form = useFormik < WorkspaceScheduleFormValues > ( {
138
- initialValues : {
139
- sunday : false ,
140
- monday : true ,
141
- tuesday : true ,
142
- wednesday : true ,
143
- thursday : true ,
144
- friday : true ,
145
- saturday : false ,
146
-
147
- startTime : "09:30" ,
148
- timezone : "" ,
149
- ttl : 5 ,
150
- } ,
152
+ initialValues,
151
153
onSubmit,
152
154
validationSchema,
153
155
} )
You can’t perform that action at this time.
0 commit comments