Skip to content

Instantly share code, notes, and snippets.

@whisher
Created November 27, 2019 19:32
Show Gist options
  • Save whisher/cc0677ad794fe6c25f6de1529feb3702 to your computer and use it in GitHub Desktop.
Save whisher/cc0677ad794fe6c25f6de1529feb3702 to your computer and use it in GitHub Desktop.
getPendingOrders(): Observable<MatrixPendingOrders[]> {
return this.accountFacade.account$.pipe(
switchMap(account => {
let id: any = '';
if (account) {
id = account.auth.id;
}
return this.service.getPendingOrders(id);
}),
map((data: PendingOrdersDto) => data.orders),
map((rows: PendingOrderDto[]) => {
return this.buildData(rows);
})
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment