mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Fix: niepoprawne wyświetlanie statusów dyżurnych
This commit is contained in:
+4
-2
@@ -166,9 +166,11 @@ export const store = createStore<State>({
|
||||
|
||||
const prevDispatcherStatus = this.state.lastDispatcherStatuses.find(dispatcher => dispatcher.hash === stationAPI.stationHash);
|
||||
const stationStatus = data.dispatchers?.find((status: string[]) => status[0] == stationAPI.stationHash && status[1] == this.state.region.id) || -1;
|
||||
|
||||
const statusTimestamp = prevDispatcherStatus && !data.dispatchers ? prevDispatcherStatus.statusTimestamp : getStatusTimestamp(stationStatus);
|
||||
const statusID = prevDispatcherStatus && !data.dispatchers ? prevDispatcherStatus.statusID : getStatusID(stationStatus);
|
||||
|
||||
const statusTimestamp = getStatusTimestamp(stationStatus == -1 && prevDispatcherStatus ? prevDispatcherStatus.statusTimestamp : stationStatus);
|
||||
const statusID = getStatusID(stationStatus == -1 && prevDispatcherStatus ? prevDispatcherStatus.statusID : stationStatus);
|
||||
console.log(stationName, prevDispatcherStatus);
|
||||
|
||||
prevDispatcherStatuses.push({
|
||||
hash: stationAPI.stationHash,
|
||||
|
||||
Reference in New Issue
Block a user