From 69329dba7aed234c8fced65fdf0d02a6f738ad3d Mon Sep 17 00:00:00 2001 From: Jerald-Golden-B Date: Sat, 23 Aug 2025 10:24:21 +0530 Subject: [PATCH] name and schema chmage for assembly to manufacturer --- ...-assembly.glb => human-ui-manufacture.glb} | Bin ...semblyAction.tsx => ManufactureAction.tsx} | 28 +- .../mechanics/humanMechanics.tsx | 40 +- app/src/modules/builder/asset/assetsGroup.tsx | 2 +- .../builder/asset/functions/addAssetModel.ts | 2 +- .../Instances/Instance/floorInstance.tsx | 383 +++++++++--------- .../builder/wall/Instances/instance/wall.tsx | 19 +- .../selection3D/copyPasteControls3D.tsx | 2 +- .../selection3D/duplicationControls3D.tsx | 2 +- ...lyHandler.ts => useManufacturerHandler.ts} | 12 +- .../actions/human/useHumanActions.ts | 16 +- .../simulation/actions/useActionHandler.ts | 2 +- .../eventManager/useHumanEventManager.ts | 16 +- ...rAnimator.tsx => manufacturerAnimator.tsx} | 12 +- .../instances/animator/materialAnimator.tsx | 2 +- .../instances/animator/workerAnimator.tsx | 4 +- ...rInstance.tsx => manufacturerInstance.tsx} | 38 +- .../instances/instance/humanInstance.tsx | 6 +- .../human/instances/instance/humanUi.tsx | 72 ++-- .../triggerHandler/useTriggerHandler.ts | 2 +- .../instances/instance/vehicleInstance.tsx | 2 +- .../store/simulation/useSimulationStore.ts | 8 +- app/src/types/simulationTypes.d.ts | 10 +- 23 files changed, 327 insertions(+), 353 deletions(-) rename app/src/assets/gltf-glb/ui/{human-ui-assembly.glb => human-ui-manufacture.glb} (100%) rename app/src/components/layout/sidebarRight/properties/eventProperties/actions/{AssemblyAction.tsx => ManufactureAction.tsx} (74%) rename app/src/modules/simulation/actions/human/actionHandler/{useAssemblyHandler.ts => useManufacturerHandler.ts} (72%) rename app/src/modules/simulation/human/instances/animator/{assemblerAnimator.tsx => manufacturerAnimator.tsx} (93%) rename app/src/modules/simulation/human/instances/instance/actions/{assemberInstance.tsx => manufacturerInstance.tsx} (89%) diff --git a/app/src/assets/gltf-glb/ui/human-ui-assembly.glb b/app/src/assets/gltf-glb/ui/human-ui-manufacture.glb similarity index 100% rename from app/src/assets/gltf-glb/ui/human-ui-assembly.glb rename to app/src/assets/gltf-glb/ui/human-ui-manufacture.glb diff --git a/app/src/components/layout/sidebarRight/properties/eventProperties/actions/AssemblyAction.tsx b/app/src/components/layout/sidebarRight/properties/eventProperties/actions/ManufactureAction.tsx similarity index 74% rename from app/src/components/layout/sidebarRight/properties/eventProperties/actions/AssemblyAction.tsx rename to app/src/components/layout/sidebarRight/properties/eventProperties/actions/ManufactureAction.tsx index e371f6f..5d66ceb 100644 --- a/app/src/components/layout/sidebarRight/properties/eventProperties/actions/AssemblyAction.tsx +++ b/app/src/components/layout/sidebarRight/properties/eventProperties/actions/ManufactureAction.tsx @@ -3,7 +3,7 @@ import InputRange from "../../../../../ui/inputs/InputRange"; import InputWithDropDown from "../../../../../ui/inputs/InputWithDropDown"; import SwapAction from "./SwapAction"; -interface AssemblyActionProps { +interface ManufactureActionProps { processTime: { value: number; min: number; @@ -11,7 +11,7 @@ interface AssemblyActionProps { disabled?: boolean, onChange: (value: number) => void; }; - assemblyCount: { + manufactureCount: { value: number; min: number; max: number; @@ -26,9 +26,9 @@ interface AssemblyActionProps { clearPoints: () => void; } -const AssemblyAction: React.FC = ({ +const ManufactureAction: React.FC = ({ processTime, - assemblyCount, + manufactureCount, swapOptions, swapDefaultOption, onSwapSelect, @@ -46,18 +46,18 @@ const AssemblyAction: React.FC = ({ onChange={processTime.onChange} /> - {assemblyCount && ( + {manufactureCount && ( { }} - onChange={(value) => assemblyCount.onChange(parseInt(value))} + onChange={(value) => manufactureCount.onChange(parseInt(value))} /> )} = ({ ); }; -export default AssemblyAction; +export default ManufactureAction; diff --git a/app/src/components/layout/sidebarRight/properties/eventProperties/mechanics/humanMechanics.tsx b/app/src/components/layout/sidebarRight/properties/eventProperties/mechanics/humanMechanics.tsx index 22bdbbf..0e003b1 100644 --- a/app/src/components/layout/sidebarRight/properties/eventProperties/mechanics/humanMechanics.tsx +++ b/app/src/components/layout/sidebarRight/properties/eventProperties/mechanics/humanMechanics.tsx @@ -7,7 +7,7 @@ import LabledDropdown from "../../../../../ui/inputs/LabledDropdown"; import Trigger from "../trigger/Trigger"; import ActionsList from "../components/ActionsList"; import WorkerAction from "../actions/WorkerAction"; -import AssemblyAction from "../actions/AssemblyAction"; +import ManufactureAction from "../actions/ManufactureAction"; import { useSelectedEventData, useSelectedAction } from "../../../../../../store/simulation/useSimulationStore"; import { upsertProductOrEventApi } from "../../../../../../services/simulation/products/UpsertProductOrEventApi"; @@ -17,10 +17,10 @@ import { useSceneContext } from "../../../../../../modules/scene/sceneContext"; import { useParams } from "react-router-dom"; function HumanMechanics() { - const [activeOption, setActiveOption] = useState<"worker" | "assembly" | "operator">("worker"); + const [activeOption, setActiveOption] = useState<"worker" | "manufacturer" | "operator">("worker"); const [speed, setSpeed] = useState("0.5"); const [loadCount, setLoadCount] = useState(0); - const [assemblyCount, setAssemblyCount] = useState(0); + const [manufactureCount, setManufactureCount] = useState(0); const [loadCapacity, setLoadCapacity] = useState("1"); const [processTime, setProcessTime] = useState(10); const [swappedMaterial, setSwappedMaterial] = useState("Default material"); @@ -58,7 +58,7 @@ function HumanMechanics() { setLoadCapacity(firstAction.loadCapacity.toString()); setActiveOption(firstAction.actionType); setLoadCount(firstAction.loadCount || 0); - setAssemblyCount(firstAction.assemblyCount || 0); + setManufactureCount(firstAction.manufactureCount || 0); setProcessTime(firstAction.processTime || 10); setSwappedMaterial(firstAction.swapMaterial || "Default material"); } @@ -79,7 +79,7 @@ function HumanMechanics() { const newCurrentAction = getActionByUuid(selectedProduct.productUuid, actionUuid); - if (newCurrentAction && (newCurrentAction.actionType === 'assembly' || newCurrentAction?.actionType === 'worker' || newCurrentAction?.actionType === "operator")) { + if (newCurrentAction && (newCurrentAction.actionType === 'manufacturer' || newCurrentAction?.actionType === 'worker' || newCurrentAction?.actionType === "operator")) { if (!selectedAction.actionId) { setSelectedAction(newCurrentAction.actionUuid, newCurrentAction.actionName); } @@ -87,9 +87,9 @@ function HumanMechanics() { setActiveOption(newCurrentAction.actionType); setLoadCapacity(newCurrentAction.loadCapacity.toString()); setLoadCount(newCurrentAction.loadCount || 0); - setAssemblyCount(newCurrentAction.assemblyCount || 0); + setManufactureCount(newCurrentAction.manufactureCount || 0); - if (newCurrentAction.actionType === 'assembly') { + if (newCurrentAction.actionType === 'manufacturer') { setProcessTime(newCurrentAction.processTime || 10); setSwappedMaterial(newCurrentAction.swapMaterial || "Default material"); } @@ -118,7 +118,7 @@ function HumanMechanics() { const handleSelectActionType = (actionType: string) => { if (!selectedAction.actionId || !currentAction || !selectedPointData) return; - const updatedAction = { ...currentAction, actionType: actionType as "worker" | "assembly" | "operator" }; + const updatedAction = { ...currentAction, actionType: actionType as "worker" | "manufacturer" | "operator" }; const updatedActions = selectedPointData.actions.map(action => action.actionUuid === updatedAction.actionUuid ? updatedAction : action); const updatedPoint = { ...selectedPointData, actions: updatedActions }; @@ -203,10 +203,10 @@ function HumanMechanics() { setLoadCount(value); }; - const handleAssemblyCountChange = (value: number) => { + const handleManufactureCountChange = (value: number) => { if (!currentAction || !selectedPointData || !selectedAction.actionId) return; - const updatedAction = { ...currentAction, assemblyCount: value }; + const updatedAction = { ...currentAction, manufactureCount: value }; const updatedActions = selectedPointData.actions.map(action => action.actionUuid === updatedAction.actionUuid ? updatedAction : action); const updatedPoint = { ...selectedPointData, actions: updatedActions }; @@ -222,7 +222,7 @@ function HumanMechanics() { setCurrentAction(updatedAction); setSelectedPointData(updatedPoint); - setAssemblyCount(value); + setManufactureCount(value); }; const handleProcessTimeChange = (value: number) => { @@ -274,8 +274,8 @@ function HumanMechanics() { const updatedAction: HumanAction = JSON.parse(JSON.stringify(currentAction)); - if (updatedAction.actionType === 'assembly') { - updatedAction.assemblyPoint = { position: null, rotation: null, } + if (updatedAction.actionType === 'manufacturer') { + updatedAction.manufacturePoint = { position: null, rotation: null, } } else { updatedAction.pickUpPoint = { position: null, rotation: null, }; updatedAction.dropPoint = { position: null, rotation: null, } @@ -306,7 +306,7 @@ function HumanMechanics() { actionName: `Action ${selectedPointData.actions.length + 1}`, actionType: "worker", loadCount: 1, - assemblyCount: 1, + manufactureCount: 1, loadCapacity: 1, processTime: 10, triggers: [], @@ -397,7 +397,7 @@ function HumanMechanics() { @@ -425,22 +425,22 @@ function HumanMechanics() { clearPoints={handleClearPoints} /> } - {currentAction.actionType === 'assembly' && - = { + "Default Material": { + map: savedTheme === "dark" ? texturePathDark : texturePath, + }, + "Material 1": { + map: material1, + }, + "Material 2": { + map: material2Map, + roughnessMap: material2MetalicRoughnessMap, + metalnessMap: material2MetalicRoughnessMap, + normalMap: material2NormalMap, + textureTileScale: [0.1, 0.1], + }, + "Material 3": { + map: material3Map, + roughnessMap: material3MetalicRoughnessMap, + metalnessMap: material3MetalicRoughnessMap, + normalMap: material3NormalMap, + textureTileScale: [0.35, 0.5], + }, + "Material 4": { + map: material4Map, + roughnessMap: material4RoughnessMap, + metalnessMap: material4MetalicMap, + normalMap: material4NormalMap, + }, + }; + + const shape = useMemo(() => { + const shape = new Shape(); + const points = floor.points.map( + (p) => new Vector2(p.position[0], p.position[2]) + ); + if (points.length < 3) return null; + shape.moveTo(points[0].x, points[0].y); + for (let i = 1; i < points.length; i++) { + shape.lineTo(points[i].x, points[i].y); + } + return shape; + }, [floor]); + + const textureScale = Constants.floorConfig.textureScale; + + // Helper function to handle texture maps and filter out null values + function getMaterialMaps(material: any, defaultMap: any) { + const materialMap = material.map || defaultMap; + const normalMap = material.normalMap || null; + const roughnessMap = material.roughnessMap || null; + const metalnessMap = material.metalnessMap || null; + + return [materialMap, normalMap, roughnessMap, metalnessMap].filter( + (texture): texture is string => texture !== null + ); } - > = { - "Default Material": { - map: savedTheme === "dark" ? texturePathDark : texturePath, - }, - "Material 1": { - map: material1, - }, - "Material 2": { - map: material2Map, - roughnessMap: material2MetalicRoughnessMap, - metalnessMap: material2MetalicRoughnessMap, - normalMap: material2NormalMap, - textureTileScale: [0.1, 0.1], - }, - "Material 3": { - map: material3Map, - roughnessMap: material3MetalicRoughnessMap, - metalnessMap: material3MetalicRoughnessMap, - normalMap: material3NormalMap, - textureTileScale: [0.35, 0.5], - }, - "Material 4": { - map: material4Map, - roughnessMap: material4RoughnessMap, - metalnessMap: material4MetalicMap, - normalMap: material4NormalMap, - }, - }; - const shape = useMemo(() => { - const shape = new Shape(); - const points = floor.points.map( - (p) => new Vector2(p.position[0], p.position[2]) - ); - if (points.length < 3) return null; - shape.moveTo(points[0].x, points[0].y); - for (let i = 1; i < points.length; i++) { - shape.lineTo(points[i].x, points[i].y); - } - return shape; - }, [floor]); + // Default material map + const defaultMaterialMap = materials["Default Material"].map; - const textureScale = Constants.floorConfig.textureScale; + // Get top and side material maps + const topMaterial = materials[floor.topMaterial]; + const sideMaterial = materials[floor.sideMaterial]; - // Helper function to handle texture maps and filter out null values - function getMaterialMaps(material: any, defaultMap: any) { - const materialMap = material.map || defaultMap; - const normalMap = material.normalMap || null; - const roughnessMap = material.roughnessMap || null; - const metalnessMap = material.metalnessMap || null; + // Get the filtered lists for top and side textures + const topTexturesList = getMaterialMaps(topMaterial, defaultMaterialMap); + const sideTexturesList = getMaterialMaps(sideMaterial, defaultMaterialMap); - return [materialMap, normalMap, roughnessMap, metalnessMap].filter( - (texture): texture is string => texture !== null - ); - } + // Use loader to load top and side textures + const [topTexture, topNormalTexture, topRoughnessTexture, topMetalicTexture] = useLoader(TextureLoader, topTexturesList); - // Default material map - const defaultMaterialMap = materials["Default Material"].map; - - // Get top and side material maps - const topMaterial = materials[floor.topMaterial]; - const sideMaterial = materials[floor.sideMaterial]; - - // Get the filtered lists for top and side textures - const topTexturesList = getMaterialMaps(topMaterial, defaultMaterialMap); - const sideTexturesList = getMaterialMaps(sideMaterial, defaultMaterialMap); - - // Use loader to load top and side textures - const [topTexture, topNormalTexture, topRoughnessTexture, topMetalicTexture] = - useLoader(TextureLoader, topTexturesList); - - const [ - sideTexture, - sideNormalTexture, - sideRoughnessTexture, - sideMetalicTexture, - ] = useLoader(TextureLoader, sideTexturesList); - - // Early exit if materials are missing - if (!materials[floor.topMaterial] || !materials[floor.sideMaterial]) - return null; - - // Combine and pair textures with their corresponding material - const textureMaterialMap = [ - { - textures: [ - topTexture, - topNormalTexture, - topRoughnessTexture, - topMetalicTexture, - ], - materialKey: floor.topMaterial, - }, - { - textures: [ + const [ sideTexture, sideNormalTexture, sideRoughnessTexture, sideMetalicTexture, - ], - materialKey: floor.sideMaterial, - }, - ]; + ] = useLoader(TextureLoader, sideTexturesList); - // Apply texture settings - textureMaterialMap.forEach(({ textures, materialKey }) => { - const tileScale = materials[materialKey]?.textureTileScale ?? [ - textureScale, - textureScale, + // Early exit if materials are missing + if (!materials[floor.topMaterial] || !materials[floor.sideMaterial]) + return null; + + // Combine and pair textures with their corresponding material + const textureMaterialMap = [ + { + textures: [ + topTexture, + topNormalTexture, + topRoughnessTexture, + topMetalicTexture, + ], + materialKey: floor.topMaterial, + }, + { + textures: [ + sideTexture, + sideNormalTexture, + sideRoughnessTexture, + sideMetalicTexture, + ], + materialKey: floor.sideMaterial, + }, ]; - textures.forEach((tex, idx) => { - if (!tex) return; - tex.wrapS = tex.wrapT = RepeatWrapping; - tex.repeat.set(tileScale[0], tileScale[1]); - tex.anisotropy = 16; - // First texture is always the color map (use SRGB), others should be linear - tex.colorSpace = idx < 1 ? SRGBColorSpace : NoColorSpace; + // Apply texture settings + textureMaterialMap.forEach(({ textures, materialKey }) => { + const tileScale = materials[materialKey]?.textureTileScale ?? [ + textureScale, + textureScale, + ]; + + textures.forEach((tex, idx) => { + if (!tex) return; + tex.wrapS = tex.wrapT = RepeatWrapping; + tex.repeat.set(tileScale[0], tileScale[1]); + tex.anisotropy = 16; + // First texture is always the color map (use SRGB), others should be linear + tex.colorSpace = idx < 1 ? SRGBColorSpace : NoColorSpace; + }); }); - }); - if (!shape) return null; + if (!shape) return null; - return ( - { - if (!togglView && activeModule === "builder") { - if (e.object.userData.floorUuid) { - e.stopPropagation(); - setSelectedFloor(e.object); - setSelectedDecal(null); - } - } - }} - onPointerMissed={() => { - if ( - selectedFloor && - selectedFloor.userData.floorUuid === floor.floorUuid - ) { - setSelectedFloor(null); - } - }} - > - - - - - - ); + return ( + { + if (!togglView && activeModule === "builder") { + if (e.object.userData.floorUuid) { + e.stopPropagation(); + setSelectedFloor(e.object); + setSelectedDecal(null); + } + } + }} + onPointerMissed={() => { + if ( + selectedFloor && + selectedFloor.userData.floorUuid === floor.floorUuid + ) { + setSelectedFloor(null); + } + }} + > + + + + + + ); } export default FloorInstance; diff --git a/app/src/modules/builder/wall/Instances/instance/wall.tsx b/app/src/modules/builder/wall/Instances/instance/wall.tsx index 9023dc6..283ec23 100644 --- a/app/src/modules/builder/wall/Instances/instance/wall.tsx +++ b/app/src/modules/builder/wall/Instances/instance/wall.tsx @@ -10,7 +10,7 @@ import { useToggleView, useWallVisibility } from '../../../../../store/builder/s import { useBuilderStore } from '../../../../../store/builder/useBuilderStore'; import * as Constants from '../../../../../types/world/worldConstants'; -// import DecalInstance from '../../../Decal/decalInstance'; +import DecalInstance from '../../../Decal/decalInstance'; import defaultMaterial from '../../../../../assets/textures/floor/wall-tex.png'; import material1 from '../../../../../assets/textures/floor/factory wall texture.jpg'; @@ -150,19 +150,6 @@ function Wall({ wall }: { readonly wall: Wall }) { e.stopPropagation(); setSelectedWall(e.object); setSelectedDecal(null); - - if (wall.decals.length > 0) return; - const decal: Decal = { - decalUuid: THREE.MathUtils.generateUUID(), - decalName: 'Decal', - decalId: 'Default Decal', - decalPosition: [0, 0, wall.wallThickness / 2 + 0.001], - decalRotation: 0, - decalScale: 1, - decalType: { type: 'Wall', wallUuid: wall.wallUuid } - } - addDecal(wall.wallUuid, decal); - } } }} @@ -174,9 +161,9 @@ function Wall({ wall }: { readonly wall: Wall }) { > - {/* {wall.decals.map((decal) => ( + {wall.decals.map((decal) => ( - ))} */} + ))} ); diff --git a/app/src/modules/scene/controls/selectionControls/selection3D/copyPasteControls3D.tsx b/app/src/modules/scene/controls/selectionControls/selection3D/copyPasteControls3D.tsx index a8a8c8d..c11a50e 100644 --- a/app/src/modules/scene/controls/selectionControls/selection3D/copyPasteControls3D.tsx +++ b/app/src/modules/scene/controls/selectionControls/selection3D/copyPasteControls3D.tsx @@ -430,7 +430,7 @@ const CopyPasteControls3D = ({ actionName: "Action 1", actionType: "worker", loadCapacity: 1, - assemblyCount: 1, + manufactureCount: 1, loadCount: 1, processTime: 10, triggers: [] diff --git a/app/src/modules/scene/controls/selectionControls/selection3D/duplicationControls3D.tsx b/app/src/modules/scene/controls/selectionControls/selection3D/duplicationControls3D.tsx index 551cdaf..01c74d0 100644 --- a/app/src/modules/scene/controls/selectionControls/selection3D/duplicationControls3D.tsx +++ b/app/src/modules/scene/controls/selectionControls/selection3D/duplicationControls3D.tsx @@ -497,7 +497,7 @@ const DuplicationControls3D = ({ actionName: "Action 1", actionType: "worker", loadCapacity: 1, - assemblyCount: 1, + manufactureCount: 1, loadCount: 1, processTime: 10, triggers: [] diff --git a/app/src/modules/simulation/actions/human/actionHandler/useAssemblyHandler.ts b/app/src/modules/simulation/actions/human/actionHandler/useManufacturerHandler.ts similarity index 72% rename from app/src/modules/simulation/actions/human/actionHandler/useAssemblyHandler.ts rename to app/src/modules/simulation/actions/human/actionHandler/useManufacturerHandler.ts index 602de27..25dee10 100644 --- a/app/src/modules/simulation/actions/human/actionHandler/useAssemblyHandler.ts +++ b/app/src/modules/simulation/actions/human/actionHandler/useManufacturerHandler.ts @@ -2,7 +2,7 @@ import { useCallback } from "react"; import { useSceneContext } from "../../../../scene/sceneContext"; import { useProductContext } from "../../../products/productContext"; -export function useAssemblyHandler() { +export function useManufacturerHandler() { const { materialStore, humanStore, productStore } = useSceneContext(); const { getMaterialById } = materialStore(); const { getModelUuidByActionUuid } = productStore(); @@ -10,12 +10,12 @@ export function useAssemblyHandler() { const { selectedProduct } = selectedProductStore(); const { incrementHumanLoad, addCurrentMaterial, addCurrentAction } = humanStore(); - const assemblyLogStatus = (materialUuid: string, status: string) => { + const manufactureLogStatus = (materialUuid: string, status: string) => { echo.info(`${materialUuid}, ${status}`); } - const handleAssembly = useCallback((action: HumanAction, materialId?: string) => { - if (!action || action.actionType !== 'assembly' || !materialId) return; + const handleManufacturer = useCallback((action: HumanAction, materialId?: string) => { + if (!action || action.actionType !== 'manufacturer' || !materialId) return; const material = getMaterialById(materialId); if (!material) return; @@ -27,11 +27,11 @@ export function useAssemblyHandler() { addCurrentAction(modelUuid, action.actionUuid); addCurrentMaterial(modelUuid, material.materialType, material.materialId); - assemblyLogStatus(material.materialName, `performing assembly action`); + manufactureLogStatus(material.materialName, `performing manufacturer action`); }, [getMaterialById]); return { - handleAssembly, + handleManufacturer, }; } \ No newline at end of file diff --git a/app/src/modules/simulation/actions/human/useHumanActions.ts b/app/src/modules/simulation/actions/human/useHumanActions.ts index ba29a1b..301669e 100644 --- a/app/src/modules/simulation/actions/human/useHumanActions.ts +++ b/app/src/modules/simulation/actions/human/useHumanActions.ts @@ -1,18 +1,18 @@ import { useEffect, useCallback } from 'react'; import { useWorkerHandler } from './actionHandler/useWorkerHandler'; -import { useAssemblyHandler } from './actionHandler/useAssemblyHandler'; +import { useManufacturerHandler } from './actionHandler/useManufacturerHandler'; export function useHumanActions() { const { handleWorker } = useWorkerHandler(); - const { handleAssembly } = useAssemblyHandler(); + const { handleManufacturer } = useManufacturerHandler(); const handleWorkerAction = useCallback((action: HumanAction, materialId: string) => { handleWorker(action, materialId); }, [handleWorker]); - const handleAssemblyAction = useCallback((action: HumanAction, materialId: string) => { - handleAssembly(action, materialId); - }, [handleAssembly]); + const handleManufactureAction = useCallback((action: HumanAction, materialId: string) => { + handleManufacturer(action, materialId); + }, [handleManufacturer]); const handleHumanAction = useCallback((action: HumanAction, materialId: string) => { if (!action) return; @@ -21,13 +21,13 @@ export function useHumanActions() { case 'worker': handleWorkerAction(action, materialId); break; - case 'assembly': - handleAssemblyAction(action, materialId); + case 'manufacturer': + handleManufactureAction(action, materialId); break; default: console.warn(`Unknown Human action type: ${action.actionType}`); } - }, [handleWorkerAction, handleAssemblyAction]); + }, [handleWorkerAction, handleManufactureAction]); const cleanup = useCallback(() => { }, []); diff --git a/app/src/modules/simulation/actions/useActionHandler.ts b/app/src/modules/simulation/actions/useActionHandler.ts index 99d8225..ec02943 100644 --- a/app/src/modules/simulation/actions/useActionHandler.ts +++ b/app/src/modules/simulation/actions/useActionHandler.ts @@ -41,7 +41,7 @@ export function useActionHandler() { case 'store': case 'retrieve': handleStorageAction(action as StorageAction, materialId as string); break; - case 'worker': case 'assembly': + case 'worker': case 'manufacturer': handleHumanAction(action as HumanAction, materialId as string); break; case 'pickAndDrop': diff --git a/app/src/modules/simulation/human/eventManager/useHumanEventManager.ts b/app/src/modules/simulation/human/eventManager/useHumanEventManager.ts index 1dec0d9..4a41f6f 100644 --- a/app/src/modules/simulation/human/eventManager/useHumanEventManager.ts +++ b/app/src/modules/simulation/human/eventManager/useHumanEventManager.ts @@ -25,7 +25,7 @@ export function useHumanEventManager() { const addHumanToMonitor = (humanId: string, callback: () => void, actionUuid: string) => { const human = getHumanById(humanId); const action = getActionByUuid(selectedProduct.productUuid, actionUuid); - if (!human || !action || (action.actionType !== 'assembly' && action.actionType !== 'worker' && action.actionType !== 'operator') || !humanEventManagerRef.current) return; + if (!human || !action || (action.actionType !== 'manufacturer' && action.actionType !== 'worker' && action.actionType !== 'operator') || !humanEventManagerRef.current) return; let state = humanEventManagerRef.current.humanStates.find(h => h.humanId === humanId); if (!state) { @@ -42,8 +42,8 @@ export function useHumanEventManager() { existingAction.isMonitored = true; existingAction.isCompleted = false; } - } else if (existingAction.actionType === 'assembly') { - if (currentCount < existingAction.maxAssemblyCount) { + } else if (existingAction.actionType === 'manufacturer') { + if (currentCount < existingAction.maxManufactureCount) { existingAction.callback = callback; existingAction.isMonitored = true; existingAction.isCompleted = false; @@ -57,7 +57,7 @@ export function useHumanEventManager() { actionUuid, actionName: action.actionName, maxLoadCount: action.loadCount ?? 0, - maxAssemblyCount: action.assemblyCount ?? 0, + maxManufactureCount: action.manufactureCount ?? 0, count: 0, isMonitored: true, isCompleted: false, @@ -101,11 +101,11 @@ export function useHumanEventManager() { if (currentAction.actionType === 'worker' || currentAction.actionType === 'operator') { if ((action.actionType === 'worker' || action.actionType === 'operator') && human.currentLoad < currentAction.loadCapacity) { conditionMet = true; - } else if (action.actionType === 'assembly') { + } else if (action.actionType === 'manufacturer') { conditionMet = true; } - } else if (currentAction.actionType === 'assembly') { - if (action.actionType === 'assembly') { + } else if (currentAction.actionType === 'manufacturer') { + if (action.actionType === 'manufacturer') { conditionMet = true; } else if ((action.actionType === 'worker' || action.actionType === 'operator') && human.currentLoad < currentAction.loadCapacity) { conditionMet = true; @@ -122,7 +122,7 @@ export function useHumanEventManager() { action.count = (action.count ?? 0) + 1; action.isMonitored = false; if (((action.actionType === 'worker' || action.actionType === 'operator') && action.count >= action.maxLoadCount) || - (action.actionType === 'assembly' && action.count >= action.maxAssemblyCount)) { + (action.actionType === 'manufacturer' && action.count >= action.maxManufactureCount)) { action.isCompleted = true; } humanState.isCooldown = true; diff --git a/app/src/modules/simulation/human/instances/animator/assemblerAnimator.tsx b/app/src/modules/simulation/human/instances/animator/manufacturerAnimator.tsx similarity index 93% rename from app/src/modules/simulation/human/instances/animator/assemblerAnimator.tsx rename to app/src/modules/simulation/human/instances/animator/manufacturerAnimator.tsx index d891d8f..45d7658 100644 --- a/app/src/modules/simulation/human/instances/animator/assemblerAnimator.tsx +++ b/app/src/modules/simulation/human/instances/animator/manufacturerAnimator.tsx @@ -6,14 +6,14 @@ import { useAnimationPlaySpeed, usePauseButtonStore, usePlayButtonStore, useRese import { useSceneContext } from '../../../../scene/sceneContext'; import { useProductContext } from '../../../products/productContext'; -interface AssemblerAnimatorProps { +interface ManufacturerAnimatorProps { path: [number, number, number][]; handleCallBack: () => void; reset: () => void; human: HumanStatus; } -function AssemblerAnimator({ path, handleCallBack, human, reset }: Readonly) { +function ManufacturerAnimator({ path, handleCallBack, human, reset }: Readonly) { const { humanStore, assetStore, productStore } = useSceneContext(); const { getActionByUuid } = productStore(); const { selectedProductStore } = useProductContext(); @@ -27,16 +27,16 @@ function AssemblerAnimator({ path, handleCallBack, human, reset }: Readonly(0); const completedRef = useRef(false); const action = getActionByUuid(selectedProduct.productUuid, human?.currentAction?.actionUuid || ''); - const [objectRotation, setObjectRotation] = useState<[number, number, number] | null>((action as HumanAction)?.assemblyPoint?.rotation || [0, 0, 0]); + const [objectRotation, setObjectRotation] = useState<[number, number, number] | null>((action as HumanAction)?.manufacturePoint?.rotation || [0, 0, 0]); const [restRotation, setRestingRotation] = useState(true); const [currentPath, setCurrentPath] = useState<[number, number, number][]>([]); const { scene } = useThree(); useEffect(() => { if (!human.currentAction?.actionUuid) return; - if (human.currentPhase === 'init-assembly' && path.length > 0) { + if (human.currentPhase === 'init-manufacture' && path.length > 0) { setCurrentPath(path); - setObjectRotation((action as HumanAction)?.assemblyPoint?.rotation ?? null); + setObjectRotation((action as HumanAction)?.manufacturePoint?.rotation ?? null); } }, [human.currentPhase, path, objectRotation, selectedProduct, human.currentAction?.actionUuid]); @@ -169,4 +169,4 @@ function AssemblerAnimator({ path, handleCallBack, human, reset }: Readonly { return ( <> - {hasLoad && action && (action as HumanAction).actionType === 'worker' && human.currentMaterials.length > 0 && (human.currentPhase !== 'init-pickup' && human.currentPhase !== 'init-assembly' && human.currentPhase !== 'drop-pickup') && ( + {hasLoad && action && (action as HumanAction).actionType === 'worker' && human.currentMaterials.length > 0 && (human.currentPhase !== 'init-pickup' && human.currentPhase !== 'init-manufacture' && human.currentPhase !== 'drop-pickup') && ( 0 && (human.currentPhase !== 'init-pickup' && human.currentPhase !== 'init-assembly' && human.currentPhase !== 'drop-pickup')) { + if (human.currentMaterials.length > 0 && (human.currentPhase !== 'init-pickup' && human.currentPhase !== 'init-manufacture' && human.currentPhase !== 'drop-pickup')) { setCurrentAnimation(human.modelUuid, 'walk_with_box', true, true, true); } else { setCurrentAnimation(human.modelUuid, 'walking', true, true, true); } } else { - if (human.currentMaterials.length > 0 && (human.currentPhase !== 'init-pickup' && human.currentPhase !== 'init-assembly' && human.currentPhase !== 'drop-pickup')) { + if (human.currentMaterials.length > 0 && (human.currentPhase !== 'init-pickup' && human.currentPhase !== 'init-manufacture' && human.currentPhase !== 'drop-pickup')) { setCurrentAnimation(human.modelUuid, 'idle_with_box', true, true, true); } else { setCurrentAnimation(human.modelUuid, 'idle', true, true, true); diff --git a/app/src/modules/simulation/human/instances/instance/actions/assemberInstance.tsx b/app/src/modules/simulation/human/instances/instance/actions/manufacturerInstance.tsx similarity index 89% rename from app/src/modules/simulation/human/instances/instance/actions/assemberInstance.tsx rename to app/src/modules/simulation/human/instances/instance/actions/manufacturerInstance.tsx index 881a2ec..ae74a14 100644 --- a/app/src/modules/simulation/human/instances/instance/actions/assemberInstance.tsx +++ b/app/src/modules/simulation/human/instances/instance/actions/manufacturerInstance.tsx @@ -8,9 +8,9 @@ import { useTriggerHandler } from '../../../../triggers/triggerHandler/useTrigge import { useSceneContext } from '../../../../../scene/sceneContext'; import { useProductContext } from '../../../../products/productContext'; -import AssemblerAnimator from '../../animator/assemblerAnimator'; +import ManufacturerAnimator from '../../animator/manufacturerAnimator'; -function AssemblerInstance({ human }: { human: HumanStatus }) { +function ManufacturerInstance({ human }: { human: HumanStatus }) { const { navMesh } = useNavMesh(); const { isPlaying } = usePlayButtonStore(); const { scene } = useThree(); @@ -99,24 +99,24 @@ function AssemblerInstance({ human }: { human: HumanStatus }) { if (isPlaying) { const action = getActionByUuid(selectedProduct.productUuid, human?.currentAction?.actionUuid || ''); - if (!action || !(action as HumanAction).assemblyPoint || (action as HumanAction).actionType === 'worker') return; + if (!action || !(action as HumanAction).manufacturePoint || (action as HumanAction).actionType === 'worker') return; if (!human.isActive && human.state === 'idle' && human.currentPhase === 'init') { const humanMesh = scene.getObjectByProperty('uuid', human.modelUuid); if (!humanMesh) return; - const toPickupPath = computePath(humanMesh.position.toArray(), (action as HumanAction)?.assemblyPoint?.position || [0, 0, 0]); + const toPickupPath = computePath(humanMesh.position.toArray(), (action as HumanAction)?.manufacturePoint?.position || [0, 0, 0]); setPath(toPickupPath); setHumanState(human.modelUuid, 'idle'); - setCurrentPhase(human.modelUuid, 'init-assembly'); + setCurrentPhase(human.modelUuid, 'init-manufacture'); setHumanActive(human.modelUuid, false); setCurrentAnimation(human.modelUuid, 'idle', true, true, true); - humanStatus(human.modelUuid, 'Human is waiting for material in assembly'); + humanStatus(human.modelUuid, 'Human is waiting for material in manufacture'); } else if (!human.isActive && human.state === 'idle' && human.currentPhase === 'waiting') { if (human.currentMaterials.length > 0 && humanAsset && humanAsset.animationState?.current !== 'working_standing') { setCurrentAnimation(human.modelUuid, 'working_standing', true, true, false); setHumanState(human.modelUuid, 'running'); - setCurrentPhase(human.modelUuid, 'assembling'); + setCurrentPhase(human.modelUuid, 'manufacturing'); setHumanActive(human.modelUuid, true); processStartTimeRef.current = performance.now(); @@ -127,16 +127,16 @@ function AssemblerInstance({ human }: { human: HumanStatus }) { hasLoggedCompleted.current = false; if (!processAnimationIdRef.current) { - processAnimationIdRef.current = requestAnimationFrame(trackAssemblyProcess); + processAnimationIdRef.current = requestAnimationFrame(trackManufactureProcess); } } } else if (human.isActive && human.state === 'running' && human.currentMaterials.length > 0 && humanAsset && humanAsset.animationState?.current === 'working_standing' && humanAsset.animationState?.isCompleted) { - if ((action as HumanAction).assemblyPoint && human.currentPhase === 'assembling') { + if ((action as HumanAction).manufacturePoint && human.currentPhase === 'manufacturing') { setHumanState(human.modelUuid, 'idle'); setCurrentPhase(human.modelUuid, 'waiting'); setHumanActive(human.modelUuid, false); setCurrentAnimation(human.modelUuid, 'idle', true, true, true); - humanStatus(human.modelUuid, 'Human is waiting for material in assembly'); + humanStatus(human.modelUuid, 'Human is waiting for material in manufacture'); decrementHumanLoad(human.modelUuid, 1); const material = removeLastMaterial(human.modelUuid); @@ -150,7 +150,7 @@ function AssemblerInstance({ human }: { human: HumanStatus }) { } }, [human, human.currentPhase, path, isPlaying, humanAsset?.animationState?.isCompleted]); - const trackAssemblyProcess = useCallback(() => { + const trackManufactureProcess = useCallback(() => { const action = getActionByUuid(selectedProduct.productUuid, human?.currentAction?.actionUuid || ''); const now = performance.now(); @@ -163,7 +163,7 @@ function AssemblerInstance({ human }: { human: HumanStatus }) { if (!lastPauseTimeRef.current) { lastPauseTimeRef.current = now; } - processAnimationIdRef.current = requestAnimationFrame(trackAssemblyProcess); + processAnimationIdRef.current = requestAnimationFrame(trackManufactureProcess); return; } else if (lastPauseTimeRef.current) { accumulatedPausedTimeRef.current += now - lastPauseTimeRef.current; @@ -178,7 +178,7 @@ function AssemblerInstance({ human }: { human: HumanStatus }) { if (human.currentMaterials.length > 0) { setMaterial(human.currentMaterials[0].materialId, (action as HumanAction).swapMaterial || 'Default Material'); } - humanStatus(human.modelUuid, `🟡 Human ${human.modelUuid} reached halfway in assembly.`); + humanStatus(human.modelUuid, `🟡 Human ${human.modelUuid} reached halfway in manufacture.`); } if (elapsed >= totalProcessTimeMs && !hasLoggedCompleted.current) { @@ -188,27 +188,27 @@ function AssemblerInstance({ human }: { human: HumanStatus }) { cancelAnimationFrame(processAnimationIdRef.current); processAnimationIdRef.current = null; } - humanStatus(human.modelUuid, `✅ Human ${human.modelUuid} completed assembly process.`); + humanStatus(human.modelUuid, `✅ Human ${human.modelUuid} completed manufacture process.`); return; } - processAnimationIdRef.current = requestAnimationFrame(trackAssemblyProcess); + processAnimationIdRef.current = requestAnimationFrame(trackManufactureProcess); }, [human.modelUuid, human.currentMaterials]); function handleCallBack() { - if (human.currentPhase === 'init-assembly') { + if (human.currentPhase === 'init-manufacture') { setCurrentPhase(human.modelUuid, 'waiting'); setHumanState(human.modelUuid, 'idle'); setHumanActive(human.modelUuid, false); setCurrentAnimation(human.modelUuid, 'idle', true, true, true); - humanStatus(human.modelUuid, 'Reached assembly point, waiting for material'); + humanStatus(human.modelUuid, 'Reached manufacture point, waiting for material'); setPath([]); } } return ( <> - } - {action && action.actionType === 'assembly' && - + {action && action.actionType === 'manufacturer' && + } {action && action.actionType === 'operator' && diff --git a/app/src/modules/simulation/human/instances/instance/humanUi.tsx b/app/src/modules/simulation/human/instances/instance/humanUi.tsx index 043811a..abaceb5 100644 --- a/app/src/modules/simulation/human/instances/instance/humanUi.tsx +++ b/app/src/modules/simulation/human/instances/instance/humanUi.tsx @@ -10,16 +10,16 @@ import { useVersionContext } from '../../../../builder/version/versionContext'; import { useParams } from 'react-router-dom'; import startPoint from "../../../../../assets/gltf-glb/ui/human-ui-green.glb"; import startEnd from "../../../../../assets/gltf-glb/ui/human-ui-orange.glb"; -import assembly from "../../../../../assets/gltf-glb/ui/human-ui-assembly.glb"; +import manufacture from "../../../../../assets/gltf-glb/ui/human-ui-manufacture.glb"; import { upsertProductOrEventApi } from '../../../../../services/simulation/products/UpsertProductOrEventApi'; function HumanUi() { const { scene: startScene } = useGLTF(startPoint) as any; const { scene: endScene } = useGLTF(startEnd) as any; - const { scene: assemblyScene } = useGLTF(assembly) as any; + const { scene: manufactureScene } = useGLTF(manufacture) as any; const startMarker = useRef(null); const endMarker = useRef(null); - const assemblyMarker = useRef(null); + const manufactureMarker = useRef(null); const outerGroup = useRef(null); const prevMousePos = useRef({ x: 0, y: 0 }); const { controls, raycaster, camera } = useThree(); @@ -31,9 +31,9 @@ function HumanUi() { const { updateEvent, getActionByUuid } = productStore(); const [startPosition, setStartPosition] = useState<[number, number, number]>([0, 1, 0]); const [endPosition, setEndPosition] = useState<[number, number, number]>([0, 1, 0]); - const [assemblyPosition, setAssemblyPosition] = useState<[number, number, number]>([0, 1, 0]); + const [manufacturePosition, setManufacturePosition] = useState<[number, number, number]>([0, 1, 0]); const [startRotation, setStartRotation] = useState<[number, number, number]>([0, Math.PI, 0]); - const [assemblyRotation, setAssemblyRotation] = useState<[number, number, number]>([0, 0, 0]); + const [manufactureRotation, setManufactureRotation] = useState<[number, number, number]>([0, 0, 0]); const [endRotation, setEndRotation] = useState<[number, number, number]>([0, 0, 0]); const { isDragging, setIsDragging } = useIsDragging(); const { isRotating, setIsRotating } = useIsRotating(); @@ -51,7 +51,7 @@ function HumanUi() { const { projectId } = useParams(); const currentAction = getActionByUuid(selectedProduct.productUuid, selectedAction.actionId || ''); - const isAssembly = currentAction?.actionType === 'assembly'; + const isManufacture = currentAction?.actionType === 'manufacturer'; const updateBackend = ( productName: string, @@ -90,15 +90,15 @@ function HumanUi() { const action = selectedHuman.point.actions.find(a => a.actionUuid === selectedAction.actionId); if (!action) return; - if (isAssembly) { - if (action.assemblyPoint?.position && outerGroup.current) { - const worldPos = new Vector3(...action.assemblyPoint.position); + if (isManufacture) { + if (action.manufacturePoint?.position && outerGroup.current) { + const worldPos = new Vector3(...action.manufacturePoint.position); const localPosition = outerGroup.current.worldToLocal(worldPos.clone()); - setAssemblyPosition([localPosition.x, 1, localPosition.z]); - setAssemblyRotation(action.assemblyPoint.rotation || [0, 0, 0]); + setManufacturePosition([localPosition.x, 1, localPosition.z]); + setManufactureRotation(action.manufacturePoint.rotation || [0, 0, 0]); } else { - setAssemblyPosition([0, 1, 0]); - setAssemblyRotation([0, 0, 0]); + setManufacturePosition([0, 1, 0]); + setManufactureRotation([0, 0, 0]); } } else { if (action.pickUpPoint?.position && outerGroup.current) { @@ -125,8 +125,8 @@ function HumanUi() { const handlePointerDown = ( e: any, - state: "start" | "end" | "assembly", - rotation: "start" | "end" | "assembly" + state: "start" | "end" | "manufacture", + rotation: "start" | "end" | "manufacture" ) => { e.stopPropagation(); const intersection = new Vector3(); @@ -153,7 +153,7 @@ function HumanUi() { const marker = state === "start" ? startMarker.current : state === "end" ? endMarker.current : - assemblyMarker.current; + manufactureMarker.current; if (marker && localPoint) { const markerPos = new Vector3().copy(marker.position); dragOffset.current.copy(markerPos.sub(localPoint)); @@ -176,17 +176,17 @@ function HumanUi() { const updatedActions = selectedHuman.point.actions.map(action => { if (action.actionUuid !== currentAction.actionUuid) return action; - if (isAssembly) { - if (!assemblyMarker.current || !outerGroup.current) return action; + if (isManufacture) { + if (!manufactureMarker.current || !outerGroup.current) return action; - const worldPosAssembly = new Vector3(...assemblyPosition); - const globalAssemblyPosition = outerGroup.current.localToWorld(worldPosAssembly.clone()); + const worldPosManufacture = new Vector3(...manufacturePosition); + const globalManufacturePosition = outerGroup.current.localToWorld(worldPosManufacture.clone()); return { ...action, - assemblyPoint: { - position: [globalAssemblyPosition.x, globalAssemblyPosition.y, globalAssemblyPosition.z] as [number, number, number], - rotation: assemblyRotation + manufacturePoint: { + position: [globalManufacturePosition.x, globalManufacturePosition.y, globalManufacturePosition.z] as [number, number, number], + rotation: manufactureRotation }, }; } else { @@ -246,8 +246,8 @@ function HumanUi() { setStartPosition([localPoint.x, 1, localPoint.z]); } else if (isDragging === "end") { setEndPosition([localPoint.x, 1, localPoint.z]); - } else if (isDragging === "assembly") { - setAssemblyPosition([localPoint.x, 1, localPoint.z]); + } else if (isDragging === "manufacture") { + setManufacturePosition([localPoint.x, 1, localPoint.z]); } }); @@ -260,7 +260,7 @@ function HumanUi() { const marker = isRotating === "start" ? startMarker.current : isRotating === "end" ? endMarker.current : - assemblyMarker.current; + manufactureMarker.current; if (marker) { const rotationSpeed = 10; @@ -279,7 +279,7 @@ function HumanUi() { marker.rotation.z, ]); } else { - setAssemblyRotation([ + setManufactureRotation([ marker.rotation.x, marker.rotation.y, marker.rotation.z, @@ -303,7 +303,7 @@ function HumanUi() { return () => { window.removeEventListener("pointerup", handleGlobalPointerUp); }; - }, [isDragging, isRotating, startPosition, startRotation, endPosition, endRotation, assemblyPosition, assemblyRotation]); + }, [isDragging, isRotating, startPosition, startRotation, endPosition, endRotation, manufacturePosition, manufactureRotation]); return ( <> @@ -313,16 +313,16 @@ function HumanUi() { ref={outerGroup} rotation={[0, Math.PI, 0]} > - {isAssembly ? ( + {isManufacture ? ( ) } } else if (model.type === 'human') { const action = getActionByUuid(selectedProduct.productUuid, agvDetail.point.action.actionUuid); - if (action && (triggeredAction?.actionType === 'assembly' || triggeredAction?.actionType === 'worker')) { + if (action && (triggeredAction?.actionType === 'manufacturer' || triggeredAction?.actionType === 'worker')) { handleMaterialDropToHuman(model, triggeredAction); } } else if (model.type === 'crane') { diff --git a/app/src/store/simulation/useSimulationStore.ts b/app/src/store/simulation/useSimulationStore.ts index 2220afd..d1240bb 100644 --- a/app/src/store/simulation/useSimulationStore.ts +++ b/app/src/store/simulation/useSimulationStore.ts @@ -203,8 +203,8 @@ export const useSelectedAnimation = create()( ); interface IsDraggingState { - isDragging: "start" | "end" | "assembly" | null; - setIsDragging: (state: "start" | "end" | "assembly" | null) => void; + isDragging: "start" | "end" | "manufacture" | null; + setIsDragging: (state: "start" | "end" | "manufacture" | null) => void; } export const useIsDragging = create()( @@ -219,8 +219,8 @@ export const useIsDragging = create()( ); interface IsRotatingState { - isRotating: "start" | "end" | "assembly" | null; - setIsRotating: (state: "start" | "end" | "assembly" | null) => void; + isRotating: "start" | "end" | "manufacture" | null; + setIsRotating: (state: "start" | "end" | "manufacture" | null) => void; } export const useIsRotating = create()( diff --git a/app/src/types/simulationTypes.d.ts b/app/src/types/simulationTypes.d.ts index 1578b5a..abff4bc 100644 --- a/app/src/types/simulationTypes.d.ts +++ b/app/src/types/simulationTypes.d.ts @@ -96,14 +96,14 @@ interface StorageAction { interface HumanAction { actionUuid: string; actionName: string; - actionType: "worker" | "assembly" | "operator"; + actionType: "worker" | "manufacturer" | "operator"; processTime: number; swapMaterial?: string; - assemblyPoint?: { position: [number, number, number] | null; rotation: [number, number, number] | null; } + manufacturePoint?: { position: [number, number, number] | null; rotation: [number, number, number] | null; } pickUpPoint?: { position: [number, number, number] | null; rotation: [number, number, number] | null; } dropPoint?: { position: [number, number, number] | null; rotation: [number, number, number] | null; } loadCount: number; - assemblyCount: number; + manufactureCount: number; loadCapacity: number; triggers: TriggerSchema[]; } @@ -324,11 +324,11 @@ interface CraneStatus extends CraneEventSchema { type HumanEventState = { humanId: string; actionQueue: { - actionType: 'worker' | 'assembly' | 'operator'; + actionType: 'worker' | 'manufacturer' | 'operator'; actionUuid: string; actionName: string; maxLoadCount: number; - maxAssemblyCount: number; + maxManufactureCount: number; count?: number; isMonitored: boolean; isCompleted: boolean;