message: fix(snapshot): add confirmation dialog for delete action
  PR Close
diff: import { Component, Input } from '@angular/core';
  -import { MatDialog } from '@angular/material';
  import { State } from '../../../../reducers';
  import { Snapshot } from '../../../../shared/models';
  import { Store } from '@ngrx/store';
  import { SnapshotActionService } from './snapshot-action.service';
  import * as snapshotActions from '../../../../reducers/snapshots/redux/snapshot.actions';
  +import { DialogService } from '../../../../dialog/dialog-service/dialog.service';
  @Component({
  selector: 'cs-snapshot-action-container',
  @@ -23,8 +23,8 @@ export class SnapshotActionContainerComponent {
  @Input() public snapshot: Snapshot;
  constructor(
  + private dialogService: DialogService,
  private store: Store<State>,
  - private dialog: MatDialog,
  private snapshotActionService: SnapshotActionService
  ) {
  }
  @@ -38,8 +38,13 @@ export class SnapshotActionContainerComponent {
  }
  public onSnapshotDelete(snapshot: Snapshot): void {
  + this.dialogService.confirm({message: 'DIALOG_MESSAGES.SNAPSHOT.CONFIRM_DELETION'})
  + .subscribe(res => {
  + if (res) {
  this.store.dispatch(new snapshotActions.DeleteSnapshot(snapshot));
  }
  + });
  + }
  public onSnapshotRevert(snapshot: Snapshot): void {
  this.store.dispatch(new snapshotActions.RevertVolumeToSnapshot(snapshot));
  