-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(top): mostrar cantidad solicitudes (#2080)
- Loading branch information
plammel
authored
Dec 18, 2020
1 parent
efe9f9c
commit 989b171
Showing
3 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Auth } from '@andes/auth'; | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
import { IPrestacion } from '../../../modules/rup/interfaces/prestacion.interface'; | ||
|
||
@Pipe({ | ||
name: 'auditoriasSolicitud' | ||
}) | ||
export class AuditoriasSolicitudPipe implements PipeTransform { | ||
constructor(private auth: Auth) { } | ||
transform(prestacion: IPrestacion): any { | ||
const accionesAuditorias = [ | ||
'rechazada', | ||
'pendiente', | ||
'referir', | ||
'devolver' | ||
]; | ||
return prestacion.solicitud.historial.filter(e => accionesAuditorias.includes(e.accion)).length; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters