diff --git a/src/app/models/trainrunsection.model.ts b/src/app/models/trainrunsection.model.ts index bdf8d62c..a8ee16f9 100644 --- a/src/app/models/trainrunsection.model.ts +++ b/src/app/models/trainrunsection.model.ts @@ -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; @@ -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; }