trabajando en el importador

This commit is contained in:
2025-03-13 22:17:20 +01:00
parent 02596457d8
commit cd3df81bc9
9 changed files with 243 additions and 32 deletions

View File

@ -0,0 +1,31 @@
import ClassSelect from '../../components/select2.js';
class Importador{
constructor(){
this.cliente = new ClassSelect($("#clienteId"), '/importador/clientlist', "Seleccione un cliente");
this.presupuesto = new ClassSelect($("#presupuesto"), '/importador/presupuestoslist', "Seleccione un presupuesto", false, {clienteId: ()=>$("#clienteId").val()});
this.openBtn = $('#openOld');
}
init(){
this.cliente.init();
this.presupuesto.init();
this.openBtn.on('click', function(){
if($("#clienteId").val() != '' && $("#presupuesto").val() != ''){
window.open('https://gestion.safekat.es/presupuesto/edit/'+$("#presupuesto").val());
}
});
}
}
document.addEventListener('DOMContentLoaded', function () {
let importador = new Importador();
importador.init();
});
export default Importador;