Merge branch 'dev/presu_cliente_v2' of https://git.imnavajas.es/jjimenez/safekat into dev/presu_cliente_v2
This commit is contained in:
2024-10-19 13:04:05 +02:00
4 changed files with 33 additions and 6 deletions

View File

@ -9,6 +9,7 @@ class ErrorPresupuestoForm {
this.form = this.item.find("#error-presupuesto-form")
this.inputPresupuestoUserId = this.item.find("#presupuesto-user-id")
this.inputDatos = this.item.find("#datos-presupuesto")
this.inputError = this.item.find("#error-presupuesto-text")
this.inputComments = this.item.find("#comments-presupuesto")
this.errorPresupuestoId = this.item.find("#error-presupuesto-id").attr("value")
this.updateBtnIcon = this.item.find(".button-update-comment")
@ -33,8 +34,11 @@ class ErrorPresupuestoForm {
ajax.get()
}
handleGetErrorPresupuestoSuccess(data){
const dataJson = JSON.parse(data.data.datos_presupuesto)
const error = data.data.error
this.inputPresupuestoUserId.val(data.data.presupuestoUser)
this.inputDatos.val(data.data.datos)
this.inputDatos.val(JSON.stringify(dataJson,null,4))
this.inputError.val(error)
this.inputComments.val(data.data.comment)
this.updateBtnIcon.prop("disabled",false)
this.checkVisto.prop("checked",parseInt(data.data.visto) == 1 ? true : false)