Skip to content

Commit

Permalink
feat(INT): cambios en el filtro de sector
Browse files Browse the repository at this point in the history
  • Loading branch information
palita1991 committed Sep 6, 2022
1 parent 2184c9d commit fedb6e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/apps/rup/mapa-camas/services/mapa-camas.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export class MapaCamasService {
}

if (sector) {
camasFiltradas = camasFiltradas.filter((snap: ISnapshot) => snap.sectores.some(sect => sect.nombre === sector.nombre));
camasFiltradas = camasFiltradas.filter((snap: ISnapshot) => snap.sectorName === sector.nombre);
}

if (tipoCama) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ export class FiltrosCamasComponent implements OnInit {
);

this.sectorList$ = this.mapaCamasService.snapshotFiltrado$.pipe(
map((camas) => arrayToSet(camas, 'nombre', (item) => item.sectores))
map((camas) => camas.map((elem: any) => ({ _id: elem._id, nombre: elem.sectorName })))
);

this.tipoCamaList$ = this.mapaCamasService.snapshotFiltrado$.pipe(
map((camas) => arrayToSet(camas.filter(snap => !snap.sala), 'conceptId', (item) => item.tipoCama))
);
Expand Down

0 comments on commit fedb6e6

Please sign in to comment.