blob: d2e25ef6f371d9451d30a52d405b500265c8c41c (
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 } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { PackageCreationStore } from '../package-creation.store';
@Component({
selector: 'app-template-mapping',
templateUrl: './template-mapping.component.html',
styleUrls: ['./template-mapping.component.css']
})
export class TemplateMappingComponent implements OnInit {
creationView = false;
listView = true;
constructor(private route: ActivatedRoute, private pakcageStore: PackageCreationStore) {
}
ngOnInit() {
if (this.route.snapshot.paramMap.has('id')) {
console.log('Edit mode');
this.creationView = true;
this.listView = false;
} else {
console.log('Create mode');
this.pakcageStore.clear();
}
}
openCreationView() {
this.creationView = false;
this.listView = true;
}
openListView() {
this.listView = false;
this.creationView = false;
}
closeCreationView() {
this.creationView = true;
this.listView = false;
}
}
|