diff --git a/src/components/Project/Infrastructure/BuildingModel.jsx b/src/components/Project/Infrastructure/BuildingModel.jsx index 5229e93b..bc72c682 100644 --- a/src/components/Project/Infrastructure/BuildingModel.jsx +++ b/src/components/Project/Infrastructure/BuildingModel.jsx @@ -88,7 +88,7 @@ const BuildingModel = ({ name: "", description: "", }); - if (data.Id !== "0") { + if (data.Id !== null) { showToast("Building updated successfully.", "success"); } else { showToast("Building created successfully.", "success"); diff --git a/src/components/Project/Infrastructure/FloorModel.jsx b/src/components/Project/Infrastructure/FloorModel.jsx index e10aa511..f41cbbe8 100644 --- a/src/components/Project/Infrastructure/FloorModel.jsx +++ b/src/components/Project/Infrastructure/FloorModel.jsx @@ -104,7 +104,7 @@ const FloorModel = ({ reset({ floorName: "", }); - if (data.id !== "0") { + if (data.id !== null) { showToast("Floor updated successfully.", "success"); } else { showToast("Floor created successfully.", "success"); diff --git a/src/components/Project/Infrastructure/WorkAreaModel.jsx b/src/components/Project/Infrastructure/WorkAreaModel.jsx index 92a260ea..75711372 100644 --- a/src/components/Project/Infrastructure/WorkAreaModel.jsx +++ b/src/components/Project/Infrastructure/WorkAreaModel.jsx @@ -115,7 +115,7 @@ const WorkAreaModel = ({ id: "0", areaName: "", }); - if (data.id !== "0") { + if (WorkArea.id !== null) { showToast("WorkArea updated successfully.", "success"); } else { showToast("WorkArea created successfully.", "success");