feat: Implement Zustand stores for machine, simulation, storage unit, vehicle, and visualization management
- Added `useMachineStore` for managing machine statuses, including actions for adding, removing, and updating machines.
- Introduced `useSimulationStore` to handle product and event management with actions for adding, removing, and updating products and events.
- Created `useStorageUnitStore` for managing storage unit statuses, including load tracking and state updates.
- Developed `useVehicleStore` for vehicle management, including load and state updates.
- Implemented `useChartStore` for managing measurement data and visualization settings.
- Added `useDroppedObjectsStore` for handling dropped objects in visualization zones, including object manipulation actions.
- Created `useZone3DWidgetStore` for managing 3D widget data in zones, including position and rotation updates.
- Introduced `useZoneStore` for managing selected zone states and widget configurations.
2025-04-22 08:58:29 +00:00
|
|
|
import React, { useEffect } from 'react';
|
|
|
|
import { useEventsStore } from '../../store/simulation/useEventsStore';
|
2025-04-22 09:14:09 +00:00
|
|
|
import { useProductStore } from '../../store/simulation/useProductStore';
|
2025-04-22 11:54:30 +00:00
|
|
|
import Vehicles from './vehicle/vehicles';
|
2025-04-15 13:04:43 +00:00
|
|
|
|
2025-03-25 12:04:20 +00:00
|
|
|
function Simulation() {
|
feat: Implement Zustand stores for machine, simulation, storage unit, vehicle, and visualization management
- Added `useMachineStore` for managing machine statuses, including actions for adding, removing, and updating machines.
- Introduced `useSimulationStore` to handle product and event management with actions for adding, removing, and updating products and events.
- Created `useStorageUnitStore` for managing storage unit statuses, including load tracking and state updates.
- Developed `useVehicleStore` for vehicle management, including load and state updates.
- Implemented `useChartStore` for managing measurement data and visualization settings.
- Added `useDroppedObjectsStore` for handling dropped objects in visualization zones, including object manipulation actions.
- Created `useZone3DWidgetStore` for managing 3D widget data in zones, including position and rotation updates.
- Introduced `useZoneStore` for managing selected zone states and widget configurations.
2025-04-22 08:58:29 +00:00
|
|
|
const { events } = useEventsStore();
|
|
|
|
const { products } = useProductStore();
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
console.log('events: ', events);
|
|
|
|
}, [events])
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
console.log('products: ', products);
|
|
|
|
}, [products])
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
2025-04-22 11:54:30 +00:00
|
|
|
<Vehicles />
|
feat: Implement Zustand stores for machine, simulation, storage unit, vehicle, and visualization management
- Added `useMachineStore` for managing machine statuses, including actions for adding, removing, and updating machines.
- Introduced `useSimulationStore` to handle product and event management with actions for adding, removing, and updating products and events.
- Created `useStorageUnitStore` for managing storage unit statuses, including load tracking and state updates.
- Developed `useVehicleStore` for vehicle management, including load and state updates.
- Implemented `useChartStore` for managing measurement data and visualization settings.
- Added `useDroppedObjectsStore` for handling dropped objects in visualization zones, including object manipulation actions.
- Created `useZone3DWidgetStore` for managing 3D widget data in zones, including position and rotation updates.
- Introduced `useZoneStore` for managing selected zone states and widget configurations.
2025-04-22 08:58:29 +00:00
|
|
|
</>
|
|
|
|
)
|
2025-03-25 12:04:20 +00:00
|
|
|
}
|
|
|
|
|
2025-04-21 06:23:42 +00:00
|
|
|
export default Simulation
|