Skip to content

Commit 8ff8c1d

Browse files
authored
Merge pull request Expensify#64883 from thelullabyy/fix/64541-open-report-show-receiver
Reports Page - Open reports show receiver in narrow screen
2 parents 49d1a8b + 9fc0494 commit 8ff8c1d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/libs/SearchUIUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,13 +914,14 @@ function getReportSections(data: OnyxTypes.SearchResults['data'], metadata: Onyx
914914
const isIOUReport = reportItem.type === CONST.REPORT.TYPE.IOU;
915915

916916
const reportPendingAction = reportItem?.pendingAction ?? reportItem?.pendingFields?.preview;
917+
const shouldShowBlankTo = !reportItem || isOpenExpenseReport(reportItem);
917918
reportIDToTransactions[reportKey] = {
918919
...reportItem,
919920
groupedBy: CONST.SEARCH.GROUP_BY.REPORTS,
920921
action: getAction(data, allViolations, key),
921922
keyForList: reportItem.reportID,
922923
from: data.personalDetailsList?.[reportItem.accountID ?? CONST.DEFAULT_NUMBER_ID],
923-
to: reportItem.managerID ? data.personalDetailsList?.[reportItem.managerID] : emptyPersonalDetails,
924+
to: !shouldShowBlankTo && reportItem.managerID ? data.personalDetailsList?.[reportItem.managerID] : emptyPersonalDetails,
924925
transactions,
925926
...(reportPendingAction ? {pendingAction: reportPendingAction} : {}),
926927
};

tests/unit/Search/SearchUIUtilsTest.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,10 +732,10 @@ const transactionReportGroupListItems = [
732732
stateNum: 0,
733733
statusNum: 0,
734734
to: {
735-
accountID: 18439984,
736-
avatar: 'https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/avatar_3.png',
737-
displayName: 'Admin',
738-
login: adminEmail,
735+
accountID: 0,
736+
avatar: '',
737+
displayName: undefined,
738+
login: undefined,
739739
},
740740
total: -5000,
741741
transactions: [

0 commit comments

Comments
 (0)