Skip to content

Commit

Permalink
[Activities] 'Modified by': search modifiers by contact_emails and na…
Browse files Browse the repository at this point in the history
…mes (instead of by emails); changed the placeholder of the input from 'Search users' to 'Find modifiers' (#5856)
  • Loading branch information
llj authored Dec 25, 2023
1 parent adb07fb commit 15d9b9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions frontend/src/pages/dashboard/files-activities.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class FilesActivities extends Component {
availableUsers.push({
email: item.author_email,
name: item.author_name,
contact_email: item.author_contact_email,
avatar_url: item.avatar_url,
isSelected: false
});
Expand Down Expand Up @@ -147,6 +148,7 @@ class FilesActivities extends Component {
availableUsers.push({
email: item.author_email,
name: item.author_name,
contact_email: item.author_contact_email,
avatar_url: item.avatar_url,
isSelected: false
});
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/dashboard/user-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class UserSelector extends Component {
const { isPopoverOpen, query } = this.state;
const { currentSelectedUsers, availableUsers } = this.props;
const selectedUsers = availableUsers.filter(item => item.isSelected);
const filteredAvailableUsers = query.trim() ? availableUsers.filter(item => item.email.indexOf(query.trim()) != -1) : availableUsers;
const filteredAvailableUsers = query.trim() ? availableUsers.filter(item => item.contact_email.indexOf(query.trim()) != -1 || item.name.indexOf(query.trim()) != -1) : availableUsers;
return (
<div className="mt-4 position-relative">
<span className="cur-activity-modifiers d-inline-block p-2 rounded" onClick={this.onToggleClick}>
Expand Down Expand Up @@ -97,7 +97,7 @@ class UserSelector extends Component {
<div className="px-3 pt-3">
<Input
type="text"
placeholder={gettext('Search users')}
placeholder={gettext('Find modifiers')}
value={query}
onChange={this.onQueryChange}
/>
Expand Down

0 comments on commit 15d9b9c

Please sign in to comment.