@@ -52,18 +52,22 @@ const StyledCardContent = styled(CardContent)(({ theme }) => ({
52
52
53
53
54
54
export const SetupPage = ( { setConfiguration, settings, setShowLabel, showAnnotationLab} ) => {
55
- const { configuration } = settings ;
55
+ const { configuration, taskChoice } = settings ;
56
56
const [ currentTab , setTab ] = useState ( false ) ;
57
57
const [ hasConfig , setHasConfig ] = useState ( false ) ;
58
58
const settingsConfig = useSettings ( )
59
+
59
60
const updateConfiguration = ( newConfig ) => {
60
- const { labels} = newConfig
61
- setHasConfig ( labels . length > 0 )
61
+ const { labels, regionTypesAllowed , multipleRegionLabels , multipleRegions } = newConfig
62
+ setHasConfig ( labels ? .length > 0 )
62
63
const newSettings = {
63
64
...settings ,
64
65
configuration : {
65
66
...settings . configuration ,
66
- labels
67
+ labels,
68
+ regionTypesAllowed,
69
+ multipleRegionLabels,
70
+ multipleRegions
67
71
}
68
72
} ;
69
73
settingsConfig . changeSetting ( 'settings' , newSettings ) ;
@@ -87,9 +91,16 @@ export const SetupPage = ({setConfiguration, settings, setShowLabel, showAnnotat
87
91
88
92
const updateTaskInfo = ( newTaskInfo ) => {
89
93
setConfiguration ( { type : "UPDATE_TASK_INFO" , payload : newTaskInfo } )
94
+ settings . taskDescription = newTaskInfo . taskDescription ;
95
+ settings . taskChoice = newTaskInfo . taskChoice ;
96
+ settingsConfig . changeSetting ( 'settings' , settings ) ;
90
97
}
91
98
92
99
useEffect ( ( ) => {
100
+ const { labels } = configuration
101
+ if ( labels . length > 0 ) {
102
+ setHasConfig ( true )
103
+ }
93
104
setTab ( "datatype" ) ;
94
105
} , [ ] ) ;
95
106
0 commit comments