diff --git a/ci4/app/Controllers/Configuracion/ConfigErrores.php b/ci4/app/Controllers/Configuracion/ConfigErrores.php index fcaade48..4c727ef7 100644 --- a/ci4/app/Controllers/Configuracion/ConfigErrores.php +++ b/ci4/app/Controllers/Configuracion/ConfigErrores.php @@ -58,9 +58,9 @@ class ConfigErrores extends BaseResourceController public function get_error_presupuesto(int $error_presupuesto_id) { $data = $this->errorPresupuestoModel->getErrorPresupuestoForm($error_presupuesto_id); - if(isset($data[0])){ + if (isset($data[0])) { return $this->response->setJSON(["data" => $data[0]]); - }else{ + } else { return $this->response->setJSON(["data" => []]); } } @@ -73,9 +73,9 @@ class ConfigErrores extends BaseResourceController public function datatable() { - $query = $this->errorPresupuestoModel->getQueryDatatable(); + $query = $this->errorPresupuestoModel->getQueryDatatable()->orderBy("created_at", "DESC"); return DataTable::of($query) ->add("action", fn($q) => $q->id) ->toJson(true); } -} +} \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/pages/configuracion/error_presupuesto/errorPresupuesto.js b/httpdocs/assets/js/safekat/pages/configuracion/error_presupuesto/errorPresupuesto.js index 96a0d032..a58841cc 100644 --- a/httpdocs/assets/js/safekat/pages/configuracion/error_presupuesto/errorPresupuesto.js +++ b/httpdocs/assets/js/safekat/pages/configuracion/error_presupuesto/errorPresupuesto.js @@ -29,9 +29,14 @@ class ErrorPresupuestoView { init() { this.datatable = this.datatableItem.DataTable({ processing: true, - dom: 'Brtip', + layout :{ + topStart: 'pageLength', + topEnd: 'search', + bottomStart: 'info', + bottomEnd: 'paging' + }, serverSide: true, - + pageLength : 50, language: { url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" },