Skip to content

Commit e5547d9

Browse files
committed
hack: remove category shortName from trainrun name displays
Signed-off-by: Louis Greiner <[email protected]>
1 parent 99edda0 commit e5547d9

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ export class PerlenketteNodeComponent implements OnInit {
169169
}
170170

171171
getTextNameOrTime(connection: PerlenketteConnection, connectionGrpKey: number, pos: number) {
172-
return pos === 0
173-
? connection.categoryShortName + "" + connection.title
174-
: "" + connection.remainingTime;
172+
return pos === 0 ? "" + connection.title : "" + connection.remainingTime;
175173
}
176174

177175
transformIndex(index: number, connectionGrpKey: number): number {
@@ -311,7 +309,7 @@ export class PerlenketteNodeComponent implements OnInit {
311309
this.perlenketteTrainrun.pathItems.forEach((item: PerlenketteItem) => {
312310
if (item.isPerlenketteNode()) {
313311
item.getPerlenketteNode().connections.forEach((connection: PerlenketteConnection) => {
314-
const name = connection.categoryShortName + "" + connection.title;
312+
const name = "" + connection.title;
315313
maxTrainrunNameLen = Math.max(
316314
3 + connection.terminalStationBackward.length,
317315
Math.max(

src/app/perlenkette/perlenkette.component.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
>
4141
<ng-container *ngIf="showTrainrunName()">
4242
<p class="alignleft trainname" (click)="trainrunNameClicked($event)">
43-
<span class="trainname"
44-
>{{ perlenketteTrainrun.categoryShortName }}{{ perlenketteTrainrun.title }}</span
45-
>
43+
<span class="trainname">{{ perlenketteTrainrun.title }}</span>
4644
</p>
4745

4846
<span class="trainrun-od alignright" (click)="trainrunNameClicked($event)">

src/app/streckengrafik/components/train-run-section/train-run-section.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ export class TrainRunSectionComponent implements OnDestroy, UpdateCounterHandler
654654
}
655655

656656
getText(): string {
657-
return this.trainrun.categoryShortName + this.trainrun.title;
657+
return this.trainrun.title;
658658
}
659659

660660
textWidth(): number {

src/app/view/dialogs/trainrun-and-section-dialog/trainrun-and-section-dialog.component.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
></sbb-icon>
1616
<div data-testid="train-run-tab-group" class="TrainrunTabGrupe">
1717
<sbb-tab-group [selectedIndex]="data.type">
18-
<sbb-tab
19-
label="{{ selectedTrainrun.getCategoryShortName() }}{{ selectedTrainrun.getTitle() }}"
20-
id="trainrun-tab"
21-
>
18+
<sbb-tab label="{{ selectedTrainrun.getTitle() }}" id="trainrun-tab">
2219
<sbb-trainrun-tab
2320
[trainrunDialogParameter]="trainrunDialogParameter"
2421
(trainrunDeleted)="closeDialog()"

src/app/view/editor-main-view/data-views/trainrunsections.view.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,7 @@ export class TrainrunSectionsView {
470470
}
471471

472472
static extractTrainrunName(trainrunSection: TrainrunSection): string {
473-
return (
474-
trainrunSection.getTrainrun().getCategoryShortName() +
475-
trainrunSection.getTrainrun().getTitle()
476-
);
473+
return trainrunSection.getTrainrun().getTitle();
477474
}
478475

479476
static extractTravelTime(trainrunSection: TrainrunSection, editorView: EditorView): string {

0 commit comments

Comments
 (0)