list bug fix
This commit is contained in:
@@ -68,6 +68,16 @@ const List: React.FC<ListProps> = ({ items = [], remove }) => {
|
|||||||
});
|
});
|
||||||
}, [activeModule]);
|
}, [activeModule]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const expanded: Record<string, boolean> = { "unassigned-zone": true };
|
||||||
|
if (zones.length > 0) {
|
||||||
|
zones.forEach((zone: any) => {
|
||||||
|
expanded[zone.zoneUuid] = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setExpandedZones(expanded);
|
||||||
|
}, [zones.length]);
|
||||||
|
|
||||||
const toggleZoneExpansion = (zoneUuid: string) => {
|
const toggleZoneExpansion = (zoneUuid: string) => {
|
||||||
setExpandedZones((prev) => ({
|
setExpandedZones((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
|
|||||||
@@ -139,9 +139,9 @@ function WorkerInstance({ human }: { human: HumanStatus }) {
|
|||||||
}
|
}
|
||||||
} else if (!human.isActive && human.state === 'idle' && human.currentPhase === 'dropping' && human.currentLoad === 0) {
|
} else if (!human.isActive && human.state === 'idle' && human.currentPhase === 'dropping' && human.currentLoad === 0) {
|
||||||
if (action.pickUpPoint && action.dropPoint) {
|
if (action.pickUpPoint && action.dropPoint) {
|
||||||
const dropToPickup = computePath(action.dropPoint.position || [0, 0, 0], action.pickUpPoint.position || [0, 0, 0]);
|
// const dropToPickup = computePath(action.dropPoint.position || [0, 0, 0], action.pickUpPoint.position || [0, 0, 0]);
|
||||||
setPath(dropToPickup);
|
// setPath(dropToPickup);
|
||||||
setCurrentPhase(human.modelUuid, 'drop-pickup');
|
setCurrentPhase(human.modelUuid, 'init');
|
||||||
setHumanState(human.modelUuid, 'running');
|
setHumanState(human.modelUuid, 'running');
|
||||||
setHumanActive(human.modelUuid, true);
|
setHumanActive(human.modelUuid, true);
|
||||||
setCurrentAnimation(human.modelUuid, 'walking', true, true, true);
|
setCurrentAnimation(human.modelUuid, 'walking', true, true, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user