mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-04 07:19: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
@@ -12,6 +12,9 @@ opening and saving with an older application loses that state.
|
||||
`thicknessName` is the shop's name for the thickness ("10 ga", `Nest.ThicknessName`); it
|
||||
is omitted when blank, older files have none, and older readers ignore it. A new
|
||||
thickness value clears it, so a reader sets it after the thickness.
|
||||
`jobNumber` is the job the nest cuts parts for (`Nest.JobNumber`), several separated by
|
||||
commas and stored as `"4980-88R, 4981-02"`; it is omitted when blank, older files have
|
||||
none, and older readers ignore it.
|
||||
Status and made-by are additive: files written before them load as Quote with an
|
||||
empty maker, and an unrecognized status value likewise falls back to Quote. Builds
|
||||
before `Draft` therefore open a Draft nest as Quote, and saving it there keeps Quote.
|
||||
|
||||
+15
-3
@@ -5,7 +5,7 @@ The desktop app can save nests two ways:
|
||||
- **File mode** (default, unchanged behavior): Save/Save As write a `.nest` ZIP
|
||||
archive to disk via the normal file dialog. See [nest-file-format.md](nest-file-format.md).
|
||||
- **Database mode**: Open browses server records 100 at a time. The Find box
|
||||
searches name, customer, material, grade, thickness name, made by, comments and status on the server
|
||||
searches name, customer, job number, material, grade, thickness name, made by, comments and status on the server
|
||||
after a short typing pause (Enter in the box searches at once); clicking a
|
||||
column header sorts every match on the server (click again to reverse); the
|
||||
arrow buttons move between pages and the title and find bar show the range and
|
||||
@@ -89,6 +89,7 @@ entry, never programs or geometry, and takes the archive-derived fields below fr
|
||||
| `material` | string | Material name (type), e.g. `Stainless`. Read from the uploaded archive (nest material, else plate defaults' on an explicit null); a metadata-only PUT may change it, and the desktop applies the record's value when opening the nest. |
|
||||
| `materialGrade` | string | Optional; default blank. Older servers drop it. A blank grade on a record saved before schema v8 is treated as unrecorded: opening keeps the archive's grade while the material name matches. |
|
||||
| `thickness` | number | Read from the uploaded archive (nest thickness, else plate defaults' when not positive); editable like `material`. |
|
||||
| `jobNumber` | string | Optional; default blank. The job number, or several separated by commas, kept apart from `customer`; the server stores it as the client does, each number trimmed and joined with `", "`. Older servers drop it. See [Job numbers](#job-numbers). |
|
||||
| `thicknessName` | string | Optional; default blank. The shop's name for the thickness ("10 ga"), from the client like `materialGrade`. Older servers drop it. A blank name is filled in for display only (see [Thickness names](#thickness-names)). |
|
||||
| `units` | `"inches"` \| `"millimeters"` | The nest's units, which `thickness` is in. Server-computed from the uploaded archive (absent or unknown values are inches, as `NestReader` reads them); ignored on upload and kept by a metadata-only PUT. Schema v12 read every stored archive, current and historical, to fill it. Older servers omit it, which readers take as inches. |
|
||||
| `status` | `"draft"` \| `"quote"` \| `"toBeCut"` \| `"hasBeenCut"` | Default `quote`. |
|
||||
@@ -270,7 +271,7 @@ only the requested page of metadata (never archive bytes):
|
||||
|
||||
- `search` (optional): trimmed, at most 200 characters, no NUL characters;
|
||||
blank means no filter.
|
||||
Case-insensitive substring of the whole text in `name`, `customer`, `material`,
|
||||
Case-insensitive substring of the whole text in `name`, `customer`, `jobNumber`, `material`,
|
||||
`materialGrade`, `thicknessName`, `madeBy`, `comments` or the status (`ToBeCut` or the display name `To Be Cut`).
|
||||
`%`, `_` and `\` are literal. Dates and numbers are not matched as text.
|
||||
Case folding is ASCII-only (SQLite `LIKE`).
|
||||
@@ -285,7 +286,7 @@ only the requested page of metadata (never archive bytes):
|
||||
- `offset` (default 0, at least 0) and `limit` (default 100, 1 to 500).
|
||||
- `sort` (default `savedAt`): one of `savedAt`, `name`, `customer`, `status`,
|
||||
`material`, `dateCreated`, `dateModified`, `thickness`, `plateCount`,
|
||||
`partCount`, `madeBy`, `comments`, `fileSize`, `materialGrade` (names, case-insensitive; no
|
||||
`partCount`, `madeBy`, `comments`, `fileSize`, `materialGrade`, `jobNumber` (names, case-insensitive; no
|
||||
numbers). Text columns sort case-insensitively (ASCII); dates sort as their
|
||||
stored ISO text. `order` is `asc` or `desc` (default `desc`).
|
||||
- Ties are broken by `id` in the same direction, so pages partition the matches
|
||||
@@ -1140,6 +1141,17 @@ thickness as its bare decimal with a **Name** box beside it that fills in the sa
|
||||
thickness replaces the name, a new material only a blank or suggested one, and a typed
|
||||
name is kept.
|
||||
|
||||
### Job numbers
|
||||
|
||||
Schema v21 adds a `jobNumber` text column (default blank) to `nests` and
|
||||
`nest_revisions`; existing records keep a blank job number until they are next saved, and
|
||||
nothing is moved out of `customer`. A server older than v21 refuses to open a v21
|
||||
database, so rolling back needs the pre-upgrade backup.
|
||||
|
||||
Edit Nest has a **Job #** box beside Customer; several jobs go in it separated by
|
||||
commas. The Open list has a **Job #** column that sorts as text, the Find box matches it,
|
||||
and the nest report lists it under the customer.
|
||||
|
||||
## Material list endpoints
|
||||
|
||||
The server keeps the company material list: each material with its grades. Both
|
||||
|
||||
Reference in new issue
Block a user