@@ -9,7 +9,7 @@ import StatusBadge from '@components/StatusBadge';
99import useLocalize from '@hooks/useLocalize' ;
1010import useTheme from '@hooks/useTheme' ;
1111import useThemeStyles from '@hooks/useThemeStyles' ;
12- import { getReportStatusColorStyle , getReportStatusTranslation } from '@libs/ReportUtils' ;
12+ import { getReportStatusColorStyle , getReportStatusTranslation , getStatusBadgeBackgroundColor } from '@libs/ReportUtils' ;
1313import CONST from '@src/CONST' ;
1414import type { ExpenseReportListItemType , TransactionListItemType , TransactionReportGroupListItemType } from './types' ;
1515import UserInfoCellsWithArrow from './UserInfoCellsWithArrow' ;
@@ -20,18 +20,21 @@ function UserInfoAndActionButtonRow({
2020 containerStyles,
2121 stateNum,
2222 statusNum,
23+ isSelected,
2324} : {
2425 item : TransactionReportGroupListItemType | TransactionListItemType | ExpenseReportListItemType ;
2526 shouldShowUserInfo : boolean ;
2627 containerStyles ?: StyleProp < ViewStyle > ;
2728 stateNum : ExpenseReportListItemType [ 'stateNum' ] ;
2829 statusNum : ExpenseReportListItemType [ 'statusNum' ] ;
30+ isSelected ?: boolean ;
2931} ) {
3032 const styles = useThemeStyles ( ) ;
3133 const theme = useTheme ( ) ;
3234 const { translate} = useLocalize ( ) ;
3335 const statusText = getReportStatusTranslation ( { stateNum, statusNum, translate} ) ;
3436 const reportStatusColorStyle = getReportStatusColorStyle ( theme , stateNum , statusNum ) ;
37+ const badgeBackgroundColor = getStatusBadgeBackgroundColor ( theme , stateNum , statusNum , undefined , isSelected ) ;
3538 const participantFromDisplayName = item . formattedFrom ?? item ?. from ?. displayName ?? '' ;
3639 return (
3740 < View style = { [ styles . pt0 , styles . flexRow , styles . alignItemsCenter , shouldShowUserInfo ? styles . justifyContentBetween : styles . justifyContentEnd , styles . gap2 , containerStyles ] } >
@@ -53,7 +56,7 @@ function UserInfoAndActionButtonRow({
5356 { ! ! statusText && ! ! reportStatusColorStyle && (
5457 < StatusBadge
5558 text = { statusText }
56- backgroundColor = { reportStatusColorStyle . backgroundColor }
59+ backgroundColor = { badgeBackgroundColor }
5760 textColor = { reportStatusColorStyle . textColor }
5861 />
5962 ) }
0 commit comments