feat: allow unlimited quantity for catalog-sourced job stock
Custom-length job stock already supported -1 (unlimited); catalog- sourced stock only allowed >= 1. Closes that inconsistency per docs/superpowers/specs/2026-08-01-remove-inventory-quantity-tracking-design.md. Also updates the Results tab's unplaced-items message now that insufficient configured quantity is a normal cause, not an edge case.
This commit is contained in:
@@ -814,7 +814,8 @@ else
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form-label">Qty to Use</label>
|
<label class="form-label">Qty to Use</label>
|
||||||
<input type="number" class="form-control" @bind="newStock.Quantity" min="1" />
|
<input type="number" class="form-control" @bind="newStock.Quantity" min="-1" />
|
||||||
|
<small class="text-muted">-1 = unlimited</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row g-3 mt-1">
|
<div class="row g-3 mt-1">
|
||||||
@@ -1123,7 +1124,7 @@ else
|
|||||||
{
|
{
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<strong>@materialResult.PackResult.ItemsNotUsed.Count items not placed</strong> —
|
<strong>@materialResult.PackResult.ItemsNotUsed.Count items not placed</strong> —
|
||||||
No stock lengths available or parts too long.
|
not enough stock quantity entered for this job, no stock lengths configured, or parts too long.
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1319,9 +1320,9 @@ else
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newStock.Quantity < 1)
|
if (newStock.Quantity < -1 || newStock.Quantity == 0)
|
||||||
{
|
{
|
||||||
stockErrorMessage = "Quantity must be at least 1";
|
stockErrorMessage = "Quantity must be at least 1 (or -1 for unlimited)";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user