diff --git a/ExpertCities.Blazor/Pages/Assets/Inventory/InventoryEditView.razor b/ExpertCities.Blazor/Pages/Assets/Inventory/InventoryEditView.razor
index f218ff2..8899558 100644
--- a/ExpertCities.Blazor/Pages/Assets/Inventory/InventoryEditView.razor
+++ b/ExpertCities.Blazor/Pages/Assets/Inventory/InventoryEditView.razor
@@ -20,16 +20,73 @@
}
+
+
+
+
+
+
+
+
+
+
+
@code {
+ protected bool IsDimension;
+ protected bool IsMake;
[Parameter] public ECContext c { get; set; }
[Parameter] public Inventory Inventory { get; set; }
[Parameter] public List Formats { get; set; }
[Parameter] public IStringLocalizer Loc { get; set; }
+ protected override void OnInitialized()
+ {
+ IsDimension = Inventory.Length > 0 || Inventory.Surface > 0 || Inventory.Width > 0 || Inventory.Volume > 0 || Inventory.Height > 0;
+ IsMake = !string.IsNullOrWhiteSpace(Inventory.Manufacturer) || !string.IsNullOrWhiteSpace(Inventory.Brand) || !string.IsNullOrWhiteSpace(Inventory.Series);
+ base.OnInitialized();
+ }
+
protected async Task GetUniformat()
{
var Helper = new SearchHelper(Formats);
diff --git a/ExpertCities.Data/Entities/DebugBuildingEntities.cs b/ExpertCities.Data/Entities/DebugBuildingEntities.cs
index 784839e..c8ce019 100644
--- a/ExpertCities.Data/Entities/DebugBuildingEntities.cs
+++ b/ExpertCities.Data/Entities/DebugBuildingEntities.cs
@@ -63,8 +63,9 @@ public static void CreateDebug()
private static void CreateInventory(ECContext c, Asset b1, List Formats)
{
- b1.Inventory = new List { new Inventory { Exterior = true, Uniformat = Formats.First(u => u.Code == "A202003"), Method = InventoryMethodEnum.Uniformat } };
- b1.Inventory.Add(new Inventory { Exterior = true, Item = "Special item", Method = InventoryMethodEnum.Legacy });
+ b1.Inventory = new List { new Inventory { Exterior = true, Uniformat = Formats.First(u => u.Code == "A202003"), Method = InventoryMethodEnum.Uniformat, Manufacturer="GE" } };
+ b1.Inventory.Add(new Inventory { Exterior = true, Item = "Special item", Method = InventoryMethodEnum.Legacy ,Width = 12.5f });
+ b1.Inventory.Add(new Inventory { Exterior = true, Uniformat = Formats.First(u => u.Code == "A202002"), Method = InventoryMethodEnum.Uniformat });
}
static void BuildManyActions(Work w)
diff --git a/ExpertCities.Data/Entities/Inspection.cs b/ExpertCities.Data/Entities/Inspection.cs
index c32e7b6..af37858 100644
--- a/ExpertCities.Data/Entities/Inspection.cs
+++ b/ExpertCities.Data/Entities/Inspection.cs
@@ -15,6 +15,9 @@ public class Inspection
public int Asset_ID { get; set; }
[ForeignKey(nameof(Asset_ID))]
public Asset Asset { get; set; }
+ public int? Inventory_ID { get; set; }
+ [ForeignKey(nameof(Inventory_ID))]
+ public Inventory? Inventory { get; set; }
public string? ExternalAffectation { get; set; }
public int? Workforce_ID { get; set; }
[ForeignKey(nameof(Workforce_ID))]