1
- import { Component } from "@angular/core" ;
1
+ import { Component , Input , Output } from "@angular/core" ;
2
2
import { AuthService } from "./services/auth/auth.service" ;
3
+ import { TrainrunService } from "./services/data/trainrun.service" ;
4
+ import { TrainrunSectionService } from "./services/data/trainrunsection.service" ;
5
+ import { DataService } from "./services/data/data.service" ;
3
6
import { environment } from "../environments/environment" ;
4
7
import packageJson from "../../package.json" ;
5
8
import { Observable } from "rxjs" ;
6
9
import { ProjectDto } from "./api/generated" ;
10
+ import { NetzgrafikDto } from "./data-structures/business.data.structures" ;
7
11
8
12
@Component ( {
9
13
selector : "sbb-root" ,
@@ -33,7 +37,20 @@ export class AppComponent {
33
37
return this . authService . claims ?. email ;
34
38
}
35
39
36
- constructor ( private authService : AuthService ) {
40
+ constructor ( private authService : AuthService , private trainrunService : TrainrunService , private trainrunSectionService : TrainrunSectionService , private dataService : DataService ) {
41
+
42
+ /*trainrunService.trainruns.subscribe((value) => {
43
+ console.log('trainrunService', value);
44
+ });
45
+
46
+ trainrunSectionService.trainrunSections.subscribe((value) => {
47
+ console.log('trainrunSectionService', value);
48
+ });*/
49
+
50
+ /*trainrunSectionService.trainrunSectionCreated.subscribe((trainrunSection) => {
51
+ console.log('trainrunSectionCreated', trainrunSection);
52
+ });*/
53
+
37
54
if ( ! this . disableBackend ) {
38
55
this . authenticated = authService . initialized ;
39
56
}
@@ -44,4 +61,15 @@ export class AppComponent {
44
61
this . authService . logOut ( ) ;
45
62
}
46
63
}
64
+
65
+ @Input ( )
66
+ get dto ( ) {
67
+ return this . dataService . getNetzgrafikDto ( ) ;
68
+ }
69
+ set dto ( dto : NetzgrafikDto ) {
70
+ this . dataService . loadNetzgrafikDto ( dto ) ;
71
+ }
72
+
73
+ @Output ( )
74
+ trainrunSectionOperation = this . trainrunSectionService . trainrunSectionOperation ;
47
75
}
0 commit comments