Expand the ability to restrict a Customers list to a specific Mailbox
The results now include Customers created through the admin interface, not only the ones created from a Conversation.
This commit is contained in:
parent
2227620cc7
commit
509058ec46
1 changed files with 1 additions and 5 deletions
|
@ -159,11 +159,7 @@ class ConversationsController extends BaseConversationsController {
|
||||||
->whereIn('customers.mailbox_id', $mailbox_ids);
|
->whereIn('customers.mailbox_id', $mailbox_ids);
|
||||||
|
|
||||||
if (!empty($filters['mailbox']) && in_array($filters['mailbox'], $mailbox_ids)) {
|
if (!empty($filters['mailbox']) && in_array($filters['mailbox'], $mailbox_ids)) {
|
||||||
$query_customers->join('conversations', function ($join) use ($filters) {
|
$query_customers->where('customers.mailbox_id', '=', $filters['mailbox']);
|
||||||
$join->on('conversations.customer_id', '=', 'customers.id');
|
|
||||||
//$join->on('conversations.mailbox_id', '=', $filters['mailbox']);
|
|
||||||
});
|
|
||||||
$query_customers->where('conversations.mailbox_id', '=', $filters['mailbox']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$query_customers = \Eventy::filter('search.customers.apply_filters', $query_customers, $filters, $q);
|
$query_customers = \Eventy::filter('search.customers.apply_filters', $query_customers, $filters, $q);
|
||||||
|
|
Loading…
Reference in a new issue