From 1c0081b570f580c37bfaa6434893a8ef1daebc11 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Fri, 4 Aug 2023 00:31:55 +0100 Subject: [PATCH] Add - but not implement - calculateLength() Signed-off-by: Fred Boniface --- src/utils/translators/ldb/staffStation.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/translators/ldb/staffStation.ts b/src/utils/translators/ldb/staffStation.ts index 39db26d..3e3b5df 100644 --- a/src/utils/translators/ldb/staffStation.ts +++ b/src/utils/translators/ldb/staffStation.ts @@ -68,6 +68,7 @@ function transformTrainServices(input: any): TrainServices[] { serviceIsSupressed: service?.serviceIsSupressed, origin: transformLocation(service?.origin), destination: transformLocation(service?.destination), + length: calculateLength(service), isCancelled: service?.isCancelled, cancelReason: service?.cancelReason, delayReason: service?.delayReason, @@ -103,6 +104,11 @@ function transformLocation(input: any): ServiceLocation[] { return output } +function calculateLength(input: TrainServices): number | undefined { + console.log(input); + return undefined +} + function transformUnspecifiedDateTime(input: string): Date | undefined { console.debug(`staffStation.transformUnspecifiedDateTime running`) if (!input) {