update loader to add system ID to ordered stop and ETA

This commit is contained in:
2025-04-07 12:11:36 -07:00
parent 4b610c3ba9
commit 973867bd6d

View File

@@ -215,6 +215,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
shuttleId: `${shuttleId}`, shuttleId: `${shuttleId}`,
stopId: stopId, stopId: stopId,
millisecondsSinceEpoch: Date.now(), millisecondsSinceEpoch: Date.now(),
systemId: this.systemId,
}; };
this.repository.addOrUpdateEta(eta); this.repository.addOrUpdateEta(eta);
@@ -272,6 +273,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
routeId, routeId,
stopId, stopId,
position: index + 1, position: index + 1,
systemId: this.systemId,
}; };
} }
@@ -280,6 +282,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
routeId, routeId,
stopId: jsonOrderedStopData[index - 1][1], stopId: jsonOrderedStopData[index - 1][1],
position: index, position: index,
systemId: this.systemId,
}; };
} }
if (index < jsonOrderedStopData.length - 1) { if (index < jsonOrderedStopData.length - 1) {
@@ -287,6 +290,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
routeId, routeId,
stopId: jsonOrderedStopData[index + 1][1], stopId: jsonOrderedStopData[index + 1][1],
position: index + 2, position: index + 2,
systemId: this.systemId,
}; };
} }