mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
intentando resolver conflictos
This commit is contained in:
155
ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteDireccionesForm.php
Executable file
155
ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteDireccionesForm.php
Executable file
@ -0,0 +1,155 @@
|
||||
<div id="addressForm" action='create' class="modal fade addModal">
|
||||
<div class="modal-dialog modal-lg modal-simple">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="labelTitleConfirmDialog" class="modal-title"><?= lang('ClienteDirecciones.direccionTitle') ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label for="add_alias" class="form-label">
|
||||
<?= lang('ClienteDirecciones.alias') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_alias" tabindex="1" maxLength="100" class="form-control">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="add_att" class="form-label">
|
||||
<?= lang('ClienteDirecciones.att') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_att" tabindex="1" maxLength="100" class="form-control">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="add_email" class="form-label">
|
||||
<?= lang('ClienteDirecciones.email') ?>
|
||||
</label>
|
||||
<input type="text" id="add_email" tabindex="2" maxLength="100" class="form-control">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="add_direccion" class="form-label">
|
||||
<?= lang('ClienteDirecciones.direccion') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_direccion" tabindex="3" maxLength="255" class="form-control">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class='row'>
|
||||
|
||||
<div id='divPais' class="col-md-12 col-lg-12 pl-4">
|
||||
<div class="mb-3">
|
||||
<label for="add_pais_id" class="form-label">
|
||||
<?=lang('ClienteDirecciones.pais') ?>*
|
||||
</label>
|
||||
<select id="add_pais_id" tabindex="4" class="form-control select2bs" style="width: 100%;" >
|
||||
<option value="" disabled selected><?=lang('ClienteDirecciones.selectPais') ?></option>
|
||||
<?php foreach ($paisList as $item) : ?>
|
||||
<option value="<?=$item->id ?>">
|
||||
<?=$item->nombre ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
|
||||
</div> <!-- //.row -->
|
||||
|
||||
<div class='row'>
|
||||
|
||||
<div id='divMunicipio' class="col-md-12 col-lg-12 pl-4">
|
||||
<div class="mb-3">
|
||||
<label for="add_municipio" class="form-label">
|
||||
<?=lang('ClienteDirecciones.municipio') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_municipio" tabindex="6" maxLength="100" class="form-control">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-lg-6 pl-4 spain-data" style="display: none;">
|
||||
<div class="mb-3">
|
||||
<label for="add_provincia" class="form-label">
|
||||
<?=lang('ClienteDirecciones.provincia') ?>
|
||||
</label>
|
||||
<input type="text" id="add_provincia" tabindex="7" maxLength="100" class="form-control">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
</div> <!-- //.row -->
|
||||
|
||||
<div class='row'>
|
||||
|
||||
<div class="col-md-12 col-lg-6 pl-4">
|
||||
<div class="mb-3">
|
||||
<label for="add_cp" class="form-label">
|
||||
<?=lang('ClienteDirecciones.cp') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_cp" tabindex="8" maxLength="100" class="form-control">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-lg-6 pl-4">
|
||||
<div class="mb-3">
|
||||
<label for="add_telefono" class="form-label">
|
||||
<?=lang('ClienteDirecciones.telefono') ?>
|
||||
</label>
|
||||
<input type="text" id="add_telefono" tabindex="9" maxLength="100" class="form-control"></input>
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
</div> <!-- //.row -->
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="saveAdd"
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
>Guardar</button>
|
||||
<button id="cancelAdd"
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
>Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
$('#cancelAdd').on('click', function(){
|
||||
$('#addressForm').modal("hide");
|
||||
})
|
||||
|
||||
|
||||
$('#saveAdd').on('click', function(){
|
||||
saveAdd_callback()
|
||||
})
|
||||
|
||||
|
||||
|
||||
$('#add_pais_id').on('change', function(){
|
||||
var nombre_pais = $("#add_pais_id option:selected" ).text().trim();
|
||||
if(nombre_pais.localeCompare('España')==0){
|
||||
$('#divPais').removeClass('col-lg-12').addClass('col-lg-6')
|
||||
$('#divMunicipio').removeClass('col-lg-12').addClass('col-lg-6')
|
||||
$('.spain-data').css('display', 'inline')
|
||||
}
|
||||
else{
|
||||
$('.spain-data').css('display', 'none')
|
||||
$('#divPais').removeClass('col-lg-6').addClass('col-lg-12')
|
||||
$('#divMunicipio').removeClass('col-lg-6').addClass('col-lg-12')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// clear modal items when close
|
||||
$('#addressForm').on('hidden.bs.modal', function () {
|
||||
$('#add_alias').val("")
|
||||
$('#add_att').val("")
|
||||
$('#add_email').val("")
|
||||
$('#add_direccion').val("")
|
||||
$("#add_pais_id").val("").change()
|
||||
$('#add_municipio').val("")
|
||||
$('#add_provincia').val("")
|
||||
$('#add_cp').val("")
|
||||
$('#add_telefono').val("")
|
||||
})
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
1532
ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteFormItems.php
Executable file
1532
ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteFormItems.php
Executable file
File diff suppressed because it is too large
Load Diff
65
ci4/app/Views/themes/vuexy/form/clientes/cliente/convert2templateModal.php
Executable file
65
ci4/app/Views/themes/vuexy/form/clientes/cliente/convert2templateModal.php
Executable file
@ -0,0 +1,65 @@
|
||||
<div id="convert2Template" class="modal fade addModal">
|
||||
<div class="modal-dialog modal-lg modal-simple">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="labelTitleConfirmDialog" class="modal-title"><?= lang('ClientePrecios.convertir2plantilla') ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id='error-nombre'></div>
|
||||
|
||||
<div class="mb-3">
|
||||
<p><?= lang('ClientePrecios.convertir2plantillaText') ?></p>
|
||||
<p><?= lang('ClientePrecios.convertir2plantillaText2') ?></p>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="nombre_plantilla" class="form-label">
|
||||
<?= lang('ClientePrecios.nombrePlantilla') ?>
|
||||
</label>
|
||||
<input type="text" id="nombre_plantilla" maxLength="100" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="saveTemplate"
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
><?= lang('App.global_save') ?></button>
|
||||
<button id="cancelTemplate"
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
><?= lang('App.user_delete_btn_cancel') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
$('#saveTemplate').on('click', function(){
|
||||
if($('#nombre_plantilla').val().length == 0){
|
||||
popErrorAlert('<?= lang('ClientePrecios.errors.error_nombre_template') ?>', 'error-nombre')
|
||||
}
|
||||
else{
|
||||
data = new FormData();
|
||||
data.append('cliente_id', id)
|
||||
data.append('nombre', $('#nombre_plantilla').val())
|
||||
data.append('<?= csrf_token() ?? "token" ?>', <?= csrf_token() ?>v)
|
||||
fetch('<?= route_to("createClienteplantillaprecios");?>' , {
|
||||
method: "POST",
|
||||
body: data,
|
||||
})
|
||||
.then(data => {
|
||||
$('#convert2Template').modal("hide");
|
||||
var newOption = new Option($('#nombre_plantilla').val(), "", false, false);
|
||||
$('#plantillas').append(newOption);
|
||||
$('#nombre_plantilla').val("");
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$('#cancelTemplate').on('click', function(){
|
||||
$('#convert2Template').modal("hide");
|
||||
})
|
||||
<?=$this->endSection() ?>
|
||||
238
ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteForm.php
Executable file
238
ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteForm.php
Executable file
@ -0,0 +1,238 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/datatables") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="clienteForm" method="post" class="card-body" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/clientes/cliente/_clienteFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="pt-4">
|
||||
<input
|
||||
type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
id="saveForm"
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
>
|
||||
<?= anchor(route_to("clienteList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
</div><!-- /.card-footer -->
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
$(document).keypress(function (e) {
|
||||
var key = e.which;
|
||||
if(key == 13) // the enter key code
|
||||
{ e.preventDefault()
|
||||
if($('#addressForm').hasClass('show')){
|
||||
$("#saveAdd").click();
|
||||
}
|
||||
else if ($('#convert2Template').hasClass('show')){
|
||||
$("#saveTemplate").click();
|
||||
}
|
||||
else{
|
||||
$('#saveForm').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#soporteId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfUsers") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id_user',
|
||||
text: 'first_name',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#formaPagoId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfFormasDePagos") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#paisId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfPaises") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#provinciaId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfProvincias") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#comunidadAutonomaId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfComunidadesAutonomas") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#comercialId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfUsers") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id_user',
|
||||
text: 'first_name',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/sk-datatables.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/safekat.css') ?>">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
147
ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteList.php
Executable file
147
ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteList.php
Executable file
@ -0,0 +1,147 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Clientes.clienteList') ?></h3>
|
||||
<?=anchor(route_to('clienteAdd'), lang('Basic.global.addNew').' '.lang('Clientes.cliente'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<table id="tableOfClientes" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Clientes.nombre') ?></th>
|
||||
<th><?= lang('Clientes.alias') ?></th>
|
||||
<th><?= lang('Clientes.cif') ?></th>
|
||||
<th><?= lang('Clientes.email') ?></th>
|
||||
<th><?= lang('Users.comercial') ?></th>
|
||||
<th><?= lang('FormasPagoes.formaDePago') ?></th>
|
||||
<th><?= lang('Clientes.vencimiento') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfClientes').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `
|
||||
<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i></a>
|
||||
<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>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
|
||||
theTable = $('#tableOfClientes').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip',
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[0, 'asc']],
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('clienteDT') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': 'nombre' },
|
||||
{ 'data': 'alias' },
|
||||
{ 'data': 'cif' },
|
||||
{ 'data': 'email' },
|
||||
{ 'data': 'comercial' },
|
||||
{ 'data': 'forma_pago_id' },
|
||||
{ 'data': 'vencimiento' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `/clientes/cliente/edit/${$(this).attr('data-id')}`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
$(".btn-remove").attr('data-id', $(this).attr('data-id'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-remove', function(e) {
|
||||
const dataId = $(this).attr('data-id');
|
||||
const row = $(this).closest('tr');
|
||||
if ($.isNumeric(dataId)) {
|
||||
$.ajax({
|
||||
url: `/clientes/cliente/delete/${dataId}`,
|
||||
method: 'GET',
|
||||
}).done((data, textStatus, jqXHR) => {
|
||||
$('#confirm2delete').modal('toggle');
|
||||
theTable.clearPipeline();
|
||||
theTable.row($(row)).invalidate().draw();
|
||||
popSuccessAlert(data.msg ?? jqXHR.statusText);
|
||||
}).fail((jqXHR, textStatus, errorThrown) => {
|
||||
popErrorAlert(jqXHR.responseJSON.messages.error)
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.html5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.print.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/jszip/jszip.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/pdfmake.min.js") ?>" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/vfs_fonts.js") ?>"></script>
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
Reference in New Issue
Block a user