1. Integerated DashBoard, #97

Merged
Marikannan merged 31 commits from v3-wall into main 2025-06-04 12:09:09 +00:00
17 changed files with 37 additions and 40 deletions
Showing only changes of commit 9823404961 - Show all commits

View File

@ -142,7 +142,7 @@ const BarChartInput = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -127,7 +127,7 @@ const FleetEfficiencyInputComponent = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -126,7 +126,7 @@ const FlotingWidgetInput = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -257,7 +257,7 @@ const LineGrapInput = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -142,7 +142,7 @@ const PieChartInput = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -142,7 +142,7 @@ const Progress1Input = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -142,7 +142,7 @@ const Progress2Input = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -123,7 +123,7 @@ const WarehouseThroughputInputComponent = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -122,7 +122,7 @@ const Widget2InputCard3D = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -119,7 +119,7 @@ const Widget3InputCard3D = () => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -122,7 +122,7 @@ const Widget4InputCard3D = (props: Props) => {
newSelections[inputKey] = selectedData;
}
// setMeasurements(newSelections); // Update Zustand store
console.log(newSelections);
// console.log(newSelections);
if (await sendInputes(newSelections, duration, widgetName)) {
setSelections(newSelections);
}

View File

@ -44,6 +44,7 @@ function deletePoint(
projectId,userId
}
console.log('data: ', data);
socket.emit('v1:Line:delete:point', data);
////////// Update onlyFloorlines.current to remove references to the deleted point //////////

View File

@ -71,27 +71,27 @@ export default function SocketResponses({
if (!socket) return;
socket.on("cameraCreateResponse", (data: any) => {
// console.log('data: ', data);
//
});
socket.on("userConnectRespones", (data: any) => {
// console.log('data: ', data);
//
});
socket.on("userDisConnectRespones", (data: any) => {
// console.log('data: ', data);
//
});
socket.on("v1:camera:Response:update", (data: any) => {
// console.log('data: ', data);
//
});
socket.on("EnvironmentUpdateResponse", (data: any) => {
// console.log('data: ', data);
//
});
socket.on("v1:model-asset:response:add", async (data: any) => {
// console.log('data: ', data);
//
if (socket.id === data.socketId) {
return;
}
@ -113,7 +113,7 @@ export default function SocketResponses({
const cachedModel = THREE.Cache.get(data.data.modelName);
let url;
if (cachedModel) {
// console.log(`Getting ${data.data.modelName} from cache`);
//
const model = cachedModel.scene.clone();
model.uuid = data.data.modelUuid;
model.userData = {
@ -188,10 +188,10 @@ export default function SocketResponses({
} else {
const indexedDBModel = await retrieveGLTF(data.data.modelName);
if (indexedDBModel) {
// console.log(`Getting ${data.data.modelName} from IndexedDB`);
//
url = URL.createObjectURL(indexedDBModel);
} else {
// console.log(`Getting ${data.data.modelName} from Backend`);
//
url = `${url_Backend_dwinzo}/api/v2/AssetFile/${data.data.modelfileID}`;
const modelBlob = await fetch(url).then((res) => res.blob());
await storeGLTF(data.data.modelfileID, modelBlob);
@ -203,7 +203,7 @@ export default function SocketResponses({
}
} catch (error) {
echo.error("Failed to update responce");
console.error("Error fetching asset model:", error);
}
function loadModel(url: string) {
@ -338,7 +338,7 @@ export default function SocketResponses({
}
});
socket.on("v1:model-asset:response:add", (data: any) => {
socket.on("v1:model-asset:response:delete", (data: any) => {
if (socket.id === data.socketId) {
return;
}
@ -413,6 +413,7 @@ export default function SocketResponses({
});
socket.on("v1:Line:response:delete", (data: any) => {
console.log('data: ', data);
if (socket.id === data.socketId) {
return;
}
@ -494,6 +495,7 @@ export default function SocketResponses({
});
socket.on("v1:Line:response:delete:point", (data: any) => {
console.log('datapoint: ', data);
if (socket.id === data.socketId) {
return;
}
@ -534,6 +536,7 @@ export default function SocketResponses({
});
socket.on("v1:Line:response:delete:layer", async (data: any) => {
console.log('data: ', data);
if (socket.id === data.socketId) {
return;
}
@ -702,7 +705,7 @@ export default function SocketResponses({
});
socket.on("v1:wallItems:Response:Update", (data: any) => {
// console.log('data: ', data);
//
if (socket.id === data.socketId) {
return;
}
@ -745,7 +748,7 @@ export default function SocketResponses({
THREE.Cache.add(data.data.modelfileID, gltf);
await handleModelLoad(gltf);
} catch (error) {
console.error('Failed to cache model:', error);
handleModelLoad(gltf);
}
});
@ -865,7 +868,7 @@ export default function SocketResponses({
const organization = email!.split("@")[1].split(".")[0];
socket.on("v1:Line:response:create", async (data: any) => {
// console.log('data: ', data);
//
if (socket.id === data.socketId) {
return;
}

View File

@ -178,9 +178,9 @@ const DisplayZone: React.FC<DisplayZoneProps> = ({
const organization = email?.split("@")[1]?.split(".")[0];
let response = await getSelect2dZoneData(zoneUuid, organization, projectId);
console.log('response2d: ', response);
// console.log('response2d: ', response);
let res = await getFloatingZoneData(zoneUuid, organization, projectId);
console.log("resFloating: ", res);
// console.log("resFloating: ", res);
setFloatingWidget(res);
// Set the selected zone in the store

View File

@ -18,10 +18,9 @@ export const getCamera = async (organization: string, userId: string,projectId?:
}
);
// console.log('response: ', response);
// if (!response.ok) {
// throw new Error("Failed to get Camera position and target");
// }
if (!response.ok) {
throw new Error("Failed to get Camera position and target");
}
const result = await response.json();
// console.log('result: ', result);

View File

@ -23,7 +23,7 @@ export const findEnvironment = async (organization: string, userId: string, proj
}
const result = await response.json();
console.log('resultgetenv: ', result);
// console.log('resultgetenv: ', result);
if (result === "user not found") {
const userpos = setEnvironment(
organization,

View File

@ -10,13 +10,7 @@ export const setEnvironment = async (
limitDistance: boolean,
projectId?: string
) => {
console.log('organization,userId,wallVisibility,roofVisibility,shadowVisibility,renderDistance,limitDistance,: ', organization,
userId,
wallVisibility,
roofVisibility,
shadowVisibility,
renderDistance,
limitDistance,projectId);
try {
const response = await fetch(
`${url_Backend_dwinzo}/api/V1/SetEnvironments`,
@ -48,7 +42,7 @@ export const setEnvironment = async (
}
const result = await response.json();
console.log('resultsetenv: ', result);
// console.log('resultsetenv: ', result);
return result;
} catch (error) {
echo.error("Failed to set env");