AssetPoint position changed for the StaticMachive and Floatwidget iconName added
This commit is contained in:
2
.env
2
.env
@@ -1,4 +1,4 @@
|
|||||||
# MONGO_URI=mongodb://192.168.0.111/
|
# MONGO_URI=mongodb://192.168.0.110/
|
||||||
# MONGO_USER=mydata
|
# MONGO_USER=mydata
|
||||||
# MONGO_PASSWORD=mongodb@hexr2002
|
# MONGO_PASSWORD=mongodb@hexr2002
|
||||||
# MONGO_AUTH_DB=admin
|
# MONGO_AUTH_DB=admin
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ export class pointService {
|
|||||||
|
|
||||||
if (type === "Conveyor") {
|
if (type === "Conveyor") {
|
||||||
const baseData = {
|
const baseData = {
|
||||||
modelfileID: "672a090f80d91ac979f4d0bd",
|
// modelfileID: "672a090f80d91ac979f4d0bd",
|
||||||
|
modelfileID: "7dc04e36882e4debbc1a8e3d",
|
||||||
type: "Conveyor",
|
type: "Conveyor",
|
||||||
};
|
};
|
||||||
const conveyorPoints: IPointConveyor[] = [
|
const conveyorPoints: IPointConveyor[] = [
|
||||||
@@ -194,7 +195,8 @@ export class pointService {
|
|||||||
} else if (type === "Vehicle") {
|
} else if (type === "Vehicle") {
|
||||||
console.log("vehcile data");
|
console.log("vehcile data");
|
||||||
const baseData = {
|
const baseData = {
|
||||||
modelfileID: "67e3da19c2e8f37134526e6a",
|
// modelfileID: "67e3da19c2e8f37134526e6a",
|
||||||
|
modelfileID: "a1ee92554935007b10b3eb05",
|
||||||
type: "Vehicle",
|
type: "Vehicle",
|
||||||
};
|
};
|
||||||
const vehiclePoint: IPointVehicle = {
|
const vehiclePoint: IPointVehicle = {
|
||||||
@@ -229,7 +231,8 @@ export class pointService {
|
|||||||
} else if (type === "ArmBot") {
|
} else if (type === "ArmBot") {
|
||||||
console.log("ArmBot data");
|
console.log("ArmBot data");
|
||||||
const baseData = {
|
const baseData = {
|
||||||
modelfileID: "67eb7904c2e8f37134527eae",
|
// modelfileID: "67eb7904c2e8f37134527eae",
|
||||||
|
modelfileID: "52e6681fbb743a890d96c914",
|
||||||
type: "ArmBot",
|
type: "ArmBot",
|
||||||
};
|
};
|
||||||
const ArmBotPoint: IPointArmbot = {
|
const ArmBotPoint: IPointArmbot = {
|
||||||
@@ -266,12 +269,13 @@ export class pointService {
|
|||||||
} else if (type === "StaticMachine") {
|
} else if (type === "StaticMachine") {
|
||||||
console.log("StaticMachine data");
|
console.log("StaticMachine data");
|
||||||
const baseData = {
|
const baseData = {
|
||||||
modelfileID: "67e3db5ac2e8f37134526f40",
|
// modelfileID: "67e3db5ac2e8f37134526f40",
|
||||||
|
modelfileID: "ca164ffdfa74f6622536bb0f",
|
||||||
type: "StaticMachine",
|
type: "StaticMachine",
|
||||||
};
|
};
|
||||||
const StaticMachinePoint: IPointStaticMachine = {
|
const StaticMachinePoint: IPointStaticMachine = {
|
||||||
uuid: "point1UUID",
|
uuid: "point1UUID",
|
||||||
position: [0, 1.5, -0.5],
|
position: [-0.25, 1.5, 0.85],
|
||||||
rotation: [0, 0, 0],
|
rotation: [0, 0, 0],
|
||||||
actions: {
|
actions: {
|
||||||
uuid: "randomUUID",
|
uuid: "randomUUID",
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ export class widget3dService {
|
|||||||
|
|
||||||
const zonebasedWidget = widgetData.map((widget) => ({
|
const zonebasedWidget = widgetData.map((widget) => ({
|
||||||
Data: {
|
Data: {
|
||||||
measurements: widget.Data?.measurements || {},
|
measurements: widget?.Data?.measurements || {},
|
||||||
duration: widget.Data?.duration || "1h",
|
duration: widget?.Data?.duration || "1h",
|
||||||
},
|
},
|
||||||
type: widget.type,
|
type: widget.type,
|
||||||
id: widget.widgetID,
|
id: widget.widgetID,
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export class floatWidgetService {
|
|||||||
|
|
||||||
const newFloadWidget = await floatWidgetModel(organization).create({
|
const newFloadWidget = await floatWidgetModel(organization).create({
|
||||||
className: widget.className,
|
className: widget.className,
|
||||||
|
iconName: widget.iconName,
|
||||||
header: widget.header,
|
header: widget.header,
|
||||||
floatWidgetID: widget.id,
|
floatWidgetID: widget.id,
|
||||||
position: widget.position,
|
position: widget.position,
|
||||||
@@ -87,6 +88,7 @@ export class floatWidgetService {
|
|||||||
duration: widget.Data?.duration || "1h",
|
duration: widget.Data?.duration || "1h",
|
||||||
},
|
},
|
||||||
className: widget.className,
|
className: widget.className,
|
||||||
|
iconName: widget?.iconName,
|
||||||
header: widget.header,
|
header: widget.header,
|
||||||
id: widget.floatWidgetID,
|
id: widget.floatWidgetID,
|
||||||
position: widget.position,
|
position: widget.position,
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import MainModel from "../../connect/mongoose.ts";
|
|||||||
|
|
||||||
export interface floatingWidget extends Document {
|
export interface floatingWidget extends Document {
|
||||||
className: string;
|
className: string;
|
||||||
|
iconName: string;
|
||||||
header: string;
|
header: string;
|
||||||
floatWidgetID: string;
|
floatWidgetID: string;
|
||||||
position: {};
|
position: {};
|
||||||
@@ -18,6 +19,7 @@ export interface floatingWidget extends Document {
|
|||||||
const floatingWidgetSchema: Schema = new Schema(
|
const floatingWidgetSchema: Schema = new Schema(
|
||||||
{
|
{
|
||||||
className: { type: String },
|
className: { type: String },
|
||||||
|
iconName: { type: String },
|
||||||
header: { type: String },
|
header: { type: String },
|
||||||
floatWidgetID: { type: String },
|
floatWidgetID: { type: String },
|
||||||
position: { type: Object },
|
position: { type: Object },
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import zoneSchema from "../../../shared/model/builder/lines/zone-Model.ts";
|
|||||||
|
|
||||||
export const addfloat = async (data: any) => {
|
export const addfloat = async (data: any) => {
|
||||||
const { organization, widget, zoneId, index } = data;
|
const { organization, widget, zoneId, index } = data;
|
||||||
console.log('data:create ', data);
|
console.log("data:create ", data);
|
||||||
try {
|
try {
|
||||||
const existingZone = await zoneSchema(organization).findOne({
|
const existingZone = await zoneSchema(organization).findOne({
|
||||||
zoneId: zoneId,
|
zoneId: zoneId,
|
||||||
@@ -61,6 +61,7 @@ export const addfloat = async (data: any) => {
|
|||||||
} else {
|
} else {
|
||||||
const newFloadWidget = await floatWidgetModel(organization).create({
|
const newFloadWidget = await floatWidgetModel(organization).create({
|
||||||
className: widget.className,
|
className: widget.className,
|
||||||
|
iconName: widget.iconName,
|
||||||
header: widget.header,
|
header: widget.header,
|
||||||
floatWidgetID: widget.id,
|
floatWidgetID: widget.id,
|
||||||
position: widget.position,
|
position: widget.position,
|
||||||
|
|||||||
Reference in New Issue
Block a user