@@ -165,6 +165,7 @@ type GetReportSectionsParams = {
165165 translate : LocalizedTranslate ;
166166 formatPhoneNumber : LocaleContextProps [ 'formatPhoneNumber' ] ;
167167 isActionLoadingSet : ReadonlySet < string > | undefined ;
168+ isOffline : boolean | undefined ;
168169 allTransactionViolations : OnyxCollection < OnyxTypes . TransactionViolation [ ] > ;
169170 bankAccountList : OnyxEntry < OnyxTypes . BankAccountList > ;
170171 reportActions ?: Record < string , OnyxTypes . ReportAction [ ] > ;
@@ -405,6 +406,7 @@ type GetSectionsParams = {
405406 archivedReportsIDList ?: ArchivedReportsIDSet ;
406407 queryJSON ?: SearchQueryJSON ;
407408 isActionLoadingSet ?: ReadonlySet < string > ;
409+ isOffline ?: boolean ;
408410 cardFeeds ?: OnyxCollection < OnyxTypes . CardFeeds > ;
409411 allTransactionViolations ?: OnyxCollection < OnyxTypes . TransactionViolation [ ] > ;
410412} ;
@@ -1820,6 +1822,7 @@ function getReportSections({
18201822 currentAccountID,
18211823 currentUserEmail,
18221824 translate,
1825+ isOffline,
18231826 formatPhoneNumber,
18241827 isActionLoadingSet,
18251828 allTransactionViolations,
@@ -1911,7 +1914,7 @@ function getReportSections({
19111914 const policyFromKey = getPolicyFromKey ( data , reportItem ) ;
19121915 const policy = policies ?. [ `${ ONYXKEYS . COLLECTION . POLICY } ${ reportItem ?. policyID ?? String ( CONST . DEFAULT_NUMBER_ID ) } ` ] ?? policyFromKey ;
19131916
1914- const isReportStatePending = reportItem ?. pendingFields ?. nextStep === CONST . RED_BRICK_ROAD_PENDING_ACTION . UPDATE ;
1917+ const shouldShowStatusAsPending = isOffline && reportItem ?. pendingFields ?. nextStep === CONST . RED_BRICK_ROAD_PENDING_ACTION . UPDATE ;
19151918
19161919 const hasAnyViolationsForReport = hasAnyViolations (
19171920 reportItem . reportID ,
@@ -1945,8 +1948,8 @@ function getReportSections({
19451948 formattedFrom,
19461949 formattedTo,
19471950 formattedStatus,
1948- isReportStatePending,
19491951 transactions,
1952+ shouldShowStatusAsPending,
19501953 ...( reportPendingAction ? { pendingAction : reportPendingAction } : { } ) ,
19511954 shouldShowYear : shouldShowYearCreatedReport ,
19521955 shouldShowYearSubmitted : shouldShowYearSubmittedReport ,
@@ -2355,6 +2358,7 @@ function getSections({
23552358 archivedReportsIDList,
23562359 queryJSON,
23572360 isActionLoadingSet,
2361+ isOffline,
23582362 cardFeeds,
23592363 allTransactionViolations,
23602364} : GetSectionsParams ) {
@@ -2373,6 +2377,7 @@ function getSections({
23732377 currentAccountID,
23742378 currentUserEmail,
23752379 translate,
2380+ isOffline,
23762381 formatPhoneNumber,
23772382 isActionLoadingSet,
23782383 allTransactionViolations,
0 commit comments