Обновлен вывод сведений о жк в таблице
This commit is contained in:
parent
5bdbec2f16
commit
f8d30e4908
@ -100,10 +100,9 @@ function getClients()
|
|||||||
})
|
})
|
||||||
->orderBy('deal_clients.id', 'desc')
|
->orderBy('deal_clients.id', 'desc')
|
||||||
->with('deals');
|
->with('deals');
|
||||||
$clients = $clients->select('users.*');
|
$clients->select('users.id','users.name','users.phone','users.email');
|
||||||
$clients = $clients->orderBy('name');
|
$clients->orderBy('name');
|
||||||
$clients->join('deals', 'deal_clients.deal_id', '=', 'deals.id');
|
$clients->join('deals', 'deal_clients.deal_id', '=', 'deals.id');
|
||||||
|
|
||||||
if (array_key_exists('status', $this->filter)) {
|
if (array_key_exists('status', $this->filter)) {
|
||||||
$clients->where('deals.status', $this->filter['status']);
|
$clients->where('deals.status', $this->filter['status']);
|
||||||
}
|
}
|
||||||
@ -129,7 +128,6 @@ function getClients()
|
|||||||
$query->whereIn('status', [DealStatus::MODERATION, DealStatus::NEW , DealStatus::NOT_UNIQUE]);
|
$query->whereIn('status', [DealStatus::MODERATION, DealStatus::NEW , DealStatus::NOT_UNIQUE]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//$clients = $clients->skip($this->currentPage)->take(10)->get();
|
|
||||||
return $clients;
|
return $clients;
|
||||||
}
|
}
|
||||||
public function render()
|
public function render()
|
||||||
@ -139,6 +137,7 @@ public function render()
|
|||||||
$this->clientsCount = $clients->count();
|
$this->clientsCount = $clients->count();
|
||||||
$this->currentPage = 1;
|
$this->currentPage = 1;
|
||||||
};
|
};
|
||||||
|
$clients->groupBy('users.id','users.name','users.phone','users.email');
|
||||||
$clients = $clients->skip(($this->currentPage - 1) * $this->count)->take($this->count)->get();
|
$clients = $clients->skip(($this->currentPage - 1) * $this->count)->take($this->count)->get();
|
||||||
return view(
|
return view(
|
||||||
'livewire.clients-table',
|
'livewire.clients-table',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user