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:
ajandClaude Opus 5.5 committed 2026-12-03 10:21:04 -05:00
1 parent 857b88a2c7
commit bfdfefeb9e
40 files changed
+304 -44

No files matched your search

+7 -2
View File
@@ -8,7 +8,7 @@ namespace OpenNest.Desktop;
/// <summary>
/// What Nest &gt; Edit (the Edit Nest dialog) edits: the nest's name, dates, thickness and its name,
/// material and grade, customer, status, author, units, notes and its plate defaults (size,
/// material and grade, customer and job number, status, author, units, notes and its plate defaults (size,
/// part and edge spacing, quadrant). <see cref="FromNest"/> reads a nest, <see cref="CanApply"/>
/// is when the dialog's Done button is enabled and <see cref="ApplyTo"/> writes the nest as
/// Done does.
@@ -44,6 +44,9 @@ public sealed record NestInfoValues
public string Customer { get; init; } = "";
/// <summary>The job number, or several separated by commas; blank when the nest has none.</summary>
public string JobNumber { get; init; } = "";
public NestStatus Status { get; init; } = NestStatus.Quote;
public string MadeBy { get; init; } = "";
@@ -78,6 +81,7 @@ public sealed record NestInfoValues
Name = nest.Name,
Notes = nest.Notes,
Customer = nest.Customer,
JobNumber = nest.JobNumber ?? "",
DateCreated = nest.DateCreated,
DateLastModified = nest.DateLastModified,
Thickness = nest.Thickness,
@@ -124,6 +128,7 @@ public sealed record NestInfoValues
nest.Units = Units;
nest.Notes = Notes;
nest.Customer = Customer;
nest.JobNumber = JobNumber;
nest.DateCreated = DateCreated;
nest.DateLastModified = DateLastModified;
nest.Thickness = Thickness;
@@ -156,7 +161,7 @@ public sealed record NestInfoValues
{
ArgumentNullException.ThrowIfNull(nest);
var defaults = nest.PlateDefaults;
return string.Join("|", nest.Units, nest.Notes, nest.Customer, nest.Thickness, nest.ThicknessName, nest.Material?.Name,
return string.Join("|", nest.Units, nest.Notes, nest.Customer, nest.JobNumber, nest.Thickness, nest.ThicknessName, nest.Material?.Name,
nest.Material?.Grade, defaults.Size, defaults.PartSpacing, defaults.EdgeSpacing.Left,
defaults.EdgeSpacing.Bottom, defaults.EdgeSpacing.Right, defaults.EdgeSpacing.Top, defaults.Quadrant);
}