This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
src/routes/CreateNewTeam/components Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ const Error = ({ name }) => {
3030} ;
3131
3232function EditRoleForm ( { onChange, role } ) {
33- const [ startMonthVisible , setStartMonthVisible ] = useState ( false ) ;
3433 const onRoleChange = ( state ) => {
3534 if ( state . hasValidationErrors ) {
3635 onChange ( false ) ;
@@ -121,9 +120,9 @@ function EditRoleForm({ onChange, role }) {
121120 < Error name = "durationWeeks" />
122121 </ td >
123122 < td >
124- { startMonthVisible ? (
123+ { role . startMonth ? (
125124 < >
126- < Field name = "startMonth" initialValue = { Date . now ( ) } >
125+ < Field name = "startMonth" initialValue = { role . startMonth } >
127126 { ( props ) => (
128127 < MonthPicker
129128 name = { props . input . name }
@@ -143,7 +142,9 @@ function EditRoleForm({ onChange, role }) {
143142 < div styleName = "flex-container" >
144143 < button
145144 styleName = "toggle-button"
146- onClick = { ( ) => setStartMonthVisible ( true ) }
145+ onClick = { ( ) =>
146+ onRoleChange ( { values : { startMonth : Date . now ( ) } } )
147+ }
147148 >
148149 Add Start Month
149150 </ button >
Original file line number Diff line number Diff line change @@ -148,9 +148,9 @@ function SubmitContainer({
148148 . then ( ( ) => {
149149 setTimeout ( ( ) => {
150150 dispatch ( clearSearchedRoles ( ) ) ;
151- // Backend api create project has sync issue, so delay 2 seconds
151+ // Backend api create project has sync issue, so delay 4 seconds
152152 navigate ( "/taas/myteams" ) ;
153- } , 2000 ) ;
153+ } , 4000 ) ;
154154 } )
155155 . catch ( ( err ) => {
156156 setRequestLoading ( false ) ;
You can’t perform that action at this time.
0 commit comments