File tree 3 files changed +12
-0
lines changed
view/dialogs/trainrun-and-section-dialog
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {NodeService} from "./services/data/node.service";
14
14
import { I18nService } from "./core/i18n/i18n.service" ;
15
15
import { PositionTransformationService } from "./services/util/position.transformation.service" ;
16
16
import { NetzgrafikDefault } from "./sample-netzgrafik/netzgrafik.default" ;
17
+ import { UiInteractionService } from "./services/ui/ui.interaction.service" ;
17
18
18
19
@Component ( {
19
20
selector : "sbb-root" ,
@@ -46,6 +47,7 @@ export class AppComponent implements OnInit {
46
47
47
48
constructor ( private authService : AuthService ,
48
49
private dataService : DataService ,
50
+ private uiInteractionService : UiInteractionService ,
49
51
private trainrunService : TrainrunService ,
50
52
private trainrunSectionService : TrainrunSectionService ,
51
53
private nodeService : NodeService ,
@@ -90,6 +92,7 @@ export class AppComponent implements OnInit {
90
92
set netzgrafikDto ( netzgrafikDto : NetzgrafikDto ) {
91
93
this . netzgrafikDtoIsSet = true ;
92
94
this . dataService . loadNetzgrafikDto ( netzgrafikDto ) ;
95
+ this . uiInteractionService . closeTrainrunDialog ( ) ;
93
96
}
94
97
95
98
@Output ( )
Original file line number Diff line number Diff line change @@ -394,6 +394,10 @@ export class UiInteractionService implements OnDestroy {
394
394
this . showPerlenketteSubject . next ( false ) ;
395
395
}
396
396
397
+ closeTrainrunDialog ( ) {
398
+ this . showTrainrunDialogSubject . next ( null ) ;
399
+ }
400
+
397
401
print ( ) {
398
402
this . printGraphikSubject . next ( null ) ;
399
403
}
Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ export class TrainrunAndSectionDialogComponent implements OnDestroy {
90
90
this . uiInteractionService . trainrunDialog
91
91
. pipe ( takeUntil ( this . destroyed ) )
92
92
. subscribe ( ( parameter ) => {
93
+ if ( ! parameter ) {
94
+ this . closeDialog ( ) ;
95
+ return ;
96
+ }
97
+
93
98
this . data = parameter ;
94
99
const selectedTrainrunSection =
95
100
this . trainrunSectionService . getSelectedTrainrunSection ( ) ;
You can’t perform that action at this time.
0 commit comments