mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
falta boton borrar albaranes!
This commit is contained in:
@ -1,14 +1,17 @@
|
||||
import DatePicker from "./datepicker.js";
|
||||
class AlbaranComponent {
|
||||
|
||||
constructor(item) {
|
||||
constructor(item, url_after_delete = '') {
|
||||
|
||||
this.url_after_delete = url_after_delete;
|
||||
|
||||
this.item = item;
|
||||
this.id = item.id;
|
||||
this.numero = item.numero_albaran;
|
||||
this.cliente = item.cliente;
|
||||
this.att = item.att;
|
||||
this.direccion = item.direccion;
|
||||
this.envio_id = item.envio_id;
|
||||
this.envio_id = item.envio_id != null ? item.envio_id : '';
|
||||
this.fecha = null;
|
||||
if(this.item.fecha_albaran != null){
|
||||
const [dia, mes, anio] = item.fecha_albaran.split('/');
|
||||
@ -461,6 +464,9 @@ class AlbaranComponent {
|
||||
if (response.success) {
|
||||
// quitar del dom el albarán
|
||||
$(`#accordioAlbaran${albaranId}`).remove();
|
||||
if(this.url_after_delete != ''){
|
||||
window.location.href = this.url_after_delete;
|
||||
}
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error',
|
||||
|
||||
Reference in New Issue
Block a user