refactor: Update connection identifiers from pathUUID to modelUUID across simulation components

This commit is contained in:
2025-04-05 15:15:01 +05:30
parent 1cc877aee1
commit b89589d8ea
10 changed files with 162 additions and 86 deletions

View File

@@ -183,7 +183,7 @@ const CopyPasteControls = ({ itemsGroupRef, copiedObjects, setCopiedObjects, pas
: [defaultAction],
triggers: (eventData as Types.ConveyorEventsSchema)?.points[index].triggers,
connections: {
source: { pathUUID: obj.uuid, pointUUID },
source: { modelUUID: obj.uuid, pointUUID },
targets: []
}
};

View File

@@ -165,7 +165,7 @@ const DuplicationControls = ({ itemsGroupRef, duplicatedObjects, setDuplicatedOb
: [defaultAction],
triggers: (eventData as Types.ConveyorEventsSchema)?.points[index].triggers,
connections: {
source: { pathUUID: obj.uuid, pointUUID },
source: { modelUUID: newFloorItem.modeluuid, pointUUID },
targets: []
}
};
@@ -221,7 +221,8 @@ const DuplicationControls = ({ itemsGroupRef, duplicatedObjects, setDuplicatedOb
newEventData as Types.ConveyorEventsSchema
]);
socket.emit("v2:model-asset:add", data);
console.log('data: ', data);
// socket.emit("v2:model-asset:add", data);
} else if (eventData.type === 'Vehicle' && eventData) {
const createVehiclePoint = () => {

View File

@@ -185,7 +185,7 @@ function MoveControls({ movedObjects, setMovedObjects, itemsGroupRef, copiedObje
const email = localStorage.getItem("email");
const organization = email ? email.split("@")[1].split(".")[0] : "default";
if (eventData) {
if (eventData && eventData.type !== 'StaticMachine') {
if (eventData.type === 'Conveyor' && eventData) {
const backendEventData = {

View File

@@ -189,7 +189,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
const email = localStorage.getItem("email");
const organization = email ? email.split("@")[1].split(".")[0] : "default";
if (eventData) {
if (eventData && eventData.type !== 'StaticMachine') {
if (eventData.type === 'Conveyor' && eventData) {
const backendEventData = {
@@ -298,7 +298,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
}
} else {
console.log('hii');
//REST