removed the human bug, i dont know if there are any new bugs though.

This commit is contained in:
2025-07-09 16:34:38 +05:30
parent 65ef6839a0
commit 3b4cdc95fc
8 changed files with 222 additions and 114 deletions

View File

@@ -13,7 +13,7 @@ interface HumansStore {
clearHumans: () => void;
setHumanActive: (modelUuid: string, isActive: boolean) => void;
setHumanPicking: (modelUuid: string, isPicking: boolean) => void;
setHumanScheduled: (modelUuid: string, isPicking: boolean) => void;
setHumanLoad: (modelUuid: string, load: number) => void;
setHumanState: (
modelUuid: string,
@@ -51,7 +51,7 @@ export const createHumanStore = () => {
...event,
productUuid,
isActive: false,
isPicking: false,
isScheduled: false,
idleTime: 0,
activeTime: 0,
currentLoad: 0,
@@ -92,11 +92,11 @@ export const createHumanStore = () => {
});
},
setHumanPicking: (modelUuid, isPicking) => {
setHumanScheduled: (modelUuid, isScheduled) => {
set((state) => {
const human = state.humans.find(h => h.modelUuid === modelUuid);
if (human) {
human.isPicking = isPicking;
human.isScheduled = isScheduled;
}
});
},