Refactor model identifier naming conventions from 'modeluuid' and 'modelname' to 'modelUuid' and 'modelName' across multiple modules for consistency and clarity. Update related API calls and local storage handling to reflect these changes. Remove unused deleteProductDataApi service and implement deleteProductApi service for product data deletion. Introduce steeringAngle property in vehicle configurations.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
||||
|
||||
export const deleteFloorItem = async (organization: string, modeluuid: string, modelname: string) => {
|
||||
export const deleteFloorItem = async (organization: string, modelUuid: string, modelName: string) => {
|
||||
try {
|
||||
const response = await fetch(`${url_Backend_dwinzo}/api/v1/deletefloorItem`, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ organization, modeluuid, modelname }),
|
||||
body: JSON.stringify({ organization, modelUuid, modelName }),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
||||
export const setFloorItemApi = async (
|
||||
organization: string,
|
||||
modeluuid?: string,
|
||||
modelname?: string,
|
||||
modelUuid?: string,
|
||||
modelName?: string,
|
||||
modelfileID?: string,
|
||||
position?: Object,
|
||||
rotation?: Object,
|
||||
@@ -10,7 +10,7 @@ export const setFloorItemApi = async (
|
||||
isVisible?: boolean,
|
||||
) => {
|
||||
try {
|
||||
const body: any = { organization, modeluuid, modelname, position, rotation, modelfileID, isLocked, isVisible };
|
||||
const body: any = { organization, modelUuid, modelName, position, rotation, modelfileID, isLocked, isVisible };
|
||||
|
||||
const response = await fetch(`${url_Backend_dwinzo}/api/v2/setasset`, {
|
||||
method: "POST",
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
||||
|
||||
export const deleteWallItem = async (organization: string, modeluuid: string, modelname: string) => {
|
||||
export const deleteWallItem = async (organization: string, modelUuid: string, modelName: string) => {
|
||||
try {
|
||||
const response = await fetch(`${url_Backend_dwinzo}/api/v1/deleteWallItem`, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ organization, modeluuid, modelname }),
|
||||
body: JSON.stringify({ organization, modelUuid, modelName }),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
@@ -2,8 +2,8 @@ let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_UR
|
||||
|
||||
export const setWallItem = async (
|
||||
organization: string,
|
||||
modeluuid: string,
|
||||
modelname: string,
|
||||
modelUuid: string,
|
||||
modelName: string,
|
||||
type: string,
|
||||
csgposition: Object,
|
||||
csgscale: Object,
|
||||
@@ -17,7 +17,7 @@ export const setWallItem = async (
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ organization, modeluuid, modelname, position, type, csgposition, csgscale, quaternion, scale }),
|
||||
body: JSON.stringify({ organization, modelUuid, modelName, position, type, csgposition, csgscale, quaternion, scale }),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
@@ -21,7 +21,7 @@ onmessage = (event) => {
|
||||
const itemPosition = new THREE.Vector3(...item.position);
|
||||
const distance = cameraPos.distanceTo(itemPosition);
|
||||
|
||||
if (distance <= renderDistance && !uuids.includes(item.modeluuid)) {
|
||||
if (distance <= renderDistance && !uuids.includes(item.modelUuid)) {
|
||||
toAdd.push(item);
|
||||
}
|
||||
});
|
||||
@@ -35,7 +35,7 @@ onmessage = (event) => {
|
||||
|
||||
// Check for items to be removed
|
||||
uuids.forEach((uuid) => {
|
||||
const floorItem = floorItems.find((item) => item.modeluuid === uuid);
|
||||
const floorItem = floorItems.find((item) => item.modelUuid === uuid);
|
||||
if (floorItem) {
|
||||
const itemPosition = new THREE.Vector3(...floorItem.position);
|
||||
const distance = cameraPos.distanceTo(itemPosition);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
||||
|
||||
export const deleteProductDataApi = async (productId: string, organization: string) => {
|
||||
export const deleteProductApi = async (productId: string, organization: string) => {
|
||||
try {
|
||||
const response = await fetch(`${url_Backend_dwinzo}/api/v2/productDataDelete?productId=${productId}&organization=${organization}`, {
|
||||
method: "PATCH",
|
||||
Reference in New Issue
Block a user