From 5cb194f74482b19d747083827bceab7bd0ef3a0c Mon Sep 17 00:00:00 2001 From: MarianoCampetella Date: Wed, 1 Jul 2026 09:46:29 -0300 Subject: [PATCH 1/2] Error en la visualizacion de los posgrados --- src/app/app.component.html | 11 +++++++---- src/app/app.component.ts | 5 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 052547bb32..853b62a922 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -56,14 +56,17 @@ NO POSEE MATRICULA - - {{ vencimientoAlta(item.fechasDeAltas[item.fechasDeAltas?.length-1]?.fecha) | date: + + {{ vencimientoAlta(item.matriculacion[item.matriculacion?.length-1]?.fechaAlta) | date: 'dd/MM/yyyy' }} - {{ - item.matriculacion[item.matriculacion.length-1].fin | date: + {{ + item.matriculacion[item.matriculacion.length-1].periodos[item.matriculacion[item.matriculacion.length-1].periodos.length-1].fin + | date: 'dd/MM/yyyy'}} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d14a056189..8d72546325 100755 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -265,10 +265,11 @@ export class AppComponent { } esVigente(formacionPosgrado) { - const fechaUltimaAlta = new Date(formacionPosgrado.fechasDeAltas[formacionPosgrado.fechasDeAltas.length - 1].fecha); + const ultimaMatricula = formacionPosgrado.matriculacion[formacionPosgrado.matriculacion.length - 1]; + const fechaUltimaAlta = new Date(ultimaMatricula.fechaAlta); fechaUltimaAlta.setFullYear(fechaUltimaAlta.getFullYear() + 5); if (fechaUltimaAlta < this.hoy) { - if (new Date(formacionPosgrado.matriculacion[formacionPosgrado.matriculacion.length - 1].fin) < this.hoy) { + if (new Date(ultimaMatricula.periodos[ultimaMatricula.periodos.length - 1].fin) < this.hoy) { return false; } } From ddd7fecbc3a11b657bf49bd03b63f8d3ca1f6f26 Mon Sep 17 00:00:00 2001 From: MarianoCampetella Date: Tue, 22 Sep 2026 11:54:11 -0300 Subject: [PATCH 2/2] correcciones 22/09 --- src/app/app.component.html | 15 +++++++++++++-- src/app/app.component.ts | 28 ++++++++++++++++++---------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 853b62a922..7403ec9ac5 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -70,8 +70,19 @@ 'dd/MM/yyyy'}} - VIGENTE - VENCIDA + VIGENTE + + + VENCIDA + + + + SUSPENDIDA + + + + SIN VENCIMIENTO + diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8d72546325..dec99fb0e8 100755 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -122,8 +122,8 @@ export class AppComponent { if (this.auth.profesional) { this.profesionalService.getByID(this.auth.profesional).pipe( switchMap((profesional: IProfesional) => { - if (profesional) { - this.profesional = profesional; + this.profesional = profesional; + if (this.profesional) { this.profesional.formacionGrado?.forEach(item => { item['estado'] = this.verificarEstado(item); }); @@ -264,15 +264,23 @@ export class AppComponent { return nuevaFecha; } - esVigente(formacionPosgrado) { - const ultimaMatricula = formacionPosgrado.matriculacion[formacionPosgrado.matriculacion.length - 1]; - const fechaUltimaAlta = new Date(ultimaMatricula.fechaAlta); - fechaUltimaAlta.setFullYear(fechaUltimaAlta.getFullYear() + 5); - if (fechaUltimaAlta < this.hoy) { - if (new Date(ultimaMatricula.periodos[ultimaMatricula.periodos.length - 1].fin) < this.hoy) { - return false; + verificarFecha(formacionPosgrado) { + if (formacionPosgrado?.matriculacion?.length) { + if (!formacionPosgrado.matriculado) { + return 'suspendida'; + } else { + if (!formacionPosgrado.tieneVencimiento) { + return 'sinVencimiento'; + } else { + const ultMat = formacionPosgrado.matriculacion.length - 1; + const ultPer = formacionPosgrado.matriculacion[ultMat].periodos.length - 1; + if (this.hoy > formacionPosgrado.matriculacion[ultMat].periodos[ultPer].fin) { + return 'vencida'; + } else { + return 'vigente'; + } + } } } - return true; } }