AssetPoint position changed for the StaticMachive and Floatwidget iconName added

This commit is contained in:
2025-04-16 18:32:18 +05:30
parent b65fda8389
commit ff79647e44
6 changed files with 18 additions and 9 deletions

2
.env
View File

@@ -1,4 +1,4 @@
# MONGO_URI=mongodb://192.168.0.111/
# MONGO_URI=mongodb://192.168.0.110/
# MONGO_USER=mydata
# MONGO_PASSWORD=mongodb@hexr2002
# MONGO_AUTH_DB=admin

View File

@@ -92,7 +92,8 @@ export class pointService {
if (type === "Conveyor") {
const baseData = {
modelfileID: "672a090f80d91ac979f4d0bd",
// modelfileID: "672a090f80d91ac979f4d0bd",
modelfileID: "7dc04e36882e4debbc1a8e3d",
type: "Conveyor",
};
const conveyorPoints: IPointConveyor[] = [
@@ -194,7 +195,8 @@ export class pointService {
} else if (type === "Vehicle") {
console.log("vehcile data");
const baseData = {
modelfileID: "67e3da19c2e8f37134526e6a",
// modelfileID: "67e3da19c2e8f37134526e6a",
modelfileID: "a1ee92554935007b10b3eb05",
type: "Vehicle",
};
const vehiclePoint: IPointVehicle = {
@@ -229,7 +231,8 @@ export class pointService {
} else if (type === "ArmBot") {
console.log("ArmBot data");
const baseData = {
modelfileID: "67eb7904c2e8f37134527eae",
// modelfileID: "67eb7904c2e8f37134527eae",
modelfileID: "52e6681fbb743a890d96c914",
type: "ArmBot",
};
const ArmBotPoint: IPointArmbot = {
@@ -266,12 +269,13 @@ export class pointService {
} else if (type === "StaticMachine") {
console.log("StaticMachine data");
const baseData = {
modelfileID: "67e3db5ac2e8f37134526f40",
// modelfileID: "67e3db5ac2e8f37134526f40",
modelfileID: "ca164ffdfa74f6622536bb0f",
type: "StaticMachine",
};
const StaticMachinePoint: IPointStaticMachine = {
uuid: "point1UUID",
position: [0, 1.5, -0.5],
position: [-0.25, 1.5, 0.85],
rotation: [0, 0, 0],
actions: {
uuid: "randomUUID",

View File

@@ -71,8 +71,8 @@ export class widget3dService {
const zonebasedWidget = widgetData.map((widget) => ({
Data: {
measurements: widget.Data?.measurements || {},
duration: widget.Data?.duration || "1h",
measurements: widget?.Data?.measurements || {},
duration: widget?.Data?.duration || "1h",
},
type: widget.type,
id: widget.widgetID,

View File

@@ -47,6 +47,7 @@ export class floatWidgetService {
const newFloadWidget = await floatWidgetModel(organization).create({
className: widget.className,
iconName: widget.iconName,
header: widget.header,
floatWidgetID: widget.id,
position: widget.position,
@@ -87,6 +88,7 @@ export class floatWidgetService {
duration: widget.Data?.duration || "1h",
},
className: widget.className,
iconName: widget?.iconName,
header: widget.header,
id: widget.floatWidgetID,
position: widget.position,

View File

@@ -3,6 +3,7 @@ import MainModel from "../../connect/mongoose.ts";
export interface floatingWidget extends Document {
className: string;
iconName: string;
header: string;
floatWidgetID: string;
position: {};
@@ -18,6 +19,7 @@ export interface floatingWidget extends Document {
const floatingWidgetSchema: Schema = new Schema(
{
className: { type: String },
iconName: { type: String },
header: { type: String },
floatWidgetID: { type: String },
position: { type: Object },

View File

@@ -3,7 +3,7 @@ import zoneSchema from "../../../shared/model/builder/lines/zone-Model.ts";
export const addfloat = async (data: any) => {
const { organization, widget, zoneId, index } = data;
console.log('data:create ', data);
console.log("data:create ", data);
try {
const existingZone = await zoneSchema(organization).findOne({
zoneId: zoneId,
@@ -61,6 +61,7 @@ export const addfloat = async (data: any) => {
} else {
const newFloadWidget = await floatWidgetModel(organization).create({
className: widget.className,
iconName: widget.iconName,
header: widget.header,
floatWidgetID: widget.id,
position: widget.position,