@@ -32,8 +32,6 @@ import useThemeStyles from '@hooks/useThemeStyles';
3232import useTransactionViolations from '@hooks/useTransactionViolations' ;
3333import type { ViolationField } from '@hooks/useViolations' ;
3434import useViolations from '@hooks/useViolations' ;
35- import { initSplitExpense , updateMoneyRequestBillable , updateMoneyRequestReimbursable } from '@libs/actions/IOU/index' ;
36- import { getIsMissingAttendeesViolation } from '@libs/AttendeeUtils' ;
3735import { filterPersonalCards , getCompanyCardDescription } from '@libs/CardUtils' ;
3836import { getDecodedCategoryName , isCategoryMissing } from '@libs/CategoryUtils' ;
3937import { convertToDisplayString } from '@libs/CurrencyUtils' ;
@@ -53,12 +51,13 @@ import {
5351 isTaxTrackingEnabled ,
5452} from '@libs/PolicyUtils' ;
5553import { getOriginalMessage , isMoneyRequestAction } from '@libs/ReportActionsUtils' ;
56- import { computeReportName } from '@libs/ReportNameUtils' ;
5754import { isSplitAction } from '@libs/ReportSecondaryActionUtils' ;
5855import {
5956 canEditFieldOfMoneyRequest ,
6057 canEditMoneyRequest ,
6158 canUserPerformWriteAction as canUserPerformWriteActionReportUtils ,
59+ // eslint-disable-next-line @typescript-eslint/no-deprecated
60+ getReportName ,
6261 getTransactionDetails ,
6362 getTripIDFromTransactionParentReportID ,
6463 isExpenseReport ,
@@ -98,6 +97,7 @@ import {
9897import ViolationsUtils from '@libs/Violations/ViolationsUtils' ;
9998import Navigation from '@navigation/Navigation' ;
10099import AnimatedEmptyStateBackground from '@pages/home/report/AnimatedEmptyStateBackground' ;
100+ import { initSplitExpense , updateMoneyRequestBillable , updateMoneyRequestReimbursable } from '@userActions/IOU' ;
101101import CONST from '@src/CONST' ;
102102import type { TranslationPaths } from '@src/languages/types' ;
103103import ONYXKEYS from '@src/ONYXKEYS' ;
@@ -167,7 +167,6 @@ function MoneyRequestView({
167167 const { getReportRHPActiveRoute} = useActiveRoute ( ) ;
168168 const [ lastVisitedPath ] = useOnyx ( ONYXKEYS . LAST_VISITED_PATH , { canBeMissing : true } ) ;
169169
170- const [ allPolicies ] = useOnyx ( ONYXKEYS . COLLECTION . POLICY , { canBeMissing : true } ) ;
171170 const [ allTransactions ] = useOnyx ( ONYXKEYS . COLLECTION . TRANSACTION , { canBeMissing : false } ) ;
172171
173172 const searchContext = useSearchContext ( ) ;
@@ -473,13 +472,6 @@ function MoneyRequestView({
473472 const hasErrors = hasMissingSmartscanFields ( transaction ) ;
474473 // Need to return undefined when we have pendingAction to avoid the duplicate pending action
475474 const getPendingFieldAction = ( fieldPath : TransactionPendingFieldsKey ) => ( pendingAction ? undefined : transaction ?. pendingFields ?. [ fieldPath ] ) ;
476- const isMissingAttendeesViolation = getIsMissingAttendeesViolation (
477- policyCategories ,
478- updatedTransaction ?. category ?? categoryForDisplay ,
479- actualAttendees ,
480- currentUserPersonalDetails ,
481- policy ?. isAttendeeTrackingEnabled ,
482- ) ;
483475
484476 const getErrorForField = ( field : ViolationField , data ?: OnyxTypes . TransactionViolation [ 'data' ] , policyHasDependentTags = false , tagValue ?: string ) => {
485477 // Checks applied when creating a new expense
@@ -520,10 +512,6 @@ function MoneyRequestView({
520512 return `${ violations . map ( ( violation ) => ViolationsUtils . getViolationTranslation ( violation , translate , canEdit , undefined , companyCardPageURL ) ) . join ( '. ' ) } .` ;
521513 }
522514
523- if ( field === 'attendees' && isMissingAttendeesViolation ) {
524- return translate ( 'violations.missingAttendees' ) ;
525- }
526-
527515 return '' ;
528516 } ;
529517
@@ -732,9 +720,8 @@ function MoneyRequestView({
732720 ) ;
733721 } ) ;
734722
735- const reportNameToDisplay = isFromMergeTransaction
736- ? ( updatedTransaction ?. reportName ?? translate ( 'common.none' ) )
737- : ( parentReport ?. reportName ?? computeReportName ( parentReport , allReports , allPolicies , allTransactions ) ) ;
723+ // eslint-disable-next-line @typescript-eslint/no-deprecated
724+ const reportNameToDisplay = isFromMergeTransaction ? ( updatedTransaction ?. reportName ?? translate ( 'common.none' ) ) : ( parentReport ?. reportName ?? getReportName ( parentReport ) ) ;
738725 const shouldShowReport = ! ! parentReportID || ( isFromMergeTransaction && ! ! reportNameToDisplay ) ;
739726 const reportCopyValue = ! canEditReport && reportNameToDisplay !== translate ( 'common.none' ) ? reportNameToDisplay : undefined ;
740727 const shouldShowCategoryAnalyzing = isCategoryBeingAnalyzed ( updatedTransaction ?? transaction ) ;
@@ -1025,8 +1012,6 @@ function MoneyRequestView({
10251012 onPress = { ( ) => {
10261013 Navigation . navigate ( ROUTES . MONEY_REQUEST_ATTENDEE . getRoute ( CONST . IOU . ACTION . EDIT , iouType , transaction . transactionID , transactionThreadReport ?. reportID ) ) ;
10271014 } }
1028- brickRoadIndicator = { getErrorForField ( 'attendees' ) ? CONST . BRICK_ROAD_INDICATOR_STATUS . ERROR : undefined }
1029- errorText = { getErrorForField ( 'attendees' ) }
10301015 interactive = { canEdit }
10311016 shouldShowRightIcon = { canEdit }
10321017 shouldRenderAsHTML
0 commit comments