@@ -23,6 +23,8 @@ import AIAssistantButton from './AIAssistantButton'
2323
2424const AutoMatchDialog = ( { open, onClose, autoMatchUnmappedOnly, setAutoMatchUnmappedOnly, rowStatuses, autoRunAIAnalysis, setAutoRunAIAnalysis, AIModels, AIModel, setAIModel, repoVersion, onSubmit, inAIAssistantGroup} ) => {
2525 const { t } = useTranslation ( )
26+ const selectedRows = autoMatchUnmappedOnly ? rowStatuses . unmapped . length : ( rowStatuses . unmapped . length + rowStatuses . readyForReview . length )
27+ const totalRows = rowStatuses . unmapped . length + rowStatuses . readyForReview . length + rowStatuses . reviewed . length
2628
2729 const getHelperTextForAutoMatchUnmapped = ( ) => {
2830 if ( autoMatchUnmappedOnly ) {
@@ -43,7 +45,7 @@ const AutoMatchDialog = ({open, onClose, autoMatchUnmappedOnly, setAutoMatchUnma
4345 return t ( 'map_project.auto_match_note_no_counts' ) ;
4446 } ;
4547
46- const isDisabled = ! repoVersion ?. version_url
48+ const isDisabled = ! repoVersion ?. version_url && selectedRows > 0
4749
4850 return (
4951 < Dialog
@@ -72,7 +74,7 @@ const AutoMatchDialog = ({open, onClose, autoMatchUnmappedOnly, setAutoMatchUnma
7274 }
7375 </ div >
7476 < FormControl sx = { { marginTop : '12px' } } >
75- < FormLabel id = "automatch-rows" > { t ( 'map_project.input_dataset' ) } </ FormLabel >
77+ < FormLabel id = "automatch-rows" > { ` ${ t ( 'map_project.selected_rows' ) } : ${ selectedRows . toLocaleString ( ) } ${ t ( 'map_project.out_of' ) } ${ totalRows . toLocaleString ( ) } ` } </ FormLabel >
7678 < RadioGroup
7779 row
7880 aria-labelledby = "automatch-rows"
@@ -82,12 +84,12 @@ const AutoMatchDialog = ({open, onClose, autoMatchUnmappedOnly, setAutoMatchUnma
8284 < FormControlLabel
8385 value = "unmapped"
8486 control = { < Radio checked = { autoMatchUnmappedOnly } /> }
85- label = { t ( 'map_project.unmapped_only' ) + ` ( ${ rowStatuses . unmapped . length . toLocaleString ( ) } )` }
87+ label = { t ( 'map_project.unmapped_only' ) }
8688 />
8789 < FormControlLabel
8890 value = "all"
8991 control = { < Radio checked = { ! autoMatchUnmappedOnly } /> }
90- label = { t ( 'map_project.all_rows' ) + ` ( ${ ( rowStatuses . unmapped . length + rowStatuses . readyForReview . length ) . toLocaleString ( ) } )` }
92+ label = { t ( 'map_project.all_rows' ) }
9193 />
9294 </ RadioGroup >
9395 </ FormControl >
0 commit comments