Skip to content

Commit

Permalink
feat(ep): muestra cantidad total de fichas filtradas
Browse files Browse the repository at this point in the history
  • Loading branch information
negro89 committed Feb 23, 2022
1 parent 6accbca commit c93f60e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class SeguimientoEpidemiologiaComponent implements OnInit {
public estadosSeguimiento = estados;
public anyChecked;
public asignados = false;
public totalResultados;

constructor(
private seguimientoPacientesService: SeguimientoPacientesService,
Expand Down Expand Up @@ -89,7 +90,8 @@ export class SeguimientoEpidemiologiaComponent implements OnInit {
}
return this.seguimientoPacientesService.search(this.query).pipe(
map(resultados => {
this.listado = lastResults ? lastResults.concat(resultados) : resultados;
this.listado = lastResults ? lastResults.concat(resultados.data) : resultados.data;
this.totalResultados = resultados.pagination.total;
this.clearChecked();
this.query.skip = this.listado.length;
this.inProgress = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
</plex-wrapper>
</plex-grid>
<div *ngIf='(seguimientos$ | async)?.length'>
<plex-list [striped]="false" height="calc(100vh - 233px)" (scrolled)="onScroll()">
<plex-title titulo="listado" size="md">
<plex-badge type="info" name="totalResultados">fichas totales: {{ totalResultados }}</plex-badge>
</plex-title>
<plex-list [striped]="false" height="calc(100vh - 275px)" (scrolled)="onScroll()">
<plex-item>
<plex-bool *ngIf="esAuditor" name="all" (change)="selectAll($event)" [(ngModel)]="allSelected">
</plex-bool>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ResourceBaseHttp, Server } from '@andes/shared';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';

@Injectable({ providedIn: 'root' })
export class SeguimientoPacientesService extends ResourceBaseHttp {
Expand All @@ -9,6 +10,10 @@ export class SeguimientoPacientesService extends ResourceBaseHttp {
super(server);
}

search(params = {}): Observable<any> {
return this.server.get(`${this.url}/search/v2`, { params });
}

asignarProfesional(data) {
return this.server.post(`${this.url}/asignaciones`, data);
}
Expand Down

0 comments on commit c93f60e

Please sign in to comment.