fix:(extrato-profissional) ajusta nome do evento

This commit is contained in:
NANDO9322 2026-02-12 11:06:41 -03:00
parent 21a5b81132
commit 8703f9c8a8

View file

@ -961,14 +961,19 @@ func (s *Service) GetProfessionalFinancialStatement(ctx context.Context, userID
}
nomeEvento := ""
prefix := "Evento"
if t.TipoEvento.Valid && t.TipoEvento.String != "" {
prefix = t.TipoEvento.String
}
if t.FotNumero.Valid {
if t.CursoNome.Valid {
nomeEvento = fmt.Sprintf("Formatura %s (FOT %s)", t.CursoNome.String, t.FotNumero.String)
nomeEvento = fmt.Sprintf("%s - %s (FOT %s)", prefix, t.CursoNome.String, t.FotNumero.String)
} else {
nomeEvento = fmt.Sprintf("Formatura FOT %s", t.FotNumero.String)
nomeEvento = fmt.Sprintf("%s - FOT %s", prefix, t.FotNumero.String)
}
} else {
nomeEvento = t.TipoEvento.String
nomeEvento = prefix
}
dto := FinancialTransactionDTO{