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}%`) }, }); }