From c0178301ae9685ecdb2d81ed37fee16a89f8206f Mon Sep 17 00:00:00 2001 From: evenegas Date: Thu, 15 Jan 2026 12:23:27 -0600 Subject: [PATCH] =?UTF-8?q?busca=20las=20claves=20con=20a=C3=B1o=20actual?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/programa/programa.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/programa/programa.service.ts b/src/programa/programa.service.ts index e14e0f6..fade226 100644 --- a/src/programa/programa.service.ts +++ b/src/programa/programa.service.ts @@ -232,11 +232,13 @@ export class ProgramaService { if (usuario.tipoUsuario.idTipoUsuario !== 2) { throw new Error('No es un usuario de tipo responsable'); } + const year = new Date().getFullYear().toString(); - return this.programaRepo.find({ + return await this.programaRepo.find({ where: { usuario: { idUsuario }, activo: true, + clavePrograma: Like(`${year}%`) }, }); }