fix dropzone when presupuesto is borrador

This commit is contained in:
amazuecos
2025-01-28 20:27:15 +01:00
parent 22f78363cb
commit bf49d601cf
6 changed files with 59 additions and 36 deletions

View File

@ -61,7 +61,9 @@ class PresupuestoAdminEdit {
getUri: '/presupuestos/presupuestocliente/get_files',
postUri: '/presupuestos/presupuestocliente/upload_files'
}
this.fileUploadDropzone = new FileUploadDropzone(this.configUploadDropzone)
if ($(this.configUploadDropzone.domElement).length > 0) {
this.fileUploadDropzone = new FileUploadDropzone(this.configUploadDropzone)
}
}
init() {
@ -128,7 +130,9 @@ class PresupuestoAdminEdit {
$('#lomo_cubierta').on('change', this.datosLibro.changeAnchoSolapasCubierta);
$('#lomo_sobrecubierta').on('change', this.datosLibro.changeAnchoSolapasSobrecubierta);
this.fileUploadDropzone.init()
if ($(this.configUploadDropzone.domElement).length > 0) {
this.fileUploadDropzone.init()
}
}