terminado consultas de pedidos a safekat

This commit is contained in:
2025-12-28 12:01:40 +01:00
parent 61be8d6d3b
commit 5b5ce7ccd7
4 changed files with 60 additions and 8368 deletions

View File

@ -42,7 +42,7 @@ $(() => {
if (estadoSpan.length) {
estadoSpan.text(response.state);
}
if(response.stateKey === 'terminado' || response.stateKey === 'cancelado') {
if (response.stateKey === 'terminado' || response.stateKey === 'cancelado') {
$(`.update-estado-button[data-linea-id='${lineaId}']`)
.closest('.update-estado-button')
.addClass('d-none');
@ -57,7 +57,12 @@ $(() => {
cancelButton: 'btn btn-light'
},
showConfirmButton: false
}).then((result) => {
if (result.dismiss === Swal.DismissReason.timer) {
location.reload();
}
});
;
}
},
error: function (xhr, status, error) {

View File

@ -2,21 +2,21 @@ $(() => {
if ($(".btn-download-ferro").length) {
$(document).on('click', '.btn-download-ferro', function () {
const lineaId = $(this).data('linea-id');
window.open(`/pedidos/linea/${lineaId}/download-ferro`, '_blank');
});
}
if ($(".btn-download-cub").length) {
$(document).on('click', '.btn-download-cub', function () {
const lineaId = $(this).data('linea-id');
window.open(`/pedidos/linea/${lineaId}/download-cub`, '_blank');
});
}
if ($(".btn-download-tapa").length) {
$(document).on('click', '.btn-download-tapa', function () {
const lineaId = $(this).data('linea-id');
window.open(`/pedidos/linea/${lineaId}/download-tapa`, '_blank');
});
}
@ -24,7 +24,7 @@ $(() => {
if ($(".btn-aceptar-ferro").length) {
$(document).on('click', '.btn-aceptar-ferro', function () {
const lineaId = $(this).data('linea-id');
$.ajax({
url: `/pedidos/linea/${lineaId}/aceptar-ferro`,
type: 'POST',
@ -60,7 +60,12 @@ $(() => {
cancelButton: 'btn btn-light'
},
showConfirmButton: false
}).then((result) => {
if (result.dismiss === Swal.DismissReason.timer) {
location.reload();
}
});
;
}
},
error: function (xhr, status, error) {