mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
update with ot files
This commit is contained in:
@ -81,7 +81,7 @@ class FileUploadDropzone {
|
||||
|
||||
if (files[i].upload) {
|
||||
var file = files[i];
|
||||
formData.append('file[' + counter + ']', file);
|
||||
formData.append('file[]', file);
|
||||
counter += 1;
|
||||
}
|
||||
else {
|
||||
|
||||
@ -3,6 +3,7 @@ import ClassSelect from "../../components/select2.js";
|
||||
import DatePicker from "../../components/datepicker.js";
|
||||
import { alertConfirmationDelete, alertSuccess } from "../../components/alerts/sweetAlert.js";
|
||||
import Modal from "../../components/modal.js"
|
||||
import FileUploadDropzone from '../../components/forms/fileUploadDropzone.js';
|
||||
|
||||
class OrdenTrabajo {
|
||||
constructor(domItem) {
|
||||
@ -29,9 +30,23 @@ class OrdenTrabajo {
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* DROP ZONE FILES OT
|
||||
*/
|
||||
this.configUploadDropzone = {
|
||||
domElement: '#dropzone-ot-files',
|
||||
nameId: "orden_trabajo_id",
|
||||
getUri: '/produccion/ordentrabajo/get_files',
|
||||
postUri: '/produccion/ordentrabajo/upload_files'
|
||||
}
|
||||
if ($(this.configUploadDropzone.domElement).length > 0) {
|
||||
this.fileUploadDropzone = new FileUploadDropzone(this.configUploadDropzone)
|
||||
}
|
||||
}
|
||||
initDropFiles(){
|
||||
if ($(this.configUploadDropzone.domElement).length > 0) {
|
||||
this.fileUploadDropzone.init()
|
||||
}
|
||||
}
|
||||
configDatePickers() {
|
||||
const option = {
|
||||
@ -90,6 +105,7 @@ class OrdenTrabajo {
|
||||
this.otForm.off("click", ".decrease-order")
|
||||
}
|
||||
init() {
|
||||
this.initDropFiles()
|
||||
this.configDatePickers()
|
||||
this.initDatatableTareas()
|
||||
this.tareasTableItem.on("draw.dt", this.createSelectMaquinaTarea.bind(this))
|
||||
|
||||
Reference in New Issue
Block a user