Filling edit form

This commit is contained in:
Juan Pablo Vial
2025-11-12 19:49:08 -03:00
parent e278695137
commit 54969eeeab
6 changed files with 116 additions and 89 deletions

View File

@ -77,6 +77,19 @@
this.hide.credit()
}
}
fill(formaPago) {
if ('pie' in formaPago && formaPago.pie !== null) {
this.components.pie.$checkbox.prop('checked', true)
//this.show.pie()
this.components.pie.value.value = formaPago.pie.valor
this.components.pie.installments.value = formaPago.pie.cuotas
}
if ('credito' in formaPago && formaPago.credito !== null) {
this.components.credit.$checkbox.prop('checked', true)
//this.show.credit()
this.components.credit.value.value = formaPago.credito.value
}
}
setup() {
this.components.pie.$checkbox = $(`#${this.ids.pie.checkbox}`)
this.components.pie.value = document.getElementById(this.ids.pie.value)