Commit graph

123 commits

Author SHA1 Message Date
e954a8f78e feat: SharePoint location picker for SHAPE import (site → drive → folder)
- GET /api/admin/shape-import/browse: lists sites, drives, and folders via Graph API
- ShapeImportPanel: cascading Site / Document Library / Folder selects
  with loading states, error display, and Reset to default
- folderPath stored on ShapeImportRun, passed through to runShapeImport
- discoverFiles accepts dynamic folderPath instead of hardcoded path
- Prisma: added folderPath field to ShapeImportRun model
2026-04-08 13:34:54 +00:00
ce84a5435e fix: extract date prefix from ad-hoc task text for correct dueDate/completedAt 2026-04-08 12:06:41 +00:00
ca2c9c701d feat: SHAPE historical import admin UI
- New DB tables: shape_import_runs, shape_import_logs (raw SQL applied)
- src/lib/shape-import/run-import.ts: importable core logic extracted from CLI script
- POST /api/admin/shape-import: starts run async, returns runId immediately
- GET /api/admin/shape-import: lists last 20 runs
- GET /api/admin/shape-import/[id]: polls log lines and run status
- /admin/shape-import page: drive ID config, dry run / execute (with confirmation),
  live log panel (2s poll), stats summary, run history with log replay
- Admin index: added SHAPE Historical Import card
2026-04-08 11:19:37 +00:00
25d1aa493c docs: SHAPE historical import documentation 2026-04-08 10:57:38 +00:00
56664068f8 refactor: client detail page layout - notes collapsible near top, assignment tab
- Notes moved to collapsible panel just below header
  - Auto-expanded if client has notes, collapsed if empty
  - Shows preview snippet when collapsed
- Claims Advocate, Designations, Team Members, Related Companies
  consolidated into new 'Assignment' tab
- Removed 4 standalone cards from main scroll area
2026-04-08 10:10:39 +00:00
851487a8dd fix: advocate dropdown on client list shows claims dept only 2026-04-08 10:05:10 +00:00
d45daacf28 feat: user dropdowns collapse 'All Staff' behind expandable toggle
- Add shared UserSelectContent component with Claims-first layout
- All Staff section is collapsed by default, click the label to expand
- Applied to: tasks 'Viewing as', tasks 'Transfer to', assign page
  (claims advocate + bulk assign), additional service modal 'Assign to'
2026-04-08 02:48:31 +00:00
a160a88b08 fix: add task suppression to /api/tasks GET route (used by admin 'view as' feature)
This was the 4th location missing the filter — the API endpoint had no
suppression at all, so old/dead tasks showed when admins viewed other users' tasks.
2026-04-08 02:37:33 +00:00
8db7113c0b fix: task suppression filter was not working - NOT array requires all conditions to match
Prisma NOT:[condA, condB] means exclude only if BOTH match, and OR at the
same level overrode the NOT entirely. Restructured to:
- NOT (single object) for dead policy exclusion
- OR for group expiry check (null group OR recent renewal)
- AND > OR for recent-or-terminal filter

Fixed in all 3 locations: tasks page, client tasks API, client detail SSR.
2026-04-08 02:16:04 +00:00
8aa20ea751 feat: sync contacts from AMS 360 AFW_PolContact into ClientContact
- Add source, title, mobilePhone fields to ClientContact schema
- Add composite unique constraint for dedup (clientId, name, label, source)
- Add fetchAfwContacts() query with dedup by (CustId, Name, Responsibility)
- Add syncContacts() phase to sync engine with retry logic
- Update contacts UI to show title, mobile phone, AMS badge
- Disable edit/delete on AMS-synced contacts (source='ams')
2026-04-08 02:08:27 +00:00
9dd30de358 feat: pre-launch fixes - renewal date, task suppression, active policies, contacts, N/A enforcement, completion prompts, task groups, client notes, parent/subsidiary linking 2026-04-07 01:56:18 +00:00
0ac872a4da Tasks: level badge (Client/Policy/Group) on task cards, fetch policyGroup data 2026-03-31 18:08:08 +00:00
0d8edc97da Additional Service: ad hoc task creation on tasks page, client detail, policy group manager 2026-03-31 16:40:49 +00:00
c5c3d5a4ab Tasks: client filter search, unified fetchTasks, fix transfer refresh 2026-03-31 16:09:33 +00:00
881b82f986 Tasks: clickable filter cards, transfer tasks, policy type display, client policy filter 2026-03-31 16:04:05 +00:00
4aa19e6a21 Tasks: multi-note system, claims-first viewer dropdown, TaskNote schema 2026-03-25 14:57:21 +00:00
a583d76fc7 Fix: clients API team->members relation, prisma generate for notes field 2026-03-25 14:46:29 +00:00
73c93d3c7f Tasks: notes field, status toggle, employee view-as, assign page improvements, generate-and-assign 2026-03-25 14:38:02 +00:00
9bb2e14151 Rename: OnDeck -> Horizon, update URL to horizon.seubert.cloud
- Update page title, metadata, sign-in header, nav bar brand name
- Update dev account emails from ondeck.local to horizon.local
- Update comments in permissions.ts and types/index.ts
- Update NEXTAUTH_URL to https://horizon.seubert.cloud
- Update systemd timer service URL and log path
2026-03-18 11:43:25 +00:00
35748219ab Fix scheduled sync: add cron endpoint, systemd timer, bypass auth middleware
- Add /api/cron/sync route secured by x-cron-secret header
- Bypass NextAuth middleware for /api/cron/* routes
- Add CRON_SECRET to .env
- Fix FK violation: pass undefined instead of 'system' for triggered_by
- Systemd timer (ondeck-sync.timer) runs daily at 2 AM via curl
2026-03-18 10:54:27 +00:00
0abcadaa71 Feature: policy groups, task assignment, claims advocate, client members, audit log, combobox UI
- Schema: add PolicyGroup, ClientMember, claimsAdvocateId; migrations included
- API: /api/clients/[id]/team (flat ClientMember), /api/clients/[id]/policy-groups
- API: /api/policy-groups, /api/tasks/bulk-assign, /api/cron/auto-generate
- API: /api/admin/audit, filter clients by advocateId/teamMemberId (name format fix)
- API: /api/users supports department filter
- UI: policy-group-manager, client-detail assignments card (combobox, claims dept filter)
- UI: bulk assign page /tasks/assign, audit log viewer /admin/audit
- UI: nav-bar Assign Tasks link, admin audit log link
- UI: combobox component with search/filter
- Auth: audit logging for sign-in, user role changes
- Fix: Prisma client regenerated for new schema fields
- Fix: teamMemberId filter uses Last,First name format for policy matching
- Fix: suppressHydrationWarning on all formatDate spans
2026-03-18 01:49:52 +00:00
6f2b8efef0 Add root .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:22:08 +00:00
b036a93da2 Initial commit: OnDeck project
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:20:52 +00:00