Commit Graph
10 Commits
Author SHA1 Message Date
aj 1d4f64726b fix: resolve 500s on nest-details endpoints under Docker deployment
NestReader opened .pep files with FileStream(path, FileMode.Open), which
defaults to FileAccess.ReadWrite. The forge deployment bind-mounts
/mnt/pep-nest read-only, so every read-only open was rejected with
"Read-only file system" (EROFS) even though the code never writes.
Pass FileAccess.Read/FileShare.Read explicitly, matching DrawingReader
and ZipHelper elsewhere in PepLib.Core.

Once that was fixed, a second pre-existing bug surfaced: GetNestDetailsAsync
matched DB rows by NestName AND a literal Path comparison built from the
container's local mount path. NestHeader.Path stores the original Windows
UNC share path (e.g. \REMCOSRV0\pep nest\) from when PepApi ran directly
against the network share, so the comparison can never match post-Docker.
Match by NestName alone (ordered by most recent), consistent with the
fallback lookup already used elsewhere in NestsController.
2026-06-30 15:00:22 -04:00
ajandClaude Sonnet 4.6 5e0856b5d1 fix: resolve API route name collisions
- DrawingsController: rename 'name/{name}' to 'by-name/{name}' to
  eliminate ambiguous match with '{name}/dxf' on path /drawings/name/dxf
- NestsController: add regex constraint to '{nestName}/download' and
  '{nestName}/plates' to prevent collision with year-parameterized routes
  when nestName is a 4-digit integer
- PepMcp/PepTools.cs: update GetDrawingByName URL to match renamed route

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 07:20:53 -04:00
ajandClaude Opus 4.6 955fbc5539 fix(nests): use partial matching for customer filter in SearchParts
The customer parameter on the parts search endpoint was doing exact
equality matching against CustomerName/CustID, so partial values like
"sull" would never match "Sullys". Changed to case-insensitive
Contains matching, consistent with how the search term is handled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 12:41:35 -05:00
ajandClaude Opus 4.5 9088af52de refactor(PepLib.Core): reorganize files into logical folder structure
Move 38 files from root directory into organized subfolders:
- Enums/ (7 files): StatusType, ApplicationType, DrawingType, etc.
- Geometry/ (5 files): Vector, Box, Size, Spacing, Node
- Models/ (15 files): Nest, Plate, Part, Program, Report, etc.
- Utilities/ (7 files): MathHelper, Tolerance, ZipHelper, etc.
- Extensions/ (2 files): PartListExtensions, PlateListExtensions
- Interfaces/ (1 file): IMovable

Update namespaces to follow folder hierarchy (e.g., PepLib.Models).
Add GlobalUsings.cs for internal backward compatibility.
Update Codes/ and IO/ files with new using statements.
Update PepApi.Core consumers to reference new namespaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:29:13 -05:00
ajandClaude Opus 4.5 a4fb40e485 style(PepApi.Core): reorder using directives and fix whitespace
Alphabetize using directives in NestsController and remove extra
blank line in Program.cs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:52:50 -05:00
ajandClaude Opus 4.5 a1df56f64c feat(nests): add batch part search and material descriptions
- Add POST parts/search/batch endpoint for searching multiple parts at once
- Extract SearchPartsInternalAsync helper method to support batch operations
- Include material description in part search results by looking up MaterialHeaders
- Add BatchPartSearchRequest and BatchPartSearchResponse models
- Add ResultsReturned field to single-part search response for consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 06:56:00 -05:00
ajandClaude Opus 4.5 336be491ba feat(nests): add year-based routing for nest endpoints
Support /nests/{year}/{nestName} routes to disambiguate older programs
that don't have year digits in the name. Refactor GetNestPathAsync to
handle 2025+ .pep files in flat directory vs older .zip files in year
subdirectories.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 09:35:28 -05:00
ajandClaude 4d2dd6d985 feat(nests): add part search endpoint
Add GET /api/nests/parts/search endpoint to search for parts across nests
by part name. Supports filtering by year and customer, with configurable
result limit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 19:35:27 -05:00
aj 67d4342e0f feat(api): build Parts from DB PlateDetails (QtyNstd) instead of file inference
- Add GetPartsFromDbAsync(NestHeader) to aggregate quantities and plate indices
- Use NestName + CopyID filter to select correct program set
- Preserve original drawing name case; normalize grouping to avoid duplicates
- Replace PepHelper.GetParts(nest) usage with DB-driven result
2025-10-29 11:07:22 -04:00
aj ab916dc82a Added Files 2025-10-27 18:48:23 -04:00