diff --git a/CutList.Web/Components/Pages/Jobs/Edit.razor b/CutList.Web/Components/Pages/Jobs/Edit.razor index bea84a5..73f4fed 100644 --- a/CutList.Web/Components/Pages/Jobs/Edit.razor +++ b/CutList.Web/Components/Pages/Jobs/Edit.razor @@ -882,7 +882,7 @@ else

No stock configured for this job.

Add stock from your inventory or define custom lengths.

-

If no stock is selected, the optimizer will use all available stock for the materials in your parts list.

+

Stock must be explicitly added here before you can optimize — there is no automatic fallback to inventory.

} else @@ -893,7 +893,6 @@ else }; - private RenderFragment RenderStockTable() => __builder => {
@@ -1251,6 +1250,7 @@ else { showStockModal = false; editingStock = null; + newStock = new(); importCandidates.Clear(); stockErrorMessage = null; importErrorMessage = null; @@ -1268,14 +1268,7 @@ else { newStock.MaterialId = stockSelectedMaterialId; newStock.StockItemId = null; - if (stockSelectedMaterialId > 0) - { - availableStockItems = await JobService.GetAvailableStockForMaterialAsync(stockSelectedMaterialId); - } - else - { - availableStockItems.Clear(); - } + await LoadAvailableStockItemsAsync(stockSelectedMaterialId); } private async Task EditStock(JobStock stock)