mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
default sort error presupuestos datatable,set pagination to 50 and add page selector
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user