problema muestra genericos que no

This commit is contained in:
2024-11-21 20:16:50 +01:00
parent 80b4d3aaf4
commit 3af5851af7
10 changed files with 534 additions and 221 deletions

View File

@ -293,4 +293,25 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
return $this->failUnauthorized('Invalid request', 403);
}
}
public function getPapelGenericoCliente()
{
if ($this->request->isAJAX()) {
$tipo = goSanitize($this->request->getGet('tipo'))[0];
$cubierta = goSanitize($this->request->getGet('text'))[0];
$papel_especial = goSanitize($this->request->getGet('papel_especial'))[0] ?? 0;
$menu = $this->model->getPapelGenericoCliente($tipo, $cubierta, $papel_especial);
$newTokenHash = csrf_hash();
$csrfTokenName = csrf_token();
$data = [
'papeles' => $menu,
$csrfTokenName => $newTokenHash
];
return $this->respond($data);
} else {
return $this->failUnauthorized('Invalid request', 403);
}
}
}