mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-30 19:01:34 -05:00
fix(desktop): count only active MaterialLedger holds and link the nest page
MaterialLedger's Release lets a hold go, so a Released hold no longer keeps
a sheet for the nest; only Proposed, Approved and AwaitingCloseout holds,
the statuses ML counts against free stock, are open. The Has Been Cut
note's link pointed at /Nests/{id}, which ML does not serve; its nest page
is /Nests/Details/{id}.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c27188c722
commit
079dfaf9ea
6 files changed
+18
-15
No files matched your search
@@ -47,7 +47,7 @@ public class NestHoldStatusTests
|
||||
var document = Bound(sheets: 4);
|
||||
var changes = 0;
|
||||
HttpRequestMessage seen = null;
|
||||
var status = Status(document, databaseMode: true, request => { seen = request; return Holds("Approved", "Released"); });
|
||||
var status = Status(document, databaseMode: true, request => { seen = request; return Holds("Approved", "Proposed", "Released"); });
|
||||
status.Changed += (_, _) => changes++;
|
||||
|
||||
await status.RefreshAfterSaveAsync();
|
||||
@@ -56,7 +56,7 @@ public class NestHoldStatusTests
|
||||
Assert.False(status.IsRefreshing);
|
||||
Assert.Equal("Ledger: 2 of 4 held, 2 short", status.Summary.Text);
|
||||
Assert.Contains(document.RemoteId.ToString("D"), seen.RequestUri!.Query);
|
||||
Assert.Equal($"http://ledger:5000/Nests/{document.RemoteId:D}", status.LedgerNestUrl);
|
||||
Assert.Equal($"http://ledger:5000/Nests/Details/{document.RemoteId:D}", status.LedgerNestUrl);
|
||||
Assert.Equal(2, changes); // Refreshing, then the answer.
|
||||
|
||||
// An on-demand refresh counts the sheets of the last save, not unsaved edits.
|
||||
|
||||
Reference in new issue
Block a user