Skip to content

Commit 8e09983

Browse files
committed
one-way: fix perlenkette one-way direction display
Signed-off-by: Louis Greiner <[email protected]>
1 parent c84066c commit 8e09983

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/app/perlenkette/perlenkette-section/perlenkette-section.component.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,24 +207,20 @@ export class PerlenketteSectionComponent implements OnInit, AfterContentInit, On
207207
if (this.trainrunSection === null) {
208208
return false;
209209
}
210-
const isTargetRightOrBottom = TrainrunsectionHelper.isTargetRightOrBottom(
211-
this.trainrunSectionService.getAllTrainrunSectionsForTrainrun(
212-
this.trainrunSection.getTrainrunId(),
213-
)[0],
210+
return (
211+
this.trainrunSection.getTrainrun().isRoundTrip() ||
212+
!this.trainrunService.isTrainrunTargetRightOrBottom()
214213
);
215-
return this.trainrunSection.getTrainrun().isRoundTrip() || !isTargetRightOrBottom;
216214
}
217215

218216
isRightSideDisplayed(): boolean {
219217
if (this.trainrunSection === null) {
220218
return false;
221219
}
222-
const isTargetRightOrBottom = TrainrunsectionHelper.isTargetRightOrBottom(
223-
this.trainrunSectionService.getAllTrainrunSectionsForTrainrun(
224-
this.trainrunSection.getTrainrunId(),
225-
)[0],
220+
return (
221+
this.trainrunSection.getTrainrun().isRoundTrip() ||
222+
this.trainrunService.isTrainrunTargetRightOrBottom()
226223
);
227-
return this.trainrunSection.getTrainrun().isRoundTrip() || isTargetRightOrBottom;
228224
}
229225

230226
getVariantIsWritable(): boolean {

0 commit comments

Comments
 (0)