3d339b7073fc28803e85da8bec62da5e9c7a1000
[portal/sdk.git] /
1 import { Component, OnInit, Input } from '@angular/core';
2 import { ActivatedRoute, Router } from '@angular/router';
3 import { HttpClient } from '@angular/common/http';
4
5 @Component({
6   selector: 'app-run',
7   templateUrl: './run.component.html',
8   styleUrls: ['./run.component.css']
9 })
10 export class RunComponent implements OnInit {
11
12   toggle : boolean;
13   IncomingReportId : string;
14   stepNo : string;
15
16   @Input("reportId") reportId1 : string;
17   @Input("reportType") reportType : string;
18
19
20
21   constructor(private _http : HttpClient, private _route : ActivatedRoute, private router : Router) {
22     this.toggle = false;
23    }
24
25   ngOnInit() {
26
27     if(this.reportType === "Dashboard")
28     {
29       this.stepNo= "4";
30     }
31     else
32     {
33       this.stepNo= "8";
34     }
35
36   }
37
38   runReport()
39   {
40     this.toggle = true;
41
42     this._route.params.subscribe(params => {
43
44       this.IncomingReportId = params["reportId"];
45       this.reportId1 = params["reportId"];
46     });
47
48     this.router.navigate(['v2/app/run', this.reportId1]);
49
50   }
51
52 }