From 15d9b9c363ab94bcd94aed284fafcc1105c0362a Mon Sep 17 00:00:00 2001 From: llj Date: Mon, 25 Dec 2023 21:46:41 +0800 Subject: [PATCH] [Activities] 'Modified by': search modifiers by contact_emails and names (instead of by emails); changed the placeholder of the input from 'Search users' to 'Find modifiers' (#5856) --- frontend/src/pages/dashboard/files-activities.js | 2 ++ frontend/src/pages/dashboard/user-selector.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/dashboard/files-activities.js b/frontend/src/pages/dashboard/files-activities.js index 5ad4183aca1..a4668e82c39 100644 --- a/frontend/src/pages/dashboard/files-activities.js +++ b/frontend/src/pages/dashboard/files-activities.js @@ -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 }); @@ -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 }); diff --git a/frontend/src/pages/dashboard/user-selector.js b/frontend/src/pages/dashboard/user-selector.js index 01a0c58fcf0..38745e4a70b 100644 --- a/frontend/src/pages/dashboard/user-selector.js +++ b/frontend/src/pages/dashboard/user-selector.js @@ -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 (
@@ -97,7 +97,7 @@ class UserSelector extends Component {