shoc-backend/Api.SeaHavenIndustries
Alexandre Brandizzi 9ef2512e14 fix(vendor-roster): conflict on colliding rename, reject no-op company update (SH-250)
Two review findings on the additive PATCH path:

- AddTechniciansAsync can rename via CompanyFields.Name and write NormalizedName
  against the unique index, but the save had no guard. A colliding rename
  surfaced as an unhandled 500 from the PATCH action instead of a stable client
  conflict. Pre-check the normalized name against other live companies and throw
  VendorRosterDuplicateNameException, with a scoped catch around the save for the
  race where a competing rename commits in between. The controller maps it to a
  409 alongside the existing concurrency conflict.
- Empty-payload validation only rejected a null CompanyFields, so an all-blank
  CompanyFields object was forwarded as a company update, bumping RowVersion and
  rewriting every technician's LastModificationTime without changing any company
  data. Blank fields now collapse to no company change, and a request with
  neither technicians nor a real company value fails validation.
2026-08-18 17:33:16 -03:00
..
.config Initial commit 2024-09-28 14:58:36 -04:00
Controllers fix(vendor-roster): conflict on colliding rename, reject no-op company update (SH-250) 2026-08-18 17:33:16 -03:00
DTOs fix(work-orders): apply account scope across create and reads [SH-221] 2026-08-11 10:45:37 -03:00
Filters merge: integrate origin/dev into PR #22 flag-color base 2026-07-24 14:20:16 -03:00
Helper refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
HostedServices feat(uplifts): complete SH-101 approval lifecycle 2026-08-11 08:58:19 -03:00
Infrastructure fix(work-orders): harden media upload contract for review blockers 2026-08-04 11:08:18 -03:00
Middleware feat(work-orders): add legacy deprecation middleware and Blazor WO sunset guard 2026-07-13 13:22:53 -03:00
Models initial commit for api changes 2025-02-18 13:13:33 -06:00
Options feat(work-orders): add Phase 5 scheduled domain events (WeekRolled) 2026-07-24 10:13:17 -03:00
Properties Initial commit 2024-09-28 14:58:36 -04:00
wwwroot Add zip-to-zip distance calculation for vendor dispatch 2026-04-17 11:56:06 -04:00
Api.SeaHavenIndustries.csproj feat: ingest signed procurement work-order webhooks 2026-07-24 21:03:50 -03:00
Api.SeaHavenIndustries.http Initial commit 2024-09-28 14:58:36 -04:00
appsettings.Development.json fix(security): remove hardcoded secrets from source 2026-06-05 11:56:54 -04:00
appsettings.json fix(work-orders): satisfy producer contract review 2026-07-27 16:33:06 -03:00
appsettings.Production.json fix(vendors): address roadmap review findings 2026-07-24 11:49:57 -03:00
aws-beanstalk-tools-defaults.json fixes for Dev changes 2026-04-24 12:12:16 -05:00
db.txt fixes for Dev changes 2026-04-24 12:12:16 -05:00
Program.cs feat(uplifts): complete SH-101 approval lifecycle 2026-08-11 08:58:19 -03:00