mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
New React Backend Repository
The manual POC "follow the site" clear-rule compared the edit against every live Site contact. A work order only ever displays one of them, so editing to a different live contact (Site has Alice primary and Bob; WO shows Alice; edit to Bob) matched, cleared the override, and left the row showing Alice with no audit row written — the SH-379 symptom on a different input. A work order with a linked WorkOrderContacts POC hit the same bug when the dispatcher typed the Site's primary: the override cleared and the linked contact showed instead. Compare the edit against the single contact the work order actually follows — the linked WorkOrderContacts POC, or else the Site primary (ResolvePrimary) — matching the board projection's override -> linked -> site precedence, and store the override whenever the edit differs from it. The create path in WorkOrderBoardCreateService had the same any-contact rule and gets the same fix; a supplied PocContactId that is not a live Site contact leaves no follow target, so the typed POC is stored. Replaces MatchesAnySiteContact with Matches(name, phone, contact); comment and PR-body wording updated to state the followed-contact rule. Adds tests for the second-site-contact edit, the linked-contact-differs edit, and the second-site-contact create case. |
||
|---|---|---|
| .ebextensions | ||
| .github | ||
| Api.SeaHavenIndustries | ||
| Api.SeaHavenIndustries.Tests | ||
| Data.SeaHavenIndustries | ||
| docs | ||
| postman | ||
| scripts | ||
| SeaHaven.DataServices | ||
| SeaHaven.Services | ||
| SeaHaven.Services.Tests | ||
| SeaHavenIndustries | ||
| SeaHavenIndustries.Tests | ||
| terraform | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| ARCHITECTURE_AND_CODE_QUALITY.md | ||
| BACKEND_ARCHITECTURE.md | ||
| QUALITY_GATES.md | ||
| REVIEW_AND_PR_FRAMEWORK.md | ||
| SeaHavenIndustries.sln | ||
| TODO.md | ||