Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Critical: LHN says unavailable workspace #53094

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3050,7 +3050,8 @@ function getMoneyRequestReportName(report: OnyxEntry<Report>, policy?: OnyxEntry

let payerOrApproverName;
if (isExpenseReport(report)) {
payerOrApproverName = getPolicyName(report, false, policy);
const parentReport = getParentReport(report);
payerOrApproverName = getPolicyName(parentReport ?? report, false, policy);
} else if (isInvoiceReport(report)) {
const chatReport = getReportOrDraftReport(report?.chatReportID);
payerOrApproverName = getInvoicePayerName(chatReport, invoiceReceiverPolicy);
Expand Down Expand Up @@ -3560,7 +3561,8 @@ function getReportPreviewMessage(
const containsNonReimbursable = hasNonReimbursableTransactions(report.reportID);
const totalAmount = getMoneyRequestSpendBreakdown(report).totalDisplaySpend;

const policyName = getPolicyName(report, false, policy);
const parentReport = getParentReport(report);
const policyName = getPolicyName(parentReport ?? report, false, policy);
const payerName = isExpenseReport(report) ? policyName : getDisplayNameForParticipant(report.managerID, !isPreviewMessageForParentChatReport);

const formattedAmount = CurrencyUtils.convertToDisplayString(totalAmount, report.currency);
Expand Down
Loading