Facebook
From Subtle Dormouse, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 167
  1.     const confirmDialog = this.dialog.open(ConfirmModalComponent, {
  2.       width: '350px', data: {title: `Czy na pewno chcesz anulować zamówienie numer: ${order.id}?`}
  3.     });
  4.     confirmDialog.afterClosed().subscribe(result => {
  5.       if (result) {
  6.         this.orderService.cancelOrder(order.id)
  7.           .pipe(finalize(() => this.orderService.getAllOrders()))
  8.           .subscribe(
  9.             () => {
  10.               this.informationService.openSnackBar(`Anulowano zamówienie number: ${order.id}`);
  11.             },
  12.             err => {
  13.               this.informationService.displayArrayErrors(err);
  14.             }
  15.           );
  16.       }
  17.     });