Skip to content

Commit

Permalink
hack: disable trainrunSection warnings (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgreiner committed Jan 27, 2025
1 parent 5a19b10 commit ad77079
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/models/trainrunsection.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from "../data-structures/technical.data.structures";
import {TrainrunsectionValidator} from "../services/util/trainrunsection.validator";
import {formatDate} from "@angular/common";
import {environment} from "src/environments/environment";

export class TrainrunSection {
private static currentId = 0;
Expand Down Expand Up @@ -452,22 +453,27 @@ export class TrainrunSection {
}

hasTravelTimeWarning(): boolean {
if (environment.disableBackend) return false;
return this.travelTime.warning !== null;
}

hasSourceDepartureWarning(): boolean {
if (environment.disableBackend) return false;
return this.sourceDeparture.warning !== null;
}

hasSourceArrivalWarning(): boolean {
if (environment.disableBackend) return false;
return this.sourceArrival.warning !== null;
}

hasTargetDepartureWarning(): boolean {
if (environment.disableBackend) return false;
return this.targetDeparture.warning !== null;
}

hasTargetArrivalWarning(): boolean {
if (environment.disableBackend) return false;
return this.targetArrival.warning !== null;
}

Expand Down

0 comments on commit ad77079

Please sign in to comment.