mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-06 06:29:24 -05:00
feat(data): store a nest's job number apart from the customer
Job numbers were going into Customer ("GM / 4980-88R"), which breaks
sorting, searching and grouping by customer. A nest now has its own
Job # field: one or several jobs separated by commas, normalized to
"a, b". It is saved in nest.json and the server (schema v21), edited
beside Customer in Edit Nest (WinForms and Avalonia), shown as a
sortable, searchable column in the Open list, and printed on the nest
report and in MCP output.
Deploy the server before the desktop: the open overlay takes the
server's job number, and an older server has none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
857b88a2c7
commit
bfdfefeb9e
40 files changed
+304
-44
No files matched your search
@@ -174,6 +174,7 @@ public static class NestPdfWriter
|
||||
{
|
||||
ReportFonts.ValidateText(snapshot.Name, "Nest name");
|
||||
ReportFonts.ValidateText(snapshot.Customer, "Customer");
|
||||
ReportFonts.ValidateText(snapshot.JobNumber, "Job number");
|
||||
ReportFonts.ValidateText(snapshot.Notes, "Notes");
|
||||
ReportFonts.ValidateText(snapshot.Material, "Material");
|
||||
ReportFonts.ValidateText(snapshot.Grade, "Material grade");
|
||||
@@ -197,6 +198,8 @@ public static class NestPdfWriter
|
||||
var left = new List<(string Key, string Value)> { ("Nest:", snapshot.Name) };
|
||||
if (snapshot.Customer.Length > 0)
|
||||
left.Add(("Customer:", snapshot.Customer));
|
||||
if (snapshot.JobNumber.Length > 0)
|
||||
left.Add(("Job #:", snapshot.JobNumber));
|
||||
var right = new List<(string Key, string Value)>
|
||||
{
|
||||
("Distinct layouts:", snapshot.Plates.Length.ToString(Invariant)),
|
||||
|
||||
@@ -46,6 +46,7 @@ public static class NestReportBuilder
|
||||
drawings.ToImmutable(), plates.ToImmutable())
|
||||
{
|
||||
HasCutTimes = cutParameters != null,
|
||||
JobNumber = nest.JobNumber ?? "",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,9 @@ public sealed record NestReportSnapshot(string Name, string Customer, string Not
|
||||
/// </summary>
|
||||
public string ThicknessName { get; init; } = "";
|
||||
|
||||
/// <summary>The nest's job number or comma-separated job numbers; empty when it has none.</summary>
|
||||
public string JobNumber { get; init; } = "";
|
||||
|
||||
/// <summary>"lb" for inch jobs, "kg" for millimeter jobs.</summary>
|
||||
public string WeightUnits => Units == "mm" ? "kg" : "lb";
|
||||
|
||||
|
||||
Reference in new issue
Block a user