Atualizando users_datagrid.php

This commit is contained in:
Kenio 2025-07-18 13:03:38 -03:00
parent 4f2f78b4ad
commit 160f9e3bb9
2 changed files with 4 additions and 8 deletions

View file

@ -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 ";
}

View file

@ -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)