b08ea3e4fea35e75681d3c2a0cae4494d703d3f6
[ccsdk/cds.git] /
1 import {Component, OnInit} from '@angular/core';
2 import {ActivatedRoute} from '@angular/router';
3 import {PackageStore} from './package.store';
4 import {BluePrintDetailModel} from '../model/BluePrint.detail.model';
5 import {CBAPackage} from '../package-creation/mapping-models/CBAPacakge.model';
6
7
8 @Component({
9     selector: 'app-configuration-dashboard',
10     templateUrl: './configuration-dashboard.component.html',
11     styleUrls: ['./configuration-dashboard.component.css']
12 })
13 export class ConfigurationDashboardComponent implements OnInit {
14     viewedPackage: BluePrintDetailModel = new BluePrintDetailModel();
15
16     constructor(private route: ActivatedRoute, private configurationStore: PackageStore) {
17
18         const id = this.route.snapshot.paramMap.get('id');
19         this.configurationStore.getPagedPackages(id);
20         this.configurationStore.state$.subscribe(
21             el => {
22                 const cbaPackage = new CBAPackage();
23
24                 if (el && el.configuration) {
25                     this.viewedPackage = el.configuration;
26                 }
27             }
28         );
29
30
31     }
32
33     ngOnInit() {
34
35     }
36
37 }