доработка компоненты вывода клиентов
This commit is contained in:
parent
d081571108
commit
bc6671bf10
@ -99,16 +99,15 @@ function getClients()
|
||||
if (array_key_exists('search', $this->filter) && $searchString = trim($this->filter['search'])) {
|
||||
$clients->whereFullText(['name', 'phone', 'email'], $this->filter['search']);
|
||||
}
|
||||
if ($this->status && $this->status == DealStatus::UNIQUE)
|
||||
|
||||
if (array_key_exists('status', $this->filter) && $this->status == DealStatus::UNIQUE)
|
||||
{
|
||||
$clients = $clients->whereHas('deals', function ($query)
|
||||
{
|
||||
$query->where('status', DealStatus::UNIQUE);
|
||||
})->paginate($this->count, ['*'], 'unique_clients');
|
||||
|
||||
|
||||
}
|
||||
elseif ($this->status && $this->status == DealStatus::NOT_UNIQUE)
|
||||
elseif (array_key_exists('status', $this->filter) && $this->status == DealStatus::NOT_UNIQUE)
|
||||
{
|
||||
$clients = $clients->whereHas('deals', function ($query)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user