Skip to content

Commit 7814fbc

Browse files
authored
Merge pull request #48661 from Expensify/beaman-slightGBRNoParentAccessUpdate
Show expense report in LHN even if report not in submitted state/status
2 parents a2afc7f + d3da46e commit 7814fbc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/libs/ReportUtils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7777,8 +7777,8 @@ function hasMissingInvoiceBankAccount(iouReportID: string): boolean {
77777777
return invoiceReport?.ownerAccountID === currentUserAccountID && isEmptyObject(getPolicy(invoiceReport?.policyID)?.invoice?.bankAccount ?? {}) && isSettled(iouReportID);
77787778
}
77797779

7780-
function isSubmittedExpenseReportManagerWithoutParentAccess(report: OnyxEntry<Report>) {
7781-
return isExpenseReport(report) && report?.hasParentAccess === false && report?.managerID === currentUserAccountID && isProcessingReport(report);
7780+
function isExpenseReportManagerWithoutParentAccess(report: OnyxEntry<Report>) {
7781+
return isExpenseReport(report) && report?.hasParentAccess === false && report?.managerID === currentUserAccountID;
77827782
}
77837783

77847784
export {
@@ -7977,7 +7977,7 @@ export {
79777977
isEmptyReport,
79787978
isRootGroupChat,
79797979
isExpenseReport,
7980-
isSubmittedExpenseReportManagerWithoutParentAccess,
7980+
isExpenseReportManagerWithoutParentAccess,
79817981
isExpenseRequest,
79827982
isExpensifyOnlyParticipantInReport,
79837983
isGroupChat,

src/libs/SidebarUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ function getOrderedReportIDs(
129129
return;
130130
}
131131
const isSystemChat = ReportUtils.isSystemChat(report);
132-
const isSubmittedExpenseReportManagerWithoutParentAccess = ReportUtils.isSubmittedExpenseReportManagerWithoutParentAccess(report);
132+
const isExpenseReportManagerWithoutParentAccess = ReportUtils.isExpenseReportManagerWithoutParentAccess(report);
133133
const shouldOverrideHidden =
134134
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
135-
hasValidDraftComment(report.reportID) || hasErrorsOtherThanFailedReceipt || isFocused || isSystemChat || report.isPinned || isSubmittedExpenseReportManagerWithoutParentAccess;
135+
hasValidDraftComment(report.reportID) || hasErrorsOtherThanFailedReceipt || isFocused || isSystemChat || report.isPinned || isExpenseReportManagerWithoutParentAccess;
136136
if (isHidden && !shouldOverrideHidden) {
137137
return;
138138
}

0 commit comments

Comments
 (0)