Commit graph

90 commits

Author SHA1 Message Date
8b43a25f4d Task system improvements batch
- Fix due date off-by-one: parse date-only strings as local time in formatDate/formatRenewalDate
- Additional Services: dynamic fetch of policies/groups when no context provided
- Template sync: admin button + POST /api/templates/[id]/sync endpoint
- Policy<>Group movement: confirmation dialog, cancel-policy-tasks, generate-policy-tasks APIs
- Client-level tasks: show anchor group renewal date with star in TaskCard
- Policy group manager: show star on anchor (earliest renewal) group
2026-04-24 18:26:43 +00:00
9331618ba6 Task templates: add policyTypeFilter field to form, table, and API 2026-04-23 12:40:19 +00:00
47fb5317a9 Admin backups UI: list, run-now, download, delete + backup volume mounted to app 2026-04-23 12:31:24 +00:00
f3a9fb6670 Clean restart: policyTypeFilter on templates, wipe+regenerate Apr 1+ endpoint, admin UI button 2026-04-23 11:06:39 +00:00
a4bc1bfe4f Login: remove white card, blend form into gold background 2026-04-14 12:46:51 +00:00
ca868f5226 Login page: right panel Seubert gold #D6A620, white card for form 2026-04-14 12:12:50 +00:00
792f1c81c2 Fix: include carrierName, writingCompanyName, policyGroup in SSR task data 2026-04-14 02:34:03 +00:00
07945ec1d9 Consistent task cards: client detail now uses shared TaskCard
- Extract TaskCard into components/tasks/task-card.tsx (full-featured)
- Client tasks API now includes policy, policyGroup, taskNotes
- client-detail replaces inline render with shared TaskCard
- Features now consistent: status dropdown, complete/NA/edit actions,
  inline notes panel, carrier info, policy group popover, due date
  urgency colors, priority dot
