approved(){ localStorage.setItem('encargado', this.approach.responsable.id) localStorage.setItem('cliente', this.approach.client.id) localStorage.setItem('approach', this.id) const dialog = this.dialog.open(ProjectFormComponent) dialog.afterClosed().subscribe( result =>{ this.rest.get("/project?approach=" + this.id) .subscribe((data:any)=>{ console.log(data) if(data.length>0){ this.rest.put("/approach/" + this.id,{ approachStatus: 'APROBADO' }).subscribe((result:any) =>{ this.router.navigate(["/proyecto/" + data[0].id]) },error=>{ console.log('error') }) }else{ console.log("/project?approach=" + this.id) } }) }) }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)