removed the human bug, i dont know if there are any new bugs though.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user