Skip to content
New issue

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

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

Already on GitHub? # to your account

request money open workspace details when selected workspace clicked. #23980

Merged
merged 4 commits into from
Aug 1, 2023
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
13 changes: 7 additions & 6 deletions src/components/MoneyRequestConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,15 @@ function MoneyRequestConfirmationList(props) {
);

/**
* Navigate to profile of selected user
* Navigate to report details or profile of selected user
* @param {Object} option
*/
const navigateToUserDetail = (option) => {
if (!option.accountID) {
return;
const navigateToReportOrUserDetail = (option) => {
if (option.accountID) {
Navigation.navigate(ROUTES.getProfileRoute(option.accountID));
} else if (option.reportID) {
Navigation.navigate(ROUTES.getReportDetailsRoute(option.reportID));
}
Navigation.navigate(ROUTES.getProfileRoute(option.accountID));
};

/**
Expand Down Expand Up @@ -277,7 +278,7 @@ function MoneyRequestConfirmationList(props) {
<OptionsSelector
sections={optionSelectorSections}
value=""
onSelectRow={canModifyParticipants ? selectParticipant : navigateToUserDetail}
onSelectRow={canModifyParticipants ? selectParticipant : navigateToReportOrUserDetail}
onConfirmSelection={confirm}
selectedOptions={selectedOptions}
canSelectMultipleOptions={canModifyParticipants}
Expand Down