Atualizando users_datagrid.php
This commit is contained in:
parent
4f2f78b4ad
commit
160f9e3bb9
2 changed files with 4 additions and 8 deletions
10
vendor/model/Users.class.php
vendored
10
vendor/model/Users.class.php
vendored
|
|
@ -184,20 +184,16 @@ class Users
|
|||
}
|
||||
|
||||
/** Lista todos os egistros do banco com ou sem paginação*/
|
||||
public function All(? int $start, ? int $max, int $companyId, ? int $clientsId)
|
||||
public function All(? int $start, ? int $max, int $companyId)
|
||||
{
|
||||
/** Parametros de entrada */
|
||||
$this->start = $start;
|
||||
$this->max = $max;
|
||||
$this->companyId = $companyId;
|
||||
$this->clientsId = $clientsId;
|
||||
|
||||
|
||||
/** Verifica se o cliente foi informado */
|
||||
if($this->clientsId > 0){
|
||||
|
||||
$this->and .= " and company_id = {$this->clientsId} ";
|
||||
|
||||
}else{
|
||||
if($this->companyId > 0){
|
||||
|
||||
$this->and .= " and cast(company_id as unsigned) = 0 ";
|
||||
}
|
||||
|
|
|
|||
2
vendor/view/users/users_datagrid.php
vendored
2
vendor/view/users/users_datagrid.php
vendored
|
|
@ -107,7 +107,7 @@ if($Main->verifyToken()){
|
|||
<?php
|
||||
|
||||
/** Consulta a quantidade de registros */
|
||||
$resultUsers = $Users->All($start, $max, $CompaniesValidate->getCompanyId(), $CompaniesValidate->getClientsId());
|
||||
$resultUsers = $Users->All($start, $max, $CompaniesValidate->getCompanyId());
|
||||
|
||||
/** Consulta os usuário cadastrados*/
|
||||
foreach ($resultUsers as $resultKey => $result)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue