Atualizando Produtos company
This commit is contained in:
parent
d777313553
commit
72fa1ddb88
1 changed files with 7 additions and 9 deletions
16
vendor/view/users/users_datagrid.php
vendored
16
vendor/view/users/users_datagrid.php
vendored
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
/** Importação de classes */
|
||||
use vendor\model\Users;
|
||||
use vendor\model\Company;
|
||||
use vendor\model\Companies;
|
||||
use vendor\controller\company\CompanyValidate;
|
||||
use vendor\controller\Companies\CompaniesValidate;
|
||||
|
|
@ -13,7 +12,6 @@ if($Main->verifyToken()){
|
|||
/** Instânciamento de classes */
|
||||
$Users = new Users();
|
||||
$Companies = new Companies();
|
||||
$Company = new Company();
|
||||
$CompanyValidate = new CompanyValidate;
|
||||
$CompaniesValidate = new CompaniesValidate;
|
||||
|
||||
|
|
@ -31,10 +29,10 @@ if($Main->verifyToken()){
|
|||
|
||||
/** Valida o campo */
|
||||
$CompanyValidate->setCompanyId($companyId);
|
||||
$ClientsValidate->setClientsId($companiesId);
|
||||
$CompaniesValidate->setClientsId($companiesId);
|
||||
|
||||
/** Consulta a quantidade de registros */
|
||||
$NumberRecords = $Users->Count($CompanyValidate->getCompanyId(), $ClientsValidate->getClientsId())->qtde;
|
||||
$NumberRecords = $Users->Count($CompanyValidate->getCompanyId(), $CompaniesValidate->getClientsId())->qtde;
|
||||
|
||||
/** Verifico a quantidade de registros localizados */
|
||||
if ($NumberRecords > 0){?>
|
||||
|
|
@ -54,7 +52,7 @@ if($Main->verifyToken()){
|
|||
<?php
|
||||
|
||||
/** Verifica se a empresa foi informada */
|
||||
if($ClientsValidate->getClientsId() == 0 && $CompanyValidate->getCompanyId() > 0){
|
||||
if($CompaniesValidate->getClientsId() == 0 && $CompanyValidate->getCompanyId() > 0){
|
||||
|
||||
/** Consulta os dados da empresa */
|
||||
$CompanyResult = $Company->Get($CompanyValidate->getCompanyId());
|
||||
|
|
@ -76,7 +74,7 @@ if($Main->verifyToken()){
|
|||
|
||||
<div class="col-md-4 text-right">
|
||||
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="request('FOLDER=view&TABLE=users&ACTION=users_form&company_id=<?php echo $CompanyValidate->getCompanyId();?>&company_id=<?php echo $ClientsValidate->getClientsId();?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)" data-toggle="tooltip" data-placement="left" title="Cadastrar novo usuário">
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="request('FOLDER=view&TABLE=users&ACTION=users_form&company_id=<?php echo $CompanyValidate->getCompanyId();?>&company_id=<?php echo $CompaniesValidate->getClientsId();?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)" data-toggle="tooltip" data-placement="left" title="Cadastrar novo usuário">
|
||||
|
||||
<i class="fas fa-plus-circle mr-1"></i>Novo
|
||||
|
||||
|
|
@ -129,7 +127,7 @@ if($Main->verifyToken()){
|
|||
<?php
|
||||
|
||||
/** Consulta a quantidade de registros */
|
||||
$resultUsers = $Users->All($start, $max, $CompanyValidate->getCompanyId(), $ClientsValidate->getClientsId());
|
||||
$resultUsers = $Users->All($start, $max, $CompanyValidate->getCompanyId(), $CompaniesValidate->getClientsId());
|
||||
|
||||
/** Consulta os usuário cadastrados*/
|
||||
foreach ($resultUsers as $resultKey => $result)
|
||||
|
|
@ -143,7 +141,7 @@ if($Main->verifyToken()){
|
|||
<td><?php echo $result->email; ?></td>
|
||||
<td class="text-center" width="30"><?php echo date("d/m/Y",strtotime($result->date_register)); ?></td>
|
||||
<td class="text-center" width="40"><?php echo $result->active == "S" ? "Sim" : "Não"; ?></td>
|
||||
<td class="text-center" width="20"><a type="button" class="btn btn-light btn-sm" onclick="request('FOLDER=view&TABLE=users&ACTION=users_form&users_id=<?php echo $result->users_id; ?>&company_id=<?php echo $CompanyValidate->getCompanyId(); ?>&company_id=<?php echo $ClientsValidate->getClientsId(); ?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)"><i class="far fa-edit mr-1"></i></a></td>
|
||||
<td class="text-center" width="20"><a type="button" class="btn btn-light btn-sm" onclick="request('FOLDER=view&TABLE=users&ACTION=users_form&users_id=<?php echo $result->users_id; ?>&company_id=<?php echo $CompanyValidate->getCompanyId(); ?>&company_id=<?php echo $CompaniesValidate->getClientsId(); ?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)"><i class="far fa-edit mr-1"></i></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
|
@ -192,7 +190,7 @@ if($Main->verifyToken()){
|
|||
|
||||
<div class="col-md-4 text-right">
|
||||
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="request('FOLDER=view&TABLE=users&ACTION=users_form&company_id=<?php echo $CompanyValidate->getCompanyId();?>&company_id=<?php echo $ClientsValidate->getClientsId();?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)">
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="request('FOLDER=view&TABLE=users&ACTION=users_form&company_id=<?php echo $CompanyValidate->getCompanyId();?>&company_id=<?php echo $CompaniesValidate->getClientsId();?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)">
|
||||
|
||||
<i class="fas fa-plus-circle mr-1"></i>Cadastrar novo usuário
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue