@@ -27,7 +27,7 @@ import {convertToDisplayString} from '@libs/CurrencyUtils';
2727import DistanceRequestUtils from '@libs/DistanceRequestUtils' ;
2828import { isReceiptError } from '@libs/ErrorUtils' ;
2929import { hasEnabledOptions } from '@libs/OptionsListUtils' ;
30- import { getTagLists , hasDependentTags , isTaxTrackingEnabled } from '@libs/PolicyUtils' ;
30+ import { getTagLists , hasDependentTags as hasDependentTagsPolicyUtils , isTaxTrackingEnabled } from '@libs/PolicyUtils' ;
3131import { getThumbnailAndImageURIs } from '@libs/ReceiptUtils' ;
3232import { getOriginalMessage , isMoneyRequestAction , isPayAction } from '@libs/ReportActionsUtils' ;
3333import {
@@ -461,11 +461,12 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
461461 ...( transaction ?. errorFields ?. route ?? transaction ?. errorFields ?. waypoints ?? transaction ?. errors ) ,
462462 ...parentReportAction ?. errors ,
463463 } ;
464+ const hasDependentTags = hasDependentTagsPolicyUtils ( policy , policyTagList ) ;
464465
465466 const tagList = policyTagLists . map ( ( { name, orderWeight, tags} , index ) => {
466467 const tagForDisplay = getTagForDisplay ( updatedTransaction ?? transaction , index ) ;
467468 let shouldShow = false ;
468- if ( hasDependentTags ( policy , policyTagList ) ) {
469+ if ( hasDependentTags ) {
469470 if ( index === 0 ) {
470471 shouldShow = true ;
471472 } else {
@@ -486,7 +487,7 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
486487 tagListIndex : index ,
487488 tagListName : name ,
488489 } ,
489- hasDependentTags ( policy , policyTagList ) ,
490+ hasDependentTags ,
490491 tagForDisplay ,
491492 ) ;
492493
@@ -496,7 +497,7 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
496497 pendingAction = { getPendingFieldAction ( 'tag' ) }
497498 >
498499 < MenuItemWithTopDescription
499- highlighted = { shouldShow && ! getTagForDisplay ( transaction , index ) }
500+ highlighted = { hasDependentTags && shouldShow && ! getTagForDisplay ( transaction , index ) }
500501 description = { name ?? translate ( 'common.tag' ) }
501502 title = { tagForDisplay }
502503 numberOfLinesTitle = { 2 }
0 commit comments