mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
presupuestos direcciones!
This commit is contained in:
@ -967,7 +967,7 @@ var tableDirecciones = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
processing: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
order: [[ 0, "asc" ], [ 1, "asc" ]],
|
||||
order: [0, "asc" ],
|
||||
pageLength: 10,
|
||||
lengthChange: false,
|
||||
searching: false,
|
||||
@ -1060,7 +1060,7 @@ $(document).on('click', '.btn-delete-add', function(e) {
|
||||
|
||||
function delete_direccion_envio(dataId){
|
||||
$.ajax({
|
||||
url: `/clientedirecciones/delete/${dataId}`,
|
||||
url: `/clientes/clientedirecciones/delete/${dataId}`,
|
||||
method: 'GET',
|
||||
}).done((data, textStatus, jqXHR) => {
|
||||
$('#confirm2delete').modal('toggle');
|
||||
|
||||
@ -1,39 +1,50 @@
|
||||
<div class="accordion mt-3" id="accordionDatosLibro">
|
||||
<div class="accordion mt-3" id="accordionEnvios">
|
||||
<div class="card accordion-item active">
|
||||
<h2 class="accordion-header" id="headingOne">
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionDatosLibroTip" aria-expanded="false" aria-controls="accordionDatosLibroTip">
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionEnviosTip" aria-expanded="false" aria-controls="accordionEnviosTip">
|
||||
<h4><?= lang("Presupuestos.envios") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
|
||||
<table id="tableOfDireccionesEnvio" class="table dt-responsive dataTable" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Presupuestos.cantidad') ?></th>
|
||||
<th><?= lang('Presupuestos.peso') ?></th>
|
||||
<th><?= lang('Presupuestos.att') ?></th>
|
||||
<th><?= lang('Presupuestos.email') ?></th>
|
||||
<th><?= lang('Presupuestos.direccion') ?></th>
|
||||
<th><?= lang('Presupuestos.paisiD') ?></th>
|
||||
<th><?= lang('Presupuestos.ccaa') ?></th>
|
||||
<th><?= lang('Presupuestos.provincia') ?></th>
|
||||
<th><?= lang('Presupuestos.municipio') ?></th>
|
||||
<th><?= lang('Presupuestos.cp') ?></th>
|
||||
<th><?= lang('Presupuestos.telefono') ?></th>
|
||||
<th><?= lang('Presupuestos.precio') ?></th>
|
||||
<th></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="accordionDatosLibroTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosLibro">
|
||||
<div id="accordionEnviosTip" class="accordion-collapse collapse show" data-bs-parent="#accordionEnvios">
|
||||
<div class="accordion-body">
|
||||
|
||||
<table id="tableOfDireccionesEnvio" class="table dt-responsive dataTable px-4" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('PresupuestosDirecciones.cantidad') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.peso') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.att') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.email') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.direccion') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.cp') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.municipio') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.provincia') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.ccaa') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.pais') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.telefono') ?></th>
|
||||
<th><?= lang('PresupuestosDirecciones.precio') ?></th>
|
||||
<th></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-4 px-4 py-2">
|
||||
<input class="form-check-input" type="checkbox" id="recoger_en_taller" name="recoger_en_taller" value="1" <?= $presupuestoEntity->recoger_en_taller == true ? 'checked' : ''; ?> >
|
||||
<label class="form-check-label" for="recoger_en_taller"><?= lang('Presupuestos.recogerEnTaller') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-4 px-4 py-2">
|
||||
<button id="insertar_direccion" type="button" class="btn btn-secondary waves-effect waves-light float-start"><?= lang("Presupuestos.insertar")?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- //.accordion-body -->
|
||||
</div> <!-- //.accordion-collapse -->
|
||||
</div> <!-- //.accordion-item -->
|
||||
@ -43,9 +54,10 @@
|
||||
<!-- Código JS comportamiento general pag. -->
|
||||
<!------------------------------------------->
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
const lastColNr = $('#tableOfDireccionesEnvio').find("tr:first th").length - 1;
|
||||
|
||||
const actionBtns = function(data) {
|
||||
const actionBtns_direcciones = function(data) {
|
||||
return `
|
||||
<span class="edit"><a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i></a></span>
|
||||
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}" data-bs-toggle="modal" data-bs-target="#confirm2delete"></i></a>
|
||||
@ -54,20 +66,20 @@ const actionBtns = function(data) {
|
||||
};
|
||||
|
||||
var tableEnvios = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
draw:4,
|
||||
draw:5,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
order: [[ 0, "asc" ], [ 1, "asc" ]],
|
||||
pageLength: 10,
|
||||
order: [[ 0, "asc" ]],
|
||||
pageLength: 20,
|
||||
lengthChange: false,
|
||||
searching: false,
|
||||
paging: true,
|
||||
paging: false,
|
||||
info: false,
|
||||
dom: '<"mt-4"><"float-end"B><"float-start"l><t><"mt-4 mb-3"p>',
|
||||
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfPresupuestosenvios') ?>',
|
||||
url: '<?= route_to('dataTableOfPresupuestoDirecciones') ?>',
|
||||
data: function ( d ) {
|
||||
d.presupuesto_id = id;
|
||||
},
|
||||
@ -81,16 +93,16 @@ var tableEnvios = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
{ 'data': 'att' },
|
||||
{ 'data': 'email' },
|
||||
{ 'data': 'direccion' },
|
||||
{ 'data': 'paisId' },
|
||||
{ 'data': 'ccaaId' },
|
||||
{ 'data': 'provinciaId' },
|
||||
{ 'data': 'municipioId' },
|
||||
{ 'data': 'cp' },
|
||||
{ 'data': 'municipio' },
|
||||
{ 'data': 'provincia' },
|
||||
{ 'data': 'ccaaId' },
|
||||
{ 'data': 'paisId' },
|
||||
{ 'data': 'telefono' },
|
||||
{ 'data': 'precio' },
|
||||
{ 'data': 'margen' },
|
||||
{
|
||||
data: actionBtns,
|
||||
data: actionBtns_direcciones,
|
||||
className: 'row-edit dt-center'
|
||||
}
|
||||
],
|
||||
@ -100,34 +112,12 @@ var tableEnvios = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
},
|
||||
{"orderData": [ 0, 1 ], "targets": 0 },
|
||||
{"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: "createInline",
|
||||
editor: editor3,
|
||||
formOptions: {
|
||||
submitTrigger: -1,
|
||||
submitHtml: '<a href="javascript:void(0);"><i class="ti ti-device-floppy"></i></a>'
|
||||
|
||||
},
|
||||
action: function ( e, dt, node, config ) {
|
||||
if(selected_tirada_id == -1){
|
||||
popErrorAlert("<?= lang('TarifaEncuadernacionLineas.validation.error_seleccion_tiradas') ?>");
|
||||
}
|
||||
else{
|
||||
formOptions= {
|
||||
submitTrigger: -1,
|
||||
submitHtml: '<a href="javascript:void(0);"><i class="ti ti-device-floppy"></i></a>'
|
||||
|
||||
};
|
||||
editor3.inlineCreate(config.position, formOptions);
|
||||
}
|
||||
},
|
||||
} ]*/
|
||||
|
||||
} );
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user