summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report-run/run/run.component.ts
blob: 906bc44ccdc164ca90fe2edf5d6a1282a8c02c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { Component, OnInit, Input } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'app-run',
  templateUrl: './run.component.html',
  styleUrls: ['./run.component.css']
})
export class RunComponent implements OnInit {

  toggle : boolean;
  IncomingReportId : string;
  stepNo : string;

  @Input("reportId") reportId1 : string;
  @Input("reportType") reportType : string;



  constructor(private _http : HttpClient, private _route : ActivatedRoute, private router : Router) {
    this.toggle = false;
   }

  ngOnInit() {

    if(this.reportType === "Dashboard")
    {
      this.stepNo= "4";
    }
    else
    {
      this.stepNo= "8";
    }

  }

  runReport()
  {
    this.toggle = true;

    this._route.params.subscribe(params => {

      this.IncomingReportId = params["reportId"];
      this.reportId1 = params["reportId"];
    });

    this.router.navigate(['v2/run', this.reportId1]);

  }

}