Merge pull request 'simulation' (#41) from simulation into main

Reviewed-on: http://185.100.212.76:7776/Dwinzo-Beta/Dwinzo_dev/pulls/41
This commit was merged in pull request #41.
This commit is contained in:
2025-04-03 14:28:12 +00:00
26 changed files with 3577 additions and 786 deletions

View File

@@ -343,14 +343,21 @@ export const useSelectedPath = create<any>((set: any) => ({
interface SimulationPathsStore {
simulationPaths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[];
setSimulationPaths: (
paths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[]
paths:
| (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[]
| ((prev: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[]
) => (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[])
) => void;
}
export const useSimulationPaths = create<SimulationPathsStore>((set) => ({
simulationPaths: [],
setSimulationPaths: (paths) => set({ simulationPaths: paths }),
}));
setSimulationPaths: (paths) =>
set((state) => ({
simulationPaths:
typeof paths === "function" ? paths(state.simulationPaths) : paths,
})),
}))
export const useIsConnecting = create<any>((set: any) => ({
isConnecting: false,