mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
implementado pestaña clientes en usuarios
This commit is contained in:
@ -654,6 +654,24 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="usuarios" role="tabpanel">
|
||||
|
||||
<div class="row align-items-end">
|
||||
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div>
|
||||
<label id="label_usuario" for="usuarios" class="form-label">
|
||||
<?= lang('Users.usersAvailables') ?>
|
||||
</label>
|
||||
|
||||
<select id="usuariosDisponibles" name="usuarios_disponibles" class="form-control select2bs2" style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<button id="addUserToClient" type="button" class="btn btn-secondary waves-effect waves-light float-start"><?= lang("Users.add")?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tableOfClienteUsuarios" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -1104,67 +1122,6 @@ function delete_direccion_envio(dataId){
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
/****************************************
|
||||
Contactos
|
||||
*****************************************/
|
||||
|
||||
const lastColNrCU = $('#tableOfClienteUsuarios').find("tr:first th").length - 1;
|
||||
|
||||
var theTableCU = $('#tableOfClienteUsuarios').DataTable( {
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
lengthMenu: [ 5, 10, 25],
|
||||
order: [[ 0, "asc" ], [ 1, "asc" ]],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
searching: false,
|
||||
paging: true,
|
||||
info: false,
|
||||
dom: '<"mt-4"><"float-end"B><"float-start"l><t><"mt-4 mb-3"p>',
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfClienteUsuarios') ?>',
|
||||
data: {
|
||||
//id_cliente: id,
|
||||
id_cliente: 1,
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columns: [
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'apellidos' },
|
||||
{ 'data': 'email' },
|
||||
{
|
||||
data: actionBtns,
|
||||
className: 'row-edit dt-center'
|
||||
}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNrCU]
|
||||
},
|
||||
{
|
||||
"orderData": [ 0, 1 ],
|
||||
"targets": 0
|
||||
},
|
||||
|
||||
],
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
}
|
||||
} );
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.bootstrap5.min.css') ?>">
|
||||
|
||||
Reference in New Issue
Block a user