Commit graph

102 commits

Author SHA1 Message Date
Arthur Bassi
af84001bf1 feat(work-orders): add Phase 6 slide-over detail comments audit and media API 2026-07-13 13:13:00 -03:00
Arthur Bassi
0ce008e5eb feat(work-orders): add Phase 6 completion templates schema and media category 2026-07-13 13:12:07 -03:00
Arthur Bassi
812a5e994c merge: integrate Phase 4 into Phase 5 and add DomainEvents Designer metadata
Resolve snapshot conflict by keeping Phase 4 search indexes and Phase 5 ledger model. Add missing Phase5_DomainEvents.Designer.cs so EF discovers the WorkOrderWeekRolledLedgers migration.
2026-07-10 11:53:29 -03:00
Arthur Bassi
8a5cb0cc90 fix(work-orders): make Phase4 search index migration discoverable by EF 2026-07-10 11:45:24 -03:00
Arthur Bassi
f977483c17 fix(work-orders): process all WeekRolled candidates across batches
Offset paging skipped remaining WOs after ledger writes; always refetch the first page of unprocessed candidates and cover with a >BatchSize test.
2026-07-10 11:01:52 -03:00
Arthur Bassi
dd2a805c24 fix(work-orders): return 400 for invalid advanced-search custom date range
Map ArgumentException from datePreset=custom without dates to BadRequest so the endpoint matches the Phase 4 contract.
2026-07-10 10:56:18 -03:00
Arthur Bassi
0ddc43210a Merge remote-tracking branch 'origin/feat/work-orders-phase-3' into feat/work-orders-phase-4 2026-07-10 10:54:15 -03:00
Arthur Bassi
9dc17d4255 fix(work-orders): persist WO identity before staging create audit and locks 2026-07-10 10:49:57 -03:00
Arthur Bassi
8c33eb7f9a feat(work-orders): add Phase 5 scheduled domain events (WeekRolled)
Introduce in-process WeekRolled job with idempotent ledger to increment carriedOver for the SHOC board, plus optional PastDue cache and admin reprocess endpoints while keeping isPastDue derived on-read.
2026-07-09 14:08:48 -03:00
Arthur Bassi
83272e4957 Revert "fix(work-orders): address PR #14 board PATCH review feedback"
This reverts commit eb64c2f55c.
2026-07-09 09:59:41 -03:00
Arthur Bassi
eb64c2f55c fix(work-orders): address PR #14 board PATCH review feedback
Reuse field-lock DB checks during staged audits, defer dispatch creation to the final save, and return 404 for missing work orders.
2026-07-09 09:54:53 -03:00
Arthur Bassi
4617e8ba83 feat(work-orders): add Phase 4 board search and advanced search API
Harden contextual search on the weekly board and expose paginated cross-week GET /board/search with date presets, FE filter params, SQL indexes, and unit tests.
2026-07-08 14:58:59 -03:00
Arthur Bassi
e5bda0714a feat(work-orders): add Phase 3 board create and soft cancel API
Expose POST /api/workorders/board and POST /api/workorders/{id}/cancel for SHOC wizard/inline creation and soft cancel, with field locks, WO# normalization, and Admin-only hard delete.
2026-07-08 10:17:31 -03:00
Arthur Bassi
91122d753d merge: integrate Phase 1 board API into Phase 2 branch
Combine the reviewed Phase 1 read-only board endpoints with Phase 2 inline edit and optimistic concurrency, resolving shared foundation conflicts while preserving both feature sets.
2026-07-07 13:59:22 -03:00
Arthur Bassi
673bc3b5a9 fix(work-orders): align phase 2 status/type contract to SHOC frontend
Expand LifecycleStatus (EnRoute, OnSite, Rescheduled, Pending, PendingQuote) and WorkOrderType (Reactive, AddOn) to match the frontend prototype. Add FE label round-trip via LifecycleStatusMapper/WorkOrderTypeMapper, update derived fields, mutation rules and board unscheduled filter, and reactivate [Authorize] on WorkOrderController. Fix pre-existing dayGroup test expectation.
2026-07-07 13:11:22 -03:00
Arthur Bassi
d040832b87 feat(work-orders): isolate phase 2 inline edit with optimistic concurrency
Deliver PATCH board field updates and drop phases 3-7 code from the branch while keeping phase 0/1 dependencies required to build and test.
2026-07-07 11:26:13 -03:00
Arthur Bassi
8efe4460bb fix(work-orders): complete Phase 1 board indexes, Service DTO and helper wiring
Add AssignTo+ScheduledDate and WorkOrderType indexes, expose service on board rows, and route data access through shared projection/filter helpers.
2026-07-07 10:11:04 -03:00
Arthur Bassi
ff53cb9fa6 feat(work-orders): add weekly board read API (Phase 1)
- GET /api/workorders/board with week window, Unscheduled section, and X of Y counts
- GET /api/workorders/lookups/dispatchers for SHOC filter avatars
- Board projection via WorkOrderBoardDataService with vendor/dispatch join and derived isPastDue
- Phase1_BoardIndexes migration (IX_workOrders_ScheduledDate)
- 5 board unit tests
2026-07-07 10:10:06 -03:00
Arthur Bassi
e5902e1df3 fix(work-orders): address PR review on sync, audit, lock and mapper 2026-07-02 09:30:05 -03:00
Arthur Bassi
76e839addf test(work-orders): cover FE-aligned mappers and derived field logic 2026-07-02 09:19:28 -03:00
Arthur Bassi
187d935da2 feat(work-orders): add lifecycle, type mappers and derived field rules 2026-07-02 09:19:28 -03:00
Arthur Bassi
623810da45 feat(phase-0): finalize foundation — authorize, concurrency filter, isolated build 2026-07-02 09:19:28 -03:00
Arthur Bassi
7a81b6d279 test(work-orders): add Phase 0 domain unit tests 2026-07-02 09:19:28 -03:00
Arthur Bassi
49e5de5152 feat(work-orders): add audit, field lock and sync merge services 2026-07-02 09:17:59 -03:00
Arthur Bassi
e244c32bc9 feat(work-orders): add EF config and Phase 0 migration 2026-07-02 09:17:59 -03:00
Arthur Bassi
568961642f feat(work-orders): add domain enums and aggregate root fields 2026-07-02 09:17:59 -03:00
Arthur Bassi
4f697f257a wip: work orders phases 1-7 (isolated from phase 0 foundation) 2026-06-30 10:09:48 -03:00
Arthur Bassi
65c1cdc7e9 docs(work-orders): add Phase 0 governance documentation 2026-06-29 17:22:31 -03:00
Arthur Bassi
5d5b3234c4 test(work-orders): add Phase 0 domain unit tests 2026-06-29 17:22:31 -03:00
Arthur Bassi
f52c430c2c feat(work-orders): add audit, field lock and sync merge services 2026-06-29 17:22:31 -03:00
Arthur Bassi
35b3bba596 feat(work-orders): add EF config and Phase 0 migration 2026-06-29 17:22:31 -03:00
Arthur Bassi
456bee2226 feat(work-orders): add domain enums and aggregate root fields 2026-06-29 17:22:31 -03:00
12fd5efe8b Merge branch 'main' into dev 2026-06-22 18:57:13 -04:00
Adam Moussa
b2aeb35a55
Add starter unit tests for validators, DTO mappers, and PagedResult (#9) 2026-06-22 18:56:46 -04:00
Adam Moussa
1f3972ae49
Add calendar/events backend API (#8)
* Align EntityFrameworkCore.SqlServer and Tools to 8.0.8

* Add calendar/events backend API

Cherry-picked from main-backup (19994ef); scratch notes file removed.

* Require authentication on CalendarController

Security review found [Authorize] commented out, leaving all 6 calendar
endpoints anonymous. Enforce auth to match the API convention (17/23
controllers).

* Add CalendarController unit tests (xUnit + EF InMemory)
2026-06-22 18:46:46 -04:00
dd1ffba06d Add CODEOWNERS requiring internal-dev review 2026-06-22 18:23:54 -04:00
d4d94a2e89 Add CI workflow calling org ci-dotnet reusable 2026-06-22 18:23:54 -04:00
Adam Moussa
02ff65b647
Add CODEOWNERS requiring internal-dev review (#6)
Assign all files to the internal-dev team so every pull request needs an
approving review from an internal-dev member, giving internal engineering
oversight of changes. The org main-branch-protection ruleset enforces this
via required code-owner review; the internal-dev team has write access, so
it is an eligible code owner.
2026-06-22 16:47:27 -04:00
Adam Moussa
f53a276f1d
Repo hygiene: PR labeler + README badges (INFRA-56/57) (#5)
Add the callable PR labeler workflow. README badges skipped: no root
README.md exists in this repo (only BACKEND_ARCHITECTURE.md). Dependabot
unchanged.

Part of INFRA-47 (INFRA-56, INFRA-57).
2026-06-11 14:14:27 -04:00
Adam Moussa
3a61885c71
Add dependency-review caller workflow (#3)
* Add dependency-review caller workflow

Add a pull_request-triggered caller that invokes the org-level
callable-dependency-review workflow to scan dependency changes and
fail on high-severity advisories.

* chore: retrigger checks

* chore: retrigger dep review (post-fix)
2026-06-05 12:27:11 -04:00
Adam Moussa
047ad23c81
Merge pull request #4 from Sea-Haven-Industries/fix/remove-hardcoded-secrets
fix(security): remove hardcoded secrets from source
2026-06-05 12:00:30 -04:00
c887d6d9d8 fix(security): remove hardcoded secrets from source
Replace all hardcoded credentials with configuration-injected values:
- SQL Server connection strings -> ${CONNECTION_STRING} env-var placeholders (4 appsettings files)
- SendGrid API keys -> ${SENDGRID_API_KEY} (incl. commented copies in SendMessage.cs)
- JWT signing secret -> ${JWT_SECRET} (3 appsettings files)
- AWS access key pair in UploadFileHp.cs -> DI-injected IAmazonS3 (SDK default credential chain)
- Google Maps API keys in App.razor / Home.razor -> IConfiguration lookup
- Legacy SMTP credentials in SendMessage.cs comments -> placeholders

Add .env.example documenting required environment variables and a
Configuration & Secrets section in BACKEND_ARCHITECTURE.md.

All exposed credentials were rotated 2026-06-05 prior to this scrub.
Source: github-audit-report.md Criticals 1-2 (Agent A4).
Verified: dotnet build 0 errors; secret-pattern grep clean.
2026-06-05 11:56:54 -04:00
Adam Moussa
50a4bf57f8
Merge pull request #2 from Sea-Haven-Industries/Dev
Dev
2026-05-14 17:35:05 -04:00
npalOmega
57d378125f fixing architecture 2026-05-14 11:09:17 -05:00
npalOmega
59385cf5b1 backend changes 2026-05-14 11:00:12 -05:00
npalOmega
5e4d9894e9 backend architectural template 2026-05-06 10:49:33 -05:00
npalOmega
ac76b201de refactor 2026-04-28 18:55:14 -05:00
npalOmega
64adcae4ed fixes for Dev changes 2026-04-24 12:12:16 -05:00
Adam Moussa
06bde26aff Wire FollowUp controller for real CRUD
Adds GetById and Delete; switches list filter from completed=bool to
status=string; expands list payload with FK ids, ScheduleStartTime, and
joined CreatedByName so the frontend edit form can prefill and the list
can show who created each item. Requires auth and stamps createdby from
the logged-in user on Create.
2026-04-20 13:49:45 -04:00
Adam Moussa
899ee7b83d Add NTE uplift workflow and vendor PO detail API
Introduces DispatchUpliftRequest entity and tier-gated approval flow:
vendors request a new NTE from the portal, dispatchers approve or deny
in SHOC, and requests above a configurable threshold require a higher
role. Adds DispatchController for PO-centric list/detail used by the
new Vendor POs page. Seeds Dispatcher and Manager roles.
2026-04-20 13:25:56 -04:00