mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
datos envio clientes
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
<div id="direccionesForm">
|
||||
<fieldset class="att">
|
||||
<legend>Att</legend>
|
||||
<editor-field name="att"></editor-field>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
@ -580,7 +580,26 @@
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="domicilio-entrega" role="tabpanel">
|
||||
<h3>Proximanente</h3>
|
||||
<?= view("themes/backend/vuexy/form/clientes/cliente/_clienteDireccionesForm") ?>
|
||||
<table id="tableOfDireccionesEnvio" class="table dt-responsive dataTable" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('ClienteDirecciones.att') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.email') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.direccion') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.cp') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.municipio') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.provincia') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.ccaa') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.pais') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.telefono') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="facturacion" role="tabpanel">
|
||||
@ -803,9 +822,112 @@
|
||||
} ]
|
||||
} );
|
||||
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
/****************************************
|
||||
Direcciones cliente
|
||||
*****************************************/
|
||||
const editor2 = new DataTable.Editor({
|
||||
ajax: {
|
||||
url: "<?= route_to('editorOfClienteDirecciones') ?>",
|
||||
headers: {
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v,
|
||||
},
|
||||
},
|
||||
table : "#tableOfDireccionesEnvio",
|
||||
idSrc: 'id',
|
||||
fields: [ {
|
||||
name: "att"
|
||||
}, {
|
||||
name: "email"
|
||||
}, {
|
||||
name: "direccion"
|
||||
}, {
|
||||
name: "municipioId"
|
||||
}, {
|
||||
name: "provinciaId"
|
||||
}, {
|
||||
name: "ccaaId"
|
||||
}, {
|
||||
name: "paisId"
|
||||
}, {
|
||||
name: "cp"
|
||||
}, {
|
||||
name: "telefono"
|
||||
}, {
|
||||
"name": "cliente_id",
|
||||
"type": "hidden"
|
||||
},
|
||||
],
|
||||
template: '#direccionesForm'
|
||||
});
|
||||
|
||||
const lastColNr2 = $('#tableOfDireccionesEnvio').find("tr:first th").length - 1;
|
||||
|
||||
var tableDirecciones = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
draw:2,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
order: [[ 0, "asc" ], [ 1, "asc" ]],
|
||||
pageLength: 10,
|
||||
lengthChange: false,
|
||||
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('dataTableOfClienteDirecciones') ?>',
|
||||
data: function ( d ) {
|
||||
d.cliente_id = id;
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columns: [
|
||||
{ 'data': 'att' },
|
||||
{ 'data': 'email' },
|
||||
{ 'data': 'direccion' },
|
||||
{ 'data': 'municipioId' },
|
||||
{ 'data': 'provinciaId' },
|
||||
{ 'data': 'ccaaId' },
|
||||
{ 'data': 'paisId' },
|
||||
{ 'data': 'cp' },
|
||||
{ 'data': 'telefono' },
|
||||
{
|
||||
data: actionBtns,
|
||||
className: 'row-edit dt-center'
|
||||
}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr2]
|
||||
},
|
||||
{"orderData": [ 0], "targets": 0 },
|
||||
|
||||
],
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
buttons: [ {
|
||||
className: 'btn btn-primary float-end me-sm-3 me-1',
|
||||
extend: "create",
|
||||
editor: editor2,
|
||||
formOptions: {
|
||||
submitTrigger: -1,
|
||||
submitHtml: '<i class="ti ti-device-floppy"/>'
|
||||
}
|
||||
} ]
|
||||
} );
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
|
||||
@ -821,5 +943,7 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user