mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
recuperados cambios de rama antigua
This commit is contained in:
@ -718,13 +718,6 @@ $(document).on('click', '.btn-remove', function(e) {
|
||||
}
|
||||
});
|
||||
|
||||
// funcion para obtener el cliente id de la url
|
||||
function getId(){
|
||||
var url = window.location.href;
|
||||
var parts = url.split("/");
|
||||
return parts[parts.length-1];
|
||||
}
|
||||
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
@ -775,11 +768,11 @@ function getId(){
|
||||
|
||||
editor.on( 'preSubmit', function ( e, d, type ) {
|
||||
if ( type === 'create'){
|
||||
d.data[0]['cliente_id'] = getId();
|
||||
d.data[0]['cliente_id'] = id;
|
||||
}
|
||||
else if(type === 'edit' ) {
|
||||
for (v in d.data){
|
||||
d.data[v]['cliente_id'] = getId();
|
||||
d.data[v]['cliente_id'] = id;
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -855,7 +848,7 @@ function getId(){
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfClienteContactos') ?>',
|
||||
data: {
|
||||
id_cliente: getId(),
|
||||
id_cliente: id,
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
@ -1019,11 +1012,11 @@ function getId(){
|
||||
|
||||
editorPrecios.on( 'preSubmit', function ( e, d, type ) {
|
||||
if ( type === 'create'){
|
||||
d.data[0]['cliente_id'] = getId();
|
||||
d.data[0]['cliente_id'] = id;
|
||||
}
|
||||
else if(type === 'edit' ) {
|
||||
for (v in d.data){
|
||||
d.data[v]['cliente_id'] = getId();
|
||||
d.data[v]['cliente_id'] = id;
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1083,7 +1076,7 @@ function getId(){
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfClienteprecios') ?>',
|
||||
data: {
|
||||
cliente_id: getId(),
|
||||
cliente_id: id,
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
@ -1373,7 +1366,7 @@ var tableDirecciones = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfClienteDirecciones') ?>',
|
||||
data: function ( d ) {
|
||||
d.cliente_id = getId();
|
||||
d.cliente_id = id;
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
@ -1468,7 +1461,7 @@ function delete_direccion_envio(dataId){
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.bootstrap5.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/vendor/libs/datatables-bs5/datatables.bootstrap5.css") ?>">
|
||||
<link rel="stylesheet" href="<?= site_url("/themes/vuexy/vendor/libs/datatables-bs5/dataTables.bootstrap5.min.css") ?>">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
|
||||
Reference in New Issue
Block a user