Merge remote-tracking branch 'origin/v3-agv' into v3-ui
This commit is contained in:
commit
643e1a2dc0
|
@ -64,12 +64,18 @@ function MainScene() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleObjectRename = async (newName: string) => {
|
const handleObjectRename = async (newName: string) => {
|
||||||
|
if (!projectId) return
|
||||||
const email = localStorage.getItem("email") ?? "";
|
const email = localStorage.getItem("email") ?? "";
|
||||||
const organization = email?.split("@")[1]?.split(".")[0];
|
const organization = email?.split("@")[1]?.split(".")[0];
|
||||||
let response = await setFloorItemApi(
|
let response = await setFloorItemApi(
|
||||||
organization,
|
organization,
|
||||||
selectedFloorItem.userData.modelUuid,
|
selectedFloorItem.userData.modelUuid,
|
||||||
newName,
|
newName,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
projectId
|
projectId
|
||||||
);
|
);
|
||||||
selectedFloorItem.userData = {
|
selectedFloorItem.userData = {
|
||||||
|
|
|
@ -144,10 +144,15 @@ const List: React.FC<ListProps> = ({ items = [], remove }) => {
|
||||||
organization,
|
organization,
|
||||||
zoneAssetId.id,
|
zoneAssetId.id,
|
||||||
newName,
|
newName,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
projectId
|
projectId
|
||||||
);
|
);
|
||||||
// console.log("response: ", response);
|
// console.log("response: ", response);
|
||||||
console.log(' zoneAssetId.id,: ', zoneAssetId.id,);
|
console.log(' zoneAssetId.id,: ', zoneAssetId.id,);
|
||||||
|
|
||||||
setName(zoneAssetId.id, response.modelName);
|
setName(zoneAssetId.id, response.modelName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,23 +4,23 @@ export const setFloorItemApi = async (
|
||||||
modelUuid?: string,
|
modelUuid?: string,
|
||||||
modelName?: string,
|
modelName?: string,
|
||||||
assetId?: string,
|
assetId?: string,
|
||||||
projectId?: string,
|
|
||||||
position?: Object,
|
position?: Object,
|
||||||
rotation?: Object,
|
rotation?: Object,
|
||||||
isLocked?: boolean,
|
isLocked?: boolean,
|
||||||
isVisible?: boolean
|
isVisible?: boolean,
|
||||||
|
projectId?: string
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
const body: any = {
|
const body: any = {
|
||||||
organization,
|
organization,
|
||||||
modelUuid,
|
modelUuid,
|
||||||
modelName,
|
modelName,
|
||||||
projectId,
|
|
||||||
position,
|
position,
|
||||||
rotation,
|
rotation,
|
||||||
assetId,
|
assetId,
|
||||||
isLocked,
|
isLocked,
|
||||||
isVisible,
|
isVisible,
|
||||||
|
projectId,
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await fetch(`${url_Backend_dwinzo}/api/V1/setAsset`, {
|
const response = await fetch(`${url_Backend_dwinzo}/api/V1/setAsset`, {
|
||||||
|
|
Loading…
Reference in New Issue