@@ -15,8 +15,10 @@ import CommentIcon from '@mui/icons-material/Message';
1515import MapIcon from '@mui/icons-material/Link' ;
1616import UnmapIcon from '@mui/icons-material/LinkOff' ;
1717import RejectIcon from '@mui/icons-material/Clear' ;
18+ import ExcludeIcon from '@mui/icons-material/Block' ;
1819import AutoMatchIcon from '@mui/icons-material/MotionPhotosAutoOutlined' ;
1920import AssistantIcon from '@mui/icons-material/Assistant' ;
21+ import ReviewedIcon from '@mui/icons-material/FactCheckOutlined' ;
2022
2123import map from 'lodash/map'
2224import startCase from 'lodash/startCase'
@@ -27,12 +29,20 @@ const Discuss = ({ logs, onAdd }) => {
2729 const [ comment , setComment ] = React . useState ( '' )
2830 const getTitle = log => {
2931 if ( [ 'mapped' , 'unmapped' , 'auto-matched' , 'rejected' ] . includes ( log . action ) ) {
30- let description = `${ startCase ( log . action ) } : ${ log . extras . name } `
32+ if ( log . action === 'rejected' && log . description )
33+ return log . description
34+ let description = startCase ( log . action )
35+ if ( log . extras ?. name )
36+ description += `: ${ log . extras ?. name } `
3137 if ( log ?. extras ?. map_type || log ?. extras ?. mapType ) {
38+ if ( description ?. includes ( ':' ) )
39+ description += ':'
3240 description += ` (${ log . extras . map_type || log . extras . mapType } )`
3341 }
3442 return description
3543 }
44+ if ( log . action === 'exclude' )
45+ return 'Excluded'
3646 if ( [ 'AIRecommendation' ] . includes ( log . action ) )
3747 return `${ log . action } : ${ log . description } `
3848 if ( [ 'commented' ] . includes ( log . action ) ) {
@@ -46,6 +56,8 @@ const Discuss = ({ logs, onAdd }) => {
4656 return < AssistantIcon fontSize = 'small' color = { color } />
4757 if ( log . action === 'commented' )
4858 return < CommentIcon fontSize = 'small' color = { color } />
59+ if ( log . action === 'approved' || log . action === 'reviewed' )
60+ return < ReviewedIcon fontSize = 'small' color = { color } />
4961 if ( [ 'mapped' ] . includes ( log . action ) )
5062 return < MapIcon fontSize = 'small' color = { color } />
5163 if ( [ 'auto-matched' ] . includes ( log . action ) )
@@ -54,15 +66,17 @@ const Discuss = ({ logs, onAdd }) => {
5466 return < UnmapIcon fontSize = 'small' color = { color } />
5567 if ( log . action === 'rejected' )
5668 return < RejectIcon fontSize = 'small' color = { color } />
69+ if ( log . action === 'exclude' )
70+ return < ExcludeIcon fontSize = 'small' color = { color } />
5771 return log . user . slice ( 0 , 2 ) . toUpperCase ( )
5872 }
5973
6074 const getDotColor = log => {
61- if ( [ 'unmapped' , 'rejected' ] . includes ( log . action ) )
75+ if ( [ 'unmapped' , 'rejected' , 'exclude' ] . includes ( log . action ) )
6276 return 'error'
6377 if ( [ 'proposed' ] . includes ( log . action ) )
6478 return 'warning'
65- if ( [ 'mapped' , 'auto-matched' , 'AIRecommendation' ] . includes ( log . action ) )
79+ if ( [ 'mapped' , 'auto-matched' , 'AIRecommendation' , 'approved' , 'reviewed' ] . includes ( log . action ) )
6680 return 'primary'
6781 return undefined
6882 }
0 commit comments