Skip to content

Commit 7b4a8c5

Browse files
committed
hack: disable trainrunSection warnings (#6)
1 parent fb16666 commit 7b4a8c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/models/trainrunsection.model.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
} from "../data-structures/technical.data.structures";
1616
import {TrainrunsectionValidator} from "../services/util/trainrunsection.validator";
1717
import {formatDate} from "@angular/common";
18+
import {environment} from "src/environments/environment";
1819

1920
export class TrainrunSection {
2021
private static currentId = 0;
@@ -452,22 +453,27 @@ export class TrainrunSection {
452453
}
453454

454455
hasTravelTimeWarning(): boolean {
456+
if (environment.disableBackend) return false;
455457
return this.travelTime.warning !== null;
456458
}
457459

458460
hasSourceDepartureWarning(): boolean {
461+
if (environment.disableBackend) return false;
459462
return this.sourceDeparture.warning !== null;
460463
}
461464

462465
hasSourceArrivalWarning(): boolean {
466+
if (environment.disableBackend) return false;
463467
return this.sourceArrival.warning !== null;
464468
}
465469

466470
hasTargetDepartureWarning(): boolean {
471+
if (environment.disableBackend) return false;
467472
return this.targetDeparture.warning !== null;
468473
}
469474

470475
hasTargetArrivalWarning(): boolean {
476+
if (environment.disableBackend) return false;
471477
return this.targetArrival.warning !== null;
472478
}
473479

0 commit comments

Comments
 (0)