diff --git a/ci4/app/Controllers/Configuracion/ConfigErrores.php b/ci4/app/Controllers/Configuracion/ConfigErrores.php index 6346507d..31160e2f 100644 --- a/ci4/app/Controllers/Configuracion/ConfigErrores.php +++ b/ci4/app/Controllers/Configuracion/ConfigErrores.php @@ -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); } -} \ No newline at end of file +} diff --git a/ci4/app/Models/Presupuestos/ErrorPresupuesto.php b/ci4/app/Models/Presupuestos/ErrorPresupuesto.php index 0c4fa122..318ea171 100644 --- a/ci4/app/Models/Presupuestos/ErrorPresupuesto.php +++ b/ci4/app/Models/Presupuestos/ErrorPresupuesto.php @@ -62,7 +62,7 @@ class ErrorPresupuesto extends Model "presupuesto_id" => $presupuesto_id, "presupuesto_user_id" => $presupuesto_user_id, "error" => $error, - "datos" => json_encode($datos) + "datos_presupuesto" => json_encode($datos) ]); } public function updateComment(int $error_presupuesto_id, string $comment): bool @@ -81,7 +81,8 @@ class ErrorPresupuesto extends Model "CONCAT(t1.first_name,' ',t1.last_name) as presupuestoUser", "CONCAT(t2.first_name,' ',t2.last_name) as lastUser", "presupuesto_errores.created_at", - "presupuesto_errores.datos", + "presupuesto_errores.datos_presupuesto", + "presupuesto_errores.error", "presupuesto_errores.visto", "presupuesto_errores.comment", diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php index 8f57bb37..9b30380b 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php @@ -25,7 +25,7 @@