feat: Add projectId parameter to setFloorItemApi and update related components in MainScene and List
This commit is contained in:
parent
4a2f1b64e3
commit
526e962388
|
@ -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 = {
|
||||
|
|
|
@ -144,6 +144,11 @@ const List: React.FC<ListProps> = ({ items = [], remove }) => {
|
|||
organization,
|
||||
zoneAssetId.id,
|
||||
newName,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
projectId
|
||||
);
|
||||
// console.log("response: ", response);
|
||||
|
|
|
@ -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`, {
|
||||
|
|
Loading…
Reference in New Issue