Facebook
From Subtle Dormouse, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 53
  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.     });