Skip to content

Commit

Permalink
Merge pull request #53094 from callstack-internal/pac-guerreiro/fix/5…
Browse files Browse the repository at this point in the history
…2388-lhn-shown-unavailable-workspace

[$250] Critical: LHN says unavailable workspace
  • Loading branch information
puneetlath authored Dec 3, 2024
2 parents f94e95f + 14a9b02 commit a1e84ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,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 @@ -3566,7 +3567,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

0 comments on commit a1e84ea

Please sign in to comment.