mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ya se filtra bien
This commit is contained in:
@ -308,8 +308,8 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
return $this->respond(Collection::datatable(
|
||||
$resourceData,
|
||||
$this->model->getListaPresupuestosCliente("", $clienteId)->countAllResults(),
|
||||
$this->model->getListaPresupuestosCliente($search, $clienteId)->countAllResults()
|
||||
$this->model->getListaPresupuestosCliente([], $clienteId)->countAllResults(),
|
||||
$this->model->getListaPresupuestosCliente($searchValues, $clienteId)->countAllResults()
|
||||
));
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
|
||||
@ -32,16 +32,14 @@ class PresupuestoModel extends \App\Models\BaseModel
|
||||
|
||||
const SORTABLE_CLIENTE = [
|
||||
0 => "t1.id",
|
||||
1 => "t1.created_at",
|
||||
1 => "t1.updated_at",
|
||||
2 => "t7.codigo",
|
||||
3 => "t2.nombre",
|
||||
4 => "t3.first_name",
|
||||
5 => "t1.titulo",
|
||||
6 => "t5.nombre",
|
||||
8 => "t1.paginas",
|
||||
9 => "t1.tirada",
|
||||
10 => "t1.total_presupuesto",
|
||||
11 => "t6.estado",
|
||||
4 => "t1.titulo",
|
||||
5 => "t1.paginas",
|
||||
6 => "t1.tirada",
|
||||
7 => "t1.total_presupuesto",
|
||||
8 => "t6.id",
|
||||
];
|
||||
|
||||
protected $allowedFields = [
|
||||
|
||||
@ -211,7 +211,13 @@ theTable = $('#tableOfPresupuestos').DataTable({
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
},
|
||||
<?php if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')): ?>
|
||||
{
|
||||
target: 3,
|
||||
visible: false
|
||||
}
|
||||
<?php endif; ?>
|
||||
],
|
||||
|
||||
columns : [
|
||||
@ -264,9 +270,9 @@ theTable = $('#tableOfPresupuestos').DataTable({
|
||||
}
|
||||
},
|
||||
},
|
||||
<?php if ($clienteId == 0): ?>
|
||||
{ 'data': 'cliente' },
|
||||
<?php endif; ?>
|
||||
|
||||
{ 'data': 'cliente'},
|
||||
|
||||
{ 'data': 'titulo' },
|
||||
{ 'data': 'paginas' },
|
||||
{ 'data': 'tirada' },
|
||||
|
||||
Reference in New Issue
Block a user