mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Improve filter and sorting to include the users prefix
This commit is contained in:
parent
4170642565
commit
026a09194a
@ -26,7 +26,7 @@ class Members::ListService
|
||||
|
||||
# ILIKE => PostgreSQL case-insensitive LIKE
|
||||
if params[:search].size.positive?
|
||||
@query = @query.where('username ILIKE :search OR ' \
|
||||
@query = @query.where('users.username ILIKE :search OR ' \
|
||||
'profiles.first_name ILIKE :search OR ' \
|
||||
'profiles.last_name ILIKE :search OR ' \
|
||||
'profiles.phone ILIKE :search OR ' \
|
||||
@ -85,7 +85,7 @@ class Members::ListService
|
||||
|
||||
order_key = case order_key
|
||||
when 'username'
|
||||
'username'
|
||||
'users.username'
|
||||
when 'last_name'
|
||||
'profiles.last_name'
|
||||
when 'first_name'
|
||||
|
Loading…
x
Reference in New Issue
Block a user