refactor: update backend URL and added conveyor event storing in ackend

This commit is contained in:
2025-04-01 14:25:42 +05:30
parent 6f483baf8d
commit 526befad20
20 changed files with 173 additions and 72 deletions

View File

@@ -2,9 +2,9 @@ import { toast } from 'react-toastify';
import * as THREE from 'three';
import * as Types from "../../../../types/world/worldTypes";
import { getFloorItems } from '../../../../services/factoryBuilder/assest/floorAsset/getFloorItemsApi';
// import { deleteFloorItem } from '../../../../services/factoryBuilder/assest/floorAsset/deleteFloorItemApi';
import { Socket } from 'socket.io-client';
import { getFloorAssets } from '../../../../services/factoryBuilder/assest/floorAsset/getFloorItemsApi';
async function DeleteFloorItems(
itemsGroup: Types.RefGroup,
@@ -20,7 +20,7 @@ async function DeleteFloorItems(
const email = localStorage.getItem('email')
const organization = (email!.split("@")[1]).split(".")[0];
const items = await getFloorItems(organization);
const items = await getFloorAssets(organization);
const removedItem = items.find(
(item: { modeluuid: string }) => item.modeluuid === hoveredDeletableFloorItem.current?.uuid
);
@@ -42,7 +42,7 @@ async function DeleteFloorItems(
socketId: socket.id
}
const response = socket.emit('v1:FloorItems:delete', data)
const response = socket.emit('v2:model-asset:delete', data)
if (response) {
const updatedItems = items.filter(