feat: Add projectId parameter to setFloorItemApi and update related components in MainScene and List

This commit is contained in:
Poovizhi99 2025-06-12 09:44:53 +05:30
parent 4a2f1b64e3
commit 526e962388
3 changed files with 15 additions and 4 deletions

View File

@ -64,12 +64,18 @@ function MainScene() {
}
};
const handleObjectRename = async (newName: string) => {
if (!projectId) return
const email = localStorage.getItem("email") ?? "";
const organization = email?.split("@")[1]?.split(".")[0];
let response = await setFloorItemApi(
organization,
selectedFloorItem.userData.modelUuid,
newName,
undefined,
undefined,
undefined,
undefined,
undefined,
projectId
);
selectedFloorItem.userData = {

View File

@ -144,10 +144,15 @@ const List: React.FC<ListProps> = ({ items = [], remove }) => {
organization,
zoneAssetId.id,
newName,
undefined,
undefined,
undefined,
undefined,
undefined,
projectId
);
// console.log("response: ", response);
console.log(' zoneAssetId.id,: ', zoneAssetId.id,);
console.log(' zoneAssetId.id,: ', zoneAssetId.id,);
setName(zoneAssetId.id, response.modelName);
}

View File

@ -3,24 +3,24 @@ export const setFloorItemApi = async (
organization: string,
modelUuid?: string,
modelName?: string,
projectId?: string,
modelfileID?: string,
position?: Object,
rotation?: Object,
isLocked?: boolean,
isVisible?: boolean
isVisible?: boolean,
projectId?: string
) => {
try {
const body: any = {
organization,
modelUuid,
modelName,
projectId,
position,
rotation,
modelfileID,
isLocked,
isVisible,
projectId,
};
const response = await fetch(`${url_Backend_dwinzo}/api/V1/setAsset`, {