Fix for open project error

This commit is contained in:
Piotr Pekala 2019-11-14 04:34:28 -08:00
parent 1ff8f00397
commit fa59471dd8
2 changed files with 8 additions and 3 deletions

View File

@ -165,7 +165,6 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
.pipe( .pipe(
mergeMap((server: Server) => { mergeMap((server: Server) => {
this.server = server; this.server = server;
this.setUpWS();
return this.projectService.get(server, paramMap.get('project_id')).pipe( return this.projectService.get(server, paramMap.get('project_id')).pipe(
map(project => { map(project => {
return project; return project;

View File

@ -19,6 +19,7 @@ import { AddBlankProjectDialogComponent } from './add-blank-project-dialog/add-b
import { ChooseNameDialogComponent } from './choose-name-dialog/choose-name-dialog.component'; import { ChooseNameDialogComponent } from './choose-name-dialog/choose-name-dialog.component';
import { NavigationDialogComponent } from './navigation-dialog/navigation-dialog.component'; import { NavigationDialogComponent } from './navigation-dialog/navigation-dialog.component';
import { ConfirmationBottomSheetComponent } from './confirmation-bottomsheet/confirmation-bottomsheet.component'; import { ConfirmationBottomSheetComponent } from './confirmation-bottomsheet/confirmation-bottomsheet.component';
import { ToasterService } from '../../services/toaster.service';
@Component({ @Component({
selector: 'app-projects', selector: 'app-projects',
@ -44,7 +45,8 @@ export class ProjectsComponent implements OnInit {
private progressService: ProgressService, private progressService: ProgressService,
public dialog: MatDialog, public dialog: MatDialog,
private router: Router, private router: Router,
private bottomSheet: MatBottomSheet private bottomSheet: MatBottomSheet,
private toasterService: ToasterService
) {} ) {}
ngOnInit() { ngOnInit() {
@ -100,7 +102,11 @@ export class ProjectsComponent implements OnInit {
() => { () => {
this.refresh(); this.refresh();
}, },
() => {}, () => {
this.refresh();
this.progressService.deactivate();
this.toasterService.error('Project was deleted.');
},
() => { () => {
this.progressService.deactivate(); this.progressService.deactivate();
} }