@@ -181,6 +181,7 @@ type GetReportSectionsParams = {
181181 translate : LocalizedTranslate ;
182182 formatPhoneNumber : LocaleContextProps [ 'formatPhoneNumber' ] ;
183183 isActionLoadingSet : ReadonlySet < string > | undefined ;
184+ isOffline : boolean | undefined ;
184185 allTransactionViolations : OnyxCollection < OnyxTypes . TransactionViolation [ ] > ;
185186 bankAccountList : OnyxEntry < OnyxTypes . BankAccountList > ;
186187 reportActions ?: Record < string , OnyxTypes . ReportAction [ ] > ;
@@ -426,6 +427,7 @@ type GetSectionsParams = {
426427 archivedReportsIDList ?: ArchivedReportsIDSet ;
427428 queryJSON ?: SearchQueryJSON ;
428429 isActionLoadingSet ?: ReadonlySet < string > ;
430+ isOffline ?: boolean ;
429431 cardFeeds ?: OnyxCollection < OnyxTypes . CardFeeds > ;
430432 allTransactionViolations ?: OnyxCollection < OnyxTypes . TransactionViolation [ ] > ;
431433} ;
@@ -1872,6 +1874,7 @@ function getReportSections({
18721874 currentAccountID,
18731875 currentUserEmail,
18741876 translate,
1877+ isOffline,
18751878 formatPhoneNumber,
18761879 isActionLoadingSet,
18771880 allTransactionViolations,
@@ -1963,6 +1966,8 @@ function getReportSections({
19631966 const policyFromKey = getPolicyFromKey ( data , reportItem ) ;
19641967 const policy = policies ?. [ `${ ONYXKEYS . COLLECTION . POLICY } ${ reportItem ?. policyID ?? String ( CONST . DEFAULT_NUMBER_ID ) } ` ] ?? policyFromKey ;
19651968
1969+ const shouldShowStatusAsPending = ! ! isOffline && reportItem ?. pendingFields ?. nextStep === CONST . RED_BRICK_ROAD_PENDING_ACTION . UPDATE ;
1970+
19661971 const hasAnyViolationsForReport = hasAnyViolations (
19671972 reportItem . reportID ,
19681973 allTransactionViolations ?? allViolations ,
@@ -1996,6 +2001,7 @@ function getReportSections({
19962001 formattedTo,
19972002 formattedStatus,
19982003 transactions,
2004+ shouldShowStatusAsPending,
19992005 ...( reportPendingAction ? { pendingAction : reportPendingAction } : { } ) ,
20002006 shouldShowYear : shouldShowYearCreatedReport ,
20012007 shouldShowYearSubmitted : shouldShowYearSubmittedReport ,
@@ -2462,6 +2468,7 @@ function getSections({
24622468 archivedReportsIDList,
24632469 queryJSON,
24642470 isActionLoadingSet,
2471+ isOffline,
24652472 cardFeeds,
24662473 allTransactionViolations,
24672474} : GetSectionsParams ) {
@@ -2480,6 +2487,7 @@ function getSections({
24802487 currentAccountID,
24812488 currentUserEmail,
24822489 translate,
2490+ isOffline,
24832491 formatPhoneNumber,
24842492 isActionLoadingSet,
24852493 allTransactionViolations,
0 commit comments