diff --git a/CutList.Web/Components/Layout/NavMenu.razor b/CutList.Web/Components/Layout/NavMenu.razor index 5adf4b9..87759a3 100644 --- a/CutList.Web/Components/Layout/NavMenu.razor +++ b/CutList.Web/Components/Layout/NavMenu.razor @@ -28,6 +28,11 @@ Stock Items +
@@ -195,6 +225,9 @@ else private MultiMaterialPackingSummary? summary; private bool loading = true; + private bool addingToOrderList; + private bool addedToOrderList; + private bool CanOptimize => job != null && job.Parts.Count > 0 && job.CuttingToolId != null; @@ -209,6 +242,7 @@ else // Pass job stock if configured, otherwise packing service uses all available stock packResult = await PackingService.PackAsync(job.Parts, kerf, job.Stock.Count > 0 ? job.Stock : null); summary = PackingService.GetSummary(packResult); + addedToOrderList = job.IsLocked; } loading = false; @@ -250,6 +284,58 @@ else }; + private async Task AddToOrderList() + { + addingToOrderList = true; + try + { + var purchaseItems = new ListLoading...
+} +else +{ ++ Track material that needs to be ordered from suppliers. Items are added manually or automatically from job optimization results. +
+ +@if (loading) +{ +Loading...
+} +else +{ + + + @if (tabItems.Count == 0) + { +| Material | +Length | +Qty | +Supplier | +Job | +Status | +Notes | +Actions | +
|---|---|---|---|---|---|---|---|
| @item.StockItem.Material.DisplayName | +@ArchUnits.FormatFromInches((double)item.StockItem.LengthInches) | +@item.Quantity | ++ + | ++ @if (item.Job != null) + { + @item.Job.DisplayName + } + else + { + - + } + | ++ @item.Status + | ++ @(item.Notes ?? "-") + | +
+
+ @if (item.Status == PurchaseItemStatus.Pending)
+ {
+
+ }
+ @if (item.Status == PurchaseItemStatus.Ordered)
+ {
+
+ }
+
+
+ |
+