-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[CP Staging] fix select workspace request money #27868
Changes from 3 commits
d01e567
ef7190a
7148c84
a1c10b3
586e997
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,9 @@ function MoneyRequestParticipantsSelector({ | |
* @param {Object} option | ||
*/ | ||
const addSingleParticipant = (option) => { | ||
onAddParticipants([{accountID: option.accountID, login: option.login, isPolicyExpenseChat: option.isPolicyExpenseChat, reportID: option.reportID, selected: true}]); | ||
onAddParticipants([ | ||
{accountID: option.accountID, login: option.login, isPolicyExpenseChat: option.isPolicyExpenseChat, reportID: option.reportID, selected: true, searchText: option.searchText}, | ||
]); | ||
navigateToRequest(); | ||
}; | ||
|
||
|
@@ -187,7 +189,14 @@ function MoneyRequestParticipantsSelector({ | |
} else { | ||
newSelectedOptions = [ | ||
...participants, | ||
{accountID: option.accountID, login: option.login, isPolicyExpenseChat: option.isPolicyExpenseChat, reportID: option.reportID, selected: true}, | ||
{ | ||
accountID: option.accountID, | ||
login: option.login, | ||
isPolicyExpenseChat: option.isPolicyExpenseChat, | ||
reportID: option.reportID, | ||
selected: true, | ||
searchText: option.searchText, | ||
}, | ||
]; | ||
} | ||
|
||
|
@@ -223,7 +232,7 @@ function MoneyRequestParticipantsSelector({ | |
Boolean(newChatOptions.userToInvite), | ||
searchTerm.trim(), | ||
maxParticipantsReached, | ||
_.some(participants, (participant) => participant.login.toLowerCase().includes(searchTerm.trim().toLowerCase())), | ||
_.some(participants, (participant) => participant.searchText && participant.searchText.toLowerCase().includes(searchTerm.trim().toLowerCase())), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there left any case where searchText won't be set? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see a case, If we select a workspace and an account. then un select an account. and click workspace => the searchText will be null. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any idea why the searchText is null in this case? |
||
); | ||
const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see an error for that, If we only search name something like "workpace" and select the ws. It's not email and phone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please attach a screenshot? That may be considerable as a bug