From 9bcddcf1ea403c82b2ec4b4525b3a4224cc17ea3 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Wed, 13 May 2026 22:05:20 -0500 Subject: [PATCH] up --- pkg/models/notificacion_log.go | 8 +++++--- pkg/services/renovacion_service.go | 1 + resources/views/renovaciones/contratos.html | 9 ++++++++- rest/controllers/contrato_controller.go | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/pkg/models/notificacion_log.go b/pkg/models/notificacion_log.go index b4ebc90..be1853f 100644 --- a/pkg/models/notificacion_log.go +++ b/pkg/models/notificacion_log.go @@ -21,6 +21,7 @@ type NotificacionLog struct { Asunto string `json:"asunto" gorm:"column:asunto"` PreviewHTML string `json:"preview_html" gorm:"column:preview_html;type:text"` Pasarela string `json:"pasarela" gorm:"column:pasarela;type:varchar(20)"` // bold | dlocal | (vacío para correos de aviso) + EnlacePago string `json:"enlace_pago" gorm:"column:enlace_pago;type:text"` // URL del link de pago generado en este envío } func (NotificacionLog) TableName() string { return "notificaciones_log" } @@ -74,9 +75,10 @@ func CreateNotificacionLog(n NotificacionLog) (*NotificacionLog, error) { func UpdateNotificacionLog(n NotificacionLog) error { return app.Http.Database.DB.Model(&n).Updates(map[string]interface{}{ - "estado": n.Estado, - "error_msg": n.ErrorMsg, - "pasarela": n.Pasarela, + "estado": n.Estado, + "error_msg": n.ErrorMsg, + "pasarela": n.Pasarela, + "enlace_pago": n.EnlacePago, }).Error } diff --git a/pkg/services/renovacion_service.go b/pkg/services/renovacion_service.go index 2f0a78e..dd79a1f 100644 --- a/pkg/services/renovacion_service.go +++ b/pkg/services/renovacion_service.go @@ -232,6 +232,7 @@ func EnviarNotificacionGrupo(regla *models.NotificacionRegla, cliente *models.Cl Asunto: p.Asunto, PreviewHTML: html, Pasarela: pasarela, + EnlacePago: enlacePago, } savedLog, err := models.CreateNotificacionLog(logEntry) if err != nil { diff --git a/resources/views/renovaciones/contratos.html b/resources/views/renovaciones/contratos.html index 4700653..f421702 100644 --- a/resources/views/renovaciones/contratos.html +++ b/resources/views/renovaciones/contratos.html @@ -229,7 +229,14 @@