summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts
blob: 2b5cded5319dbd6a31762fee4fbf34ddf0ff485d (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
import { Component, OnInit, Input } from '@angular/core';
import { slideUpDown } from '../../animates';
import { HomesService } from '../../homes.service';

@Component({
  selector: 'app-performance-details',
  templateUrl: './performance-details.component.html',
  styleUrls: ['./performance-details.component.less'],
  animations: [ slideUpDown ]
})
export class PerformanceDetailsComponent implements OnInit {

 
  constructor(private myhttp:HomesService) { }

  ngOnInit() {
    
  }

  ngOnChanges(changes){
    console.log(this.detailId)
    this.getPerformanceHeaderDetail(this.detailId);
  }
  datailheaderdata: any = {};
  dataillistdata: any = [];
  getPerformanceHeaderDetail(id){
    if(id){
      this.myhttp.getPerformanceHeaderDetail(id).subscribe((data)=>{
        console.log(data)
        this.datailheaderdata = data.performanceHeader;
        this.dataillistdata = data.list;
      })
    }
  }
  moredetailShow = false;
  @Input() detailId;
  state = 'up'
  slideUpDown(){
    this.moredetailShow = !this.moredetailShow;
    this.state = this.state === 'up' ? 'down' : 'up';
  }
}