mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-24 11:22:42 +01:00
Allow to sort search results by columns
This commit is contained in:
parent
66d45bf7f6
commit
d2c2b1837c
@ -2199,7 +2199,11 @@ class Conversation extends Model
|
|||||||
|
|
||||||
$query_conversations = \Eventy::filter('search.conversations.apply_filters', $query_conversations, $filters, $q);
|
$query_conversations = \Eventy::filter('search.conversations.apply_filters', $query_conversations, $filters, $q);
|
||||||
|
|
||||||
$query_conversations->orderBy('conversations.last_reply_at', 'DESC');
|
$sorting = Conversation::getConvTableSorting();
|
||||||
|
if ($sorting['sort_by'] == 'date') {
|
||||||
|
$sorting['sort_by'] = 'last_reply_at';
|
||||||
|
}
|
||||||
|
$query_conversations->orderBy($sorting['sort_by'], $sorting['order']);
|
||||||
|
|
||||||
return $query_conversations;
|
return $query_conversations;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user