From 37949a66933e8e1552c9b8e54f702ec491afd415 Mon Sep 17 00:00:00 2001 From: Louis Greiner <57864277+louisgreiner@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:32:56 +0100 Subject: [PATCH] hack: disable trainrunSection warnings (#6) --- src/app/models/trainrunsection.model.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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; }