Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IN - Cambiar orden en Registros médicos #3029

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(IN-599): Cambiar orden en Registros médicos
  • Loading branch information
MarianoCampetella authored and negro89 committed Jul 18, 2024
commit 904086f333f632f082eb888fcb26000dbb985737
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export class RegistrosHudsDetalleComponent implements OnInit {
} else {
return fechaValida && noEsInternacion && tipoPrestacionValida && !this.prestacionesEliminadas.some(id => id === registro.id);
}
}).sort((pres1, pres2) => {
// Ordenamos las prestaciones junto con los CDAs de forma descendente.
const fechaPrestacion1 = moment(pres1.ejecucion?.fecha || pres1.fecha);
const fechaPrestacion2 = moment(pres2.ejecucion?.fecha || pres2.fecha);
return fechaPrestacion2.diff(fechaPrestacion1);
});
}),
cache()
Expand Down
Loading