mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando
This commit is contained in:
@ -11,7 +11,10 @@ $(()=>{
|
||||
{},
|
||||
{},
|
||||
function(response) {
|
||||
if(response.data.createAlbaran){
|
||||
if(!response.status){
|
||||
popErrorAlert(response.message);
|
||||
}
|
||||
if(response.data && response.data.createAlbaran){
|
||||
|
||||
Swal.fire({
|
||||
title: 'Atención!',
|
||||
@ -31,11 +34,62 @@ $(()=>{
|
||||
|
||||
},
|
||||
function(xhr, status, error) {
|
||||
popErrorAlert(error.responseJSON.message);
|
||||
if(status == 'error' && typeof(error)== 'string')
|
||||
popErrorAlert(error);
|
||||
else
|
||||
popErrorAlert(error.responseJSON.message);
|
||||
}
|
||||
).get();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
const tableEnvios = $('#tableOfEnvios').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
orderCellsTop: true,
|
||||
lengthMenu: [5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500],
|
||||
pageLength: 50,
|
||||
"dom": 'lBrtip',
|
||||
"ajax": {
|
||||
"url": "/logistica/datatableEnvios",
|
||||
},
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "pedidos" },
|
||||
{ "data": "num_lineas" },
|
||||
{ "data": "att" },
|
||||
{ "data": "direccion" },
|
||||
{ "data": "ciudad" },
|
||||
{ "data": "pais" },
|
||||
{ "data": "cp" },
|
||||
{ "data": "email" },
|
||||
{ "data": "telefono" },
|
||||
{
|
||||
"data": "finalizado",
|
||||
"className": "text-center",
|
||||
},
|
||||
{ "data": "action" }
|
||||
|
||||
],
|
||||
"language": {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [11]
|
||||
},
|
||||
],
|
||||
"order": [[0, "desc"]],
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-edit', function (e) {
|
||||
window.location.href = '/logistica/envio/' + $(this).attr('data-id');
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user