Commit graph

40 commits

Author SHA1 Message Date
4315f704c7 Renewal settings, client setup queue, manager setup page, combobox grouping, nav updates 2026-04-10 13:50:04 +00:00
d109a5f73a fix: raise task fetch limit to 1000 — Jeanne/Christine showed 0 tasks because terminal tasks with old dates filled the 200-task limit before NOT_STARTED tasks 2026-04-09 21:00:56 +00:00
0c6fccadd6 Client cards/table: parent (branch icon) and child (arrow icon) visual indicators with tooltips 2026-04-09 17:13:19 +00:00
ceb82c9ef7 User select dropdowns: group all staff by department (Claims first, then alphabetical) 2026-04-09 15:44:52 +00:00
ff6135da5c Fix: AFW sync no longer overwrites user department on update, rename labels to Renewal 2026-04-09 15:01:11 +00:00
d482c6fe2a ui: move parent/child badges to right side of client header 2026-04-09 13:02:32 +00:00
4774eb1932 feat: parent/child company badges in client header
- Parent companies show a violet badge with subsidiary count, clickable to open modal
- Modal lists each subsidiary with policy count, task count, and claims advocate, click to navigate
- Child companies show a blue badge with parent name, clickable to navigate to parent page
- Both badges update reactively with state
2026-04-09 12:52:56 +00:00
170bb35921 feat: add sort/filter header to client detail tasks tab
- Sort by Date or Priority (asc/desc toggle)
- Hide completed/NA/cancelled tasks by default
- Show Completed toggle button
- Show Archived button for old tasks
- Richer task cards with status badges, priority pills, overdue highlighting
- Tab count shows active tasks only
2026-04-09 01:05:29 +00:00
17f475cd9c ui: increase spacing and font size in task header bar 2026-04-09 00:58:47 +00:00
fd878f7701 ui: single header bar with sort left, filters + status tabs right 2026-04-08 22:42:00 +00:00
98a567e752 ui: merge sort/filter bar with status tabs in single header row, remove 'All Tasks' title 2026-04-08 22:40:18 +00:00
d82b3dc611 feat: sortable/filterable column header on task list
- Sort by Client, Date, Type (Group/Policy/Client), Level (priority)
- Click to sort asc/desc with arrow indicators
- Filter dropdowns for Type and Level with Clear button
- Applied after card filter and status tab filter
2026-04-08 21:23:46 +00:00
33ec8b2799 fix: treat NA and CANCELLED as terminal statuses in task list UI
The 'Assigned' tab, overdue count, and card filters were only excluding
COMPLETED tasks. NA and CANCELLED tasks with old due dates were showing
as overdue. Now all three terminal statuses are excluded from active views.
2026-04-08 21:19:20 +00:00
f81817c0f6 fix: Prisma where clause conflict causing old non-terminal tasks to bypass dueDate cutoff
Top-level OR and AND keys on the same where object conflicted — consolidated
all suppression conditions into a single AND array in both the SSR page
query and the /api/tasks route.
2026-04-08 18:38:07 +00:00
848881bbd8 chore: gitignore sql backups and remove accidentally committed backup 2026-04-08 18:07:53 +00:00
3a8f21704a fix: hydration mismatch in run history date formatting 2026-04-08 18:07:36 +00:00
1d01c3fb3d fix: remove site picker, hardcode Commercial site for SHAPE import browser 2026-04-08 13:43:02 +00:00
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