Add versionId parameter to addingWidgets function and update widget calls
This commit is contained in:
@@ -43,11 +43,11 @@ const Progress2Input = (props: Props) => {
|
||||
setDropDownData(response.data);
|
||||
setLoading(false);
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
echo.error("Failed to fetch zone data");
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
fetchZoneData();
|
||||
@@ -69,16 +69,16 @@ const Progress2Input = (props: Props) => {
|
||||
}
|
||||
);
|
||||
if (response.status === 200) {
|
||||
|
||||
|
||||
setSelections(response.data.Datastructure.measurements);
|
||||
setDuration(response.data.Datastructure.duration);
|
||||
setWidgetName(response.data.widgetName);
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
echo.error("Failed to fetch saved inputs");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -108,7 +108,7 @@ const Progress2Input = (props: Props) => {
|
||||
duration: inputDuration,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// const adding3dWidget = {
|
||||
// organization: organization,
|
||||
// widget: newWidget,
|
||||
@@ -119,14 +119,14 @@ const Progress2Input = (props: Props) => {
|
||||
// visualizationSocket.emit("v1:viz-3D-widget:add", adding3dWidget);
|
||||
// }
|
||||
|
||||
let response = await addingWidgets(selectedZone.zoneUuid, organization, newWidget,projectId);
|
||||
|
||||
if(response.message==="Widget updated successfully"){
|
||||
let response = await addingWidgets(selectedZone.zoneUuid, organization, newWidget, projectId, selectedVersion?.versionId || "");
|
||||
|
||||
if (response.message === "Widget updated successfully") {
|
||||
|
||||
return true;
|
||||
}else{
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
// try {
|
||||
|
||||
Reference in New Issue
Block a user