mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
feat:errores presupuesto
This commit is contained in:
@ -23,8 +23,6 @@ class ConfigErrores extends BaseResourceController
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
{
|
||||
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->errorPresupuestoModel = model(ErrorPresupuestoModel::class);
|
||||
}
|
||||
@ -32,11 +30,13 @@ class ConfigErrores extends BaseResourceController
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
return view(static::$viewPath . $this->indexRoute, $this->viewData);
|
||||
}
|
||||
public function viewForm(int $error_presupuesto_id)
|
||||
{
|
||||
$this->errorPresupuestoModel->update($error_presupuesto_id, [
|
||||
"last_user_id" => auth()->user()->id
|
||||
]);
|
||||
return view(static::$viewPath . 'viewErrorPresupuestoForm', ["error_presupuesto_id" => $error_presupuesto_id]);
|
||||
}
|
||||
public function store()
|
||||
@ -60,10 +60,9 @@ class ConfigErrores extends BaseResourceController
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
|
||||
$query = $this->errorPresupuestoModel->getQueryDatatable();
|
||||
return DataTable::of($query)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user