Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

Commit

Permalink
fix: fix email not being searchable in various contexts (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss authored Jun 6, 2021
1 parent 37622c8 commit aea85f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/ViewHelpers/Company/Project/ProjectViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public static function info(Project $project): array
public static function searchProjectLead(Company $company, string $criteria): Collection
{
$employees = $company->employees()
->select('id', 'first_name', 'last_name', 'avatar_file_id')
->select('id', 'first_name', 'last_name', 'avatar_file_id', 'email')
->notLocked()
->where(function ($query) use ($criteria) {
$query->where('first_name', 'LIKE', '%'.$criteria.'%')
Expand Down
2 changes: 1 addition & 1 deletion app/Http/ViewHelpers/Team/TeamMembersViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TeamMembersViewHelper
public static function searchPotentialTeamMembers(Company $company, Team $team, string $criteria): Collection
{
$potentialEmployees = $company->employees()
->select('id', 'first_name', 'last_name')
->select('id', 'first_name', 'last_name', 'email')
->notLocked()
->where(function ($query) use ($criteria) {
$query->where('first_name', 'LIKE', '%'.$criteria.'%')
Expand Down
2 changes: 1 addition & 1 deletion app/Http/ViewHelpers/Team/TeamShowViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static function searchPotentialLead(Company $company, string $criteria =
}

$potentialEmployees = $company->employees()
->select('id', 'first_name', 'last_name')
->select('id', 'first_name', 'last_name', 'email')
->notLocked()
->where(function ($query) use ($criteria) {
$query->where('first_name', 'LIKE', '%'.$criteria.'%')
Expand Down

0 comments on commit aea85f2

Please sign in to comment.