2026-04-14 02:13:34 +00:00
b3da81a5d8 Fix Has Policies filter to exclude dead-status policies
policies: some: {} was matching Non-Renewed, Cancelled, etc.
Now excludes Cancelled/Expired/Non-Renewed/Rewritten/Not taken
2026-04-14 01:58:06 +00:00
db9dae7c7c Scope dashboard KPIs to Shape clients only
- Client count: Shape/Shape2 designation only
- Policy count: active Shape policies (excludes dead statuses)
- Task count: open tasks on Shape clients (excludes NA/CANCELLED)
- Completion rate: excludes NA/CANCELLED from denominator
- /api/metrics intentionally left as system-wide (Prometheus)
2026-04-14 00:36:17 +00:00
c07e02855e Fix overdue counts on manager page
- teamMembers query now scoped to Shape clients + active tasks only
- TeamMembersByDepartment overdue calc uses overdueWindowDays window (default 7d)
- Workload API per-user fetch now only loads active tasks (massive perf win)
- Remove Completed/Completion% columns from workload table (no longer meaningful)
- overdueWindowDays passed through page -> client -> component chain
2026-04-14 00:27:47 +00:00
191698088b Manager overdue window: configurable via Admin > Settings
- Default 7 days: overdue tasks shown only within last N days
- New /api/admin/manager-settings endpoint (GET/PUT, AppSetting key)
- Workload API reads setting and applies to both summary count and per-user table
- Overdue card now shows 'past due within Nd' context label
- Admin > System Settings: new Manager Dashboard card with day input
2026-04-14 00:17:31 +00:00
27247f77f0 Fix Additional Service modal: department enum mapping and timing value
- Map display labels to DepartmentType enum values (CLAIMS, PERSONAL_LINES, etc.)
- Fix timing from invalid 'ONGOING' to 'PRE_RENEWAL' (only valid values)
- Remove unused TIMINGS constant
2026-04-13 22:55:59 +00:00
5934ff7c4f Fix Manager tab KPIs and workload metrics
- setupQueueCount: add policies: { some: {} } filter (match setup-queue API)
- recentTasks: scope to Shape clients, order by updatedAt not createdAt
- Workload API: scope all metrics to Shape clients only
- Workload API: filter tasks by task.department not assignee department
- Workload API: exclude NA/CANCELLED from totalTasks and completion rate denominator
- Workload API: scope userAssignments filter to match department/client scope
2026-04-13 22:44:50 +00:00
c40dd68360 Fix Shape import resolvePolicyLink: use nearest match, no date window
- Removed ±40 day window restriction that caused prior-cycle tasks to miss their group/policy
- Now finds nearest group/policy by absolute date proximity for any cycle
- Deleted 310 client-level orphans created by previous import runs
2026-04-13 20:39:09 +00:00
4e54b7e38c Fix: POLICY-level tasks now generated for all active policies (grouped or not)
- Historical reset: removed policyGroupId: null filter from policy loop, use level POLICY only
- Gap fill: same fix - all active future policies get POLICY-level tasks
- BOTH-level templates remain on groups (for grouped) or policies (for ungrouped)
- ~3500 grouped policies were missing their POLICY tasks (loss runs, mod factor, etc)
2026-04-13 20:25:10 +00:00
02afceb0c5 Fix Shape import: resolve policyId/policyGroupId when creating new tasks
- Add resolvePolicyLink() to find closest policy group or policy by effectiveDate window
- Include template level in DbTemplate interface and loadDbState query
- New tasks created by import now carry correct policyId or policyGroupId
- Delete all 492 orphaned POLICY/RENEWAL_GROUP tasks (no policy link)
2026-04-13 19:55:40 +00:00
00b5fab1ba Add Gap Fill: delete 507 orphaned tasks, new /api/admin/gap-fill endpoint, button in shape-import panel
- Deletes tasks where POLICY/RENEWAL_GROUP template has no policy_id/policy_group_id
- Gap Fill creates missing tasks per group/policy/client without overwriting existing ones
- Existence check within 5-day window prevents duplicates
- Gap Fill button added to shape-import admin panel with inline result summary
2026-04-13 19:40:34 +00:00
36076ce90d Add carrierName/writingCompanyName to tasks GET and PATCH API responses 2026-04-13 18:20:07 +00:00
e712420347 Min-2 policy rule for groups (singles \u2192 unassigned); fix setup-queue badge 0-policy filter 2026-04-13 17:57:06 +00:00
a6fa5d12ea Task card carrier/writing co + group popover; fix Renews date; filter 0-policy setup queue; login tagline; advocate reassign dialog 2026-04-13 17:42:36 +00:00
384821de33 Fix: exclude static image files from auth middleware matcher 2026-04-13 02:58:02 +00:00
cf79b3453d Signin: use black logo with CSS invert for white rendering on green panel 2026-04-13 02:52:33 +00:00
5406d24c1f Signin: use plain img tags for logos to fix rendering, white logo on green panel 2026-04-13 02:45:58 +00:00
e0116b0faf Signin: color logo on left, road-green icon on right, black road favicon 2026-04-13 02:29:46 +00:00
e588b98127 Signin: use color Seubert logo on white right panel 2026-04-13 02:21:26 +00:00
6b29eaa39f Signin: use correct white logo PNG, fix company name, center Welcome back, remove subtitle 2026-04-13 02:05:37 +00:00
3f44adc8bc Signin: modern split-panel with Seubert logo, MS SSO primary, remove dev accounts, local login collapsed 2026-04-13 01:55:47 +00:00
6117b23123 Remove obsolete docker-compose version attribute 2026-04-13 01:28:40 +00:00
bbdbe1ddc0 Rebrand: rename ondeck->horizon in package.json, docker-compose, SERVER.md, docs; production stack at /opt/stacks/horizon 2026-04-12 23:59:20 +00:00
77f23e12cd Logging: add missing audit logs (setup, contacts, task create/note, renewal settings); add /api/metrics Prometheus endpoint 2026-04-12 23:40:57 +00:00
daf0a1a83e Apply Seubert brand colors: deep forest green primary, accent green, gold highlights (light + dark) 2026-04-12 23:32:22 +00:00
9028af2b4e Task card: make client name a clickable link to client detail (opens in new tab) 2026-04-12 21:07:26 +00:00
ad8b03e7ba Task cards: show group renewalDate; historical reset script; CLIENT task level; default window 30d 2026-04-12 20:55:54 +00:00
ffa14f0456 Change default renewal group window from 90 to 30 days 2026-04-12 19:53:07 +00:00
85777b6a7d Add CLIENT task level, fix manager dashboard stats, renewal date anchor for tasks, combobox department grouping 2026-04-12 19:48:52 +00:00
c1a836d5d8 Task templates: add level field (Policy/Renewal Group/Both) with schema migration, UI selector, and generation logic 2026-04-10 18:31:38 +00:00
cfefc255b1 Fix: client card policy count now only counts Active policies to match detail page 2026-04-10 15:10:37 +00:00
7d21dec81a Fix due date bg: use solid Tailwind red-900/950 for dark mode instead of opacity-blended 2026-04-10 15:00:31 +00:00
22089d24b3 Task card: proper tooltips on all icons, brighter red due date bg (40% opacity in dark) 2026-04-10 14:55:15 +00:00
5ed6605460 Fix: brighter red/orange due date bg in dark mode, remove status select background 2026-04-10 14:53:16 +00:00
ae66f931f7 Task card: excel-style grid with sharp corners, border cells, no status bg 2026-04-10 14:49:25 +00:00
4852acafda Task card: due date urgency bg, clickable status dropdown, plain text level, consistent text-xs 2026-04-10 14:46:30 +00:00
a215d7ce44 Task card: larger icons (h-5), auto-width data column 2026-04-10 14:42:32 +00:00
5c1ae6858a Task card right sidebar: 2-col layout — data col (due/status/level) + icon col (complete/NA/edit) + full-width notes 2026-04-10 14:40:10 +00:00
f2192cb70b Task card: right sidebar with Due/Status/Level info + 2x2 action grid 2026-04-10 14:35:51 +00:00
bc240c79c1 Task card redesign: remove duplicate notes, cleaner layout with header/meta separation 2026-04-10 14:27:50 +00:00
04c87f111a Task editing: reusable TaskEditModal, expanded PATCH API, edit button on all task surfaces 2026-04-10 14:20:57 +00:00
8c5516f353 Tasks always show Policy #, Type, Renewal Date, and clickable notes icon on all surfaces 2026-04-10 14:00:54 +00:00
02d1fcb73d Design principles: Claims First (collapsed others) + Renewal Date (+1 day) everywhere 2026-04-10 13:56:46 +00:00