import MaquinaTareaDatatable from '../../../components/datatables/MaquinaTareaDatatable.js'
import MaquinaTareaForm from '../../../components/forms/maquinaTareaForm.js'
import Modal from '../../../components/modal.js'

const maquinaTareaDatatable = new MaquinaTareaDatatable($("#maquina-tarea-datatable"))
maquinaTareaDatatable.init()
const maquinaTareaForm = new MaquinaTareaForm($("#maquina-tarea-form"))
maquinaTareaForm.initNew()
const modal = new Modal($("#modalNewMaquinaTarea"))

$("#btn-maquina-tarea-new").on('click',() => {
    modal.show()
    modal.item.on("hidden.bs.modal",() => {
        maquinaTareaDatatable.datatable.ajax.reload()
    })
})

