send direct message to client users from presupuesto,facturas or pedido forms

This commit is contained in:
amazuecos
2024-12-15 17:57:22 +01:00
parent 7998e2424e
commit 4cacf28d49
12 changed files with 288 additions and 12 deletions

View File

@ -7,6 +7,8 @@ class Alert {
this.icon = this.item.find(".icon-alert")
this.iconSuccess = "ti-circle-check"
this.iconError = "ti-exclamation-mark"
this.iconInfo = "ti-question-mark"
@ -14,6 +16,7 @@ class Alert {
setIcon(iconClass){
this.icon.removeClass(this.iconSuccess)
this.icon.removeClass(this.iconError)
this.icon.removeClass(this.iconInfo)
this.icon.addClass(iconClass)
}
setAsError() {
@ -24,16 +27,25 @@ class Alert {
}
setAsSuccess() {
this.item.removeClass("alert-danger")
this.item.removeClass("alert-warning")
this.item.removeClass("alert-info")
this.item.addClass("alert-success")
this.setIcon(this.iconSuccess)
}
setAsWarning() {
this.item.removeClass("alert-success")
this.item.removeClass("alert-danger")
this.item.removeClass("alert-info")
this.item.addClass("alert-warning")
this.setIcon(this.iconError)
}
setAsInfo() {
this.item.removeClass("alert-*")
this.item.removeClass("alert-success")
this.item.removeClass("alert-danger")
this.item.addClass("alert-warning")
this.item.addClass("alert-info")
this.setIcon(this.iconInfo)
}
show() {
this.item.removeClass("d-none")
@ -48,6 +60,16 @@ class Alert {
this.body.append(content)
}
setErrors() { }
reset(){
this.item.removeClass("alert-success")
this.item.removeClass("alert-danger")
this.item.removeClass("alert-warning")
this.item.removeClass("alert-info")
this.item.setContent("")
this.item.setHeadingTitle("")
this.item.hide()
}
}
export default Alert;