Commit graph

80 commits

Author SHA1 Message Date
b98c67482a feat: QuickBooks Online integration
- Add QBO OAuth2 client with token refresh (lib/services/qbo-client.ts)
- Add QBO sync service for invoices, payments, deposits, purchases, journal entries, reports (lib/services/qbo-sync-service.ts)
- Add QBO types (lib/types/qbo.ts)
- Add API routes: /api/qbo/auth, /api/qbo/sync, /api/qbo/disconnect
- Add /admin/qbo status and sync management page
- Add legal pages: /legal/eula, /legal/privacy (Intuit app assessment)
- Add QBO nav link under Admin
- Fix reports: remove invalid summarize_column_by, add accounting_method from Preferences API, add showrows=all&showcols=all
- Add CashFlow report type alongside P&L and BalanceSheet
- Add NoReportData check to skip empty report months
- Add intuit_tid capture in error messages
- Add redirect: follow for cluster routing
- Migration 051: qbo_tokens, qbo_invoices, qbo_payments, qbo_deposits, qbo_transactions, qbo_reports tables

Also includes earlier work:
- Ping flap suppression pipeline step
- Ticket digest reports with LLM analysis
- Zabbix WAN monitor and gap analysis
- Kiosk is_deleted filter fixes
- Datto RMM ping target enrichment
- Entity sync soft-delete detection
2026-03-17 07:39:55 -04:00
c518eefdb2 feat: Morning NOC Summary adaptive card for Teams
- Add MorningSummaryService with Zabbix aggregation and adaptive card builder
- Add webhook delivery system with Teams incoming webhooks
- Add admin UI at /admin/morning-summary for webhook/config management
- Add API routes: /send, /test, /webhooks, /webhooks/[id], /config, /history
- Register morning-summary cron job in SyncScheduler (Mon-Fri 6:30 AM)
- Add outages_only filter (Unavailable triggers only)
- Fix host resolution: use getTriggerEnabledHosts to exclude disabled hosts
- Fix resolved events: event.get value:1 scoped to window with r_eventid filter
- Remove emojis from fact rows and section headers in card
- Remove Open Zabbix button (duplicate of View Problems)
- Add migrations: morning_summary_config + morning_summaries tables
- Add outages_only column to morning_summary_config
2026-03-11 09:34:51 -04:00
19605f82aa feat: IT Glue integration, workflow engine, pipelines, Zabbix WAN, notification channels, backup status UI improvements, nav alignment fixes 2026-02-27 14:52:14 -05:00
ed6c4a8b65 feat: Add SentinelOne integration
- Add SentinelOne API client (lib/services/sentinelone-client.ts)
  - Paginated fetching for sites, agents, threats
  - JWT token auth via S1_API_URL / S1_API_TOKEN env vars

- Add SentinelOne sync service (lib/services/sentinelone-sync-service.ts)
  - Full sync: sites, agents, threats into s1_* tables
  - Sync history tracking with per-entity results

- Add DB migration 038: s1_sites, s1_agents, s1_threats,
  s1_company_mappings, s1_sync_history tables

- Add API routes:
  - POST/GET /api/sentinelone/sync
  - GET/POST/DELETE /api/sentinelone/company-mappings
  - GET /api/sentinelone/coverage (fixed Cartesian product bug)

- Add UI pages:
  - /admin/sync/sentinelone — sync admin with history + stats
  - /sentinelone/coverage — AV coverage report per site
  - /sentinelone/mappings — map S1 sites to Autotask companies

- Wire SentinelOne into admin sync overview card grid
- Add SentinelOne Sync to app navigation
- Fix docker-compose: remove explicit S1 env var entries that
  were overwriting env_file values with empty strings
2026-02-27 05:31:31 -05:00
d7c3dc7168 feat: Autotask webhook integration, TicketNotes, Datto RMM, workflow engine, Veeam agents/alarms, AI triage, misc improvements 2026-02-20 10:28:15 -05:00
347cf4e298 feat: dual-tab DetailModal with Formatted and Raw views
- Formatted tab: grouped sections (Overview, Parties, Classification, Dates, System)
- ID-to-label resolution for status, priority, source, queue, company type
- Elegant bordered table layout with muted label column
- Clickable phone/URL fields, monospace IDs, formatted dates
- Description rendered in its own block for tickets
- Raw tab: all fields with monospace keys, copy-on-hover
- Auto-detects ticket vs company data for appropriate grouping
- Shadcn Tabs, Separator, Badge used throughout
2026-02-19 21:00:33 -05:00
6ccdb156ba fix: remove hardcoded sm:max-w-lg from DialogContent so className overrides work
- Removed sm:max-w-lg default that was overriding max-w-7xl in DetailModal
- DialogContent now respects whatever max-w class is passed via className
- Fixes data browser detail modal not widening as expected
2026-02-19 20:51:57 -05:00
2eee5e09f0 style: widen data browser detail modal from max-w-4xl to max-w-7xl 2026-02-19 20:46:41 -05:00
3c13defacb feat: kiosk UI updates - new cards, gauge chart, performance improvements
- Updated kiosk stats API with expanded metrics
- New components: company-tickets-card, gauge-chart, service-desk-card, ticket-leaders-card
- Updated cycling-display, kpi-card, and ticker components
- Added performance.css for kiosk optimizations
- Added Wulf logo asset
2026-02-19 15:31:23 -05:00
5dc7a7e66b feat: Veeam VSPC backup integration - sync, compliance, UI
- Database: 7 Veeam tables + backup_type_udf column on configuration_items
- API Client: VSPC REST API v3 client with pagination, rate limiting, Bearer auth
- Sync Service: full/incremental sync for orgs, servers, repos, jobs, agent jobs, workloads
- Scheduler: veeam-incremental (30min) and veeam-full (daily 2AM) schedules
- Compliance Engine: cross-references Autotask config items vs Veeam workloads
- API Endpoints: backup-status, companies, workloads, jobs, repos, compliance, sync
- UI: Backup Status page with Overview + Contract Compliance tabs
- Navigation: added Backup Status link with HardDrive icon
- Docker: added VEEAM_VSPC_URL and VEEAM_VSPC_API_KEY env vars to compose
2026-02-11 21:04:28 -05:00
a1e0e7c7c0 feat: improve ticker layout and speed controls
- Restructured ticker to show ticket number and title on first line
- Company name now displays on second line below ticket
- Adjusted ticker speed slider range: 8s-120s (was 10s-120s)
- Changed step from 5s to 2s for finer speed control
- Allows 25% faster speed adjustment (down to 8s)
- Better two-line layout for improved readability
2026-02-05 08:13:25 -05:00
73a2e9b9a3 perf: optimize ticker animation and increase speed
- Added translate3d(0,0,0) for hardware acceleration
- Added font smoothing for better rendering
- Reduced default ticker speed from 60s to 30s (2x faster)
- Improved animation smoothness to reduce jitter
- Better GPU acceleration with backface-visibility and willChange
2026-02-05 07:58:33 -05:00
4a545b5f5c fix: use container class to align navigation with dashboard cards
- Changed from max-w-6xl to container mx-auto
- Restored left-4 and right-4 positioning for logo and theme toggle
- Navigation edges now align perfectly with dashboard card edges
- Matches the same container padding used throughout the app
2026-02-04 09:00:33 -05:00
b7e43c2232 style: align navigation edges with card content
- Removed container class, using max-w-6xl with px-4 directly
- Changed absolute positioning from left-4/right-4 to left-0/right-0
- Navigation edges now align perfectly with card edges
- Logo lines up with Dashboard text on left
- Theme toggle aligns with card edge on right
2026-02-04 08:50:41 -05:00
4316d0187f style: constrain navigation width to match content cards
- Added max-w-6xl to navigation container
- Navigation now aligns with KPI cards on wide screens
- Prevents navigation from stretching too wide
- Maintains consistent layout alignment
2026-02-04 08:48:09 -05:00
94f960bdbf fix: replace all favicon files with Wulf logo
- Replaced favicon.ico with Wulf logo PNG
- Removed old icon.svg (triangle icon)
- Added icon.png with Wulf logo
- All favicon formats now use Wulf logo
- Should fix persistent triangle icon issue
2026-02-04 08:45:19 -05:00
f49767d1eb fix: update favicon to use Wulf logo PNG format
- Added favicon.png copy of Wulf logo
- Updated metadata to use PNG favicon with multiple size options
- Should fix triangle icon issue in browser tab
- Favicon now properly displays Wulf logo
2026-02-04 08:12:35 -05:00
7b3830a388 fix: move Wulf logo to left navbar, correct spelling to Wulf
- Replaced Pulse icon with Wulf logo on left side of navbar
- Removed duplicate logo from right side
- Corrected alt text from 'Wulff' to 'Wulf'
- Logo now appears next to Pulse branding on left
2026-02-03 23:52:56 -05:00
98199f671d feat: add Wulff Consulting logo to navigation and favicon
- Added Wulff logo (W_RGB.png) to public directory
- Updated favicon to use Wulff logo
- Added logo to upper right of navigation bar (h-10)
- Logo appears next to theme toggle
- Links to home page when clicked
2026-02-03 23:49:58 -05:00
13fd13afd6 style: remove all top padding on kiosk display
- Changed to px-4 pb-4 pt-0 (zero top padding)
- KPI cards now sit right against navigation bar
- Maximizes vertical screen space for TV display
2026-02-03 23:41:47 -05:00
60b58b3f57 style: reduce top padding on kiosk display
- Changed padding from p-16 to p-4 pt-2
- Brings KPI cards closer to navigation bar
- Better use of screen space for TV display
2026-02-03 23:39:38 -05:00
f27b23bec8 fix: pre-populate classifications instead of syncing from Autotask API
- Autotask REST API doesn't expose ClassificationIcons endpoint
- Created migration to populate 17 standard classification icons
- Removed sync button from UI (classifications are pre-loaded)
- Includes: Tools Only, Co-Managed, Wulf 365 Essentials, Partner, etc.
- Users can now select any classification to exclude from kiosk
2026-02-03 20:54:35 -05:00
b222d97225 feat: add classification icons sync from Autotask
- Created company_classifications table to store Autotask classification icons
- Added getClassificationIcons() method to AutotaskClient
- Created /api/sync/classifications endpoint (GET/POST)
- Updated kiosk settings UI to dynamically load classifications
- Added 'Sync from Autotask' button to pull latest classifications
- Removed hardcoded classification list
- Display classification name and description in checkboxes
- Allow excluding any classification synced from Autotask
2026-02-03 20:48:08 -05:00
9940c20379 fix: parse excluded_classifications as array and handle companies API response
- Fixed settings API to parse excluded_classifications as array
- Fixed companies API response handling (returns {companies: []} not array)
- Resolves TypeError: excluded_classifications.filter is not a function
- Resolves TypeError: s.sort is not a function
2026-02-03 09:20:50 -05:00
root
1d99a8f659 feat: add classification-based filtering and fix company name display
- Added classification column to companies table
- Created excluded_classifications setting (default: Tools Only)
- Updated kiosk stats and activity APIs to filter by classification
- Added comprehensive classification filtering UI with checkboxes
- Support for common classifications (Tools Only, Wulff Consulting Client, Customer)
- Allow custom classification entry
- Fixed company name display in settings (convert string IDs properly)
- Classification filtering works alongside company ID exclusions
2026-02-03 09:17:07 -05:00
root
62ec703f81 feat: increase ticket font sizes and fix company name display
- Increased ticket number font from text-lg to text-2xl
- Increased company name font from text-sm to text-lg
- Increased ticket title font from text-xs to text-base
- Increased padding on ticket cards for better spacing
- Fixed company ID to name conversion in settings page
- Ensure excluded_company_ids are parsed as numbers for proper lookup
2026-02-03 09:09:46 -05:00
root
26bfd503f1 feat: add kiosk settings UI and co-managed client filtering
- Created kiosk_settings table for configuration storage
- Added API endpoints for kiosk settings (GET/POST)
- Filter out co-managed clients (configurable company exclusions)
- Built comprehensive settings UI at /kiosk/settings
- Allow excluding specific companies from kiosk display
- Configurable cycle interval, refresh interval, and RMM alert toggle
- Updated dashboard link to point to settings page
- Applied company exclusion filter to all ticket queries and activity feed
- Default excludes Thrasher Group (ID: 29861361)
2026-02-03 08:32:42 -05:00
root
724791121a feat: add top 3 tickets display on kiosk KPI cards
- Show company name and ticket title for top 3 tickets per category
- Critical tickets sorted by priority then create date
- Waiting tickets sorted by oldest activity
- Stale tickets sorted by oldest activity
- Overdue tickets sorted by most overdue
- Closed tickets sorted by most recent
- Adjusted card layout to accommodate ticket list
2026-02-03 08:25:27 -05:00
root
1d1b4d2a71 fix: exclude RMM alert tickets (source=8) from kiosk stats - show only human-generated tickets 2026-02-03 07:02:47 -05:00
root
2ebf8e6732 fix: correct time_entries column name from date_worked to entry_date 2026-02-02 23:48:17 -05:00
root
aec21d2b1e fix: replace Radix UI slider with custom implementation to avoid dependency 2026-02-02 23:39:24 -05:00
root
20a0785ec3 feat: add executive kiosk dashboard for TV display
- Created /kiosk route with full-screen display
- Added API endpoints for stats and activity feed
- Built cycling KPI display with 12 metrics
- Added scrolling ticker for ticket activity
- Implemented UI-configurable cycle interval (3-15s, default 7s)
- Focus on critical tickets and business metrics
- Added navigation link from dashboard
- Dark theme optimized for TV viewing
2026-02-02 23:36:35 -05:00
root
4d531b2f2d feat: auto-populate auvik_tenants and rmm_sites tables when fetching mappings
When includeUnmapped=true, the mapping APIs now populate the
auvik_tenants and rmm_sites tables with all fetched data.
This ensures accurate mapped/unmapped counts on the dashboard.
2026-02-02 23:12:35 -05:00
root
c0190c7dd1 feat: add tenants/sites sync for accurate dashboard stats
- Created auvik_tenants and rmm_sites tables
- Added /api/sync/tenants-sites endpoint to sync all tenants from Auvik
  and all sites from Datto RMM for accurate mapped/unmapped counts
2026-02-02 23:02:34 -05:00
root
a050157836 feat: create auvik_tenants and rmm_sites tables for accurate dashboard stats
Added tables to store all tenants/sites from external APIs.
Populated with existing mapped data. Full sync of all tenants/sites
needed for accurate unmapped counts.
2026-02-02 23:01:54 -05:00
root
f1985e2ea5 fix: use loose equality for company ID comparison in mapping dropdowns
The dropdown wasn't showing mapped company names due to type mismatch
between string and number IDs. Changed === to == for comparison.
2026-02-02 22:52:59 -05:00
root
ca61b7785d fix: correct RMM mapping column name from autotask_company_id to company_id 2026-02-02 22:44:40 -05:00
root
4bb8e25f56 fix: transform snake_case database columns to camelCase in companies API
The companies were being returned with database column names (snake_case)
but the TypeScript Company interface expects camelCase. Added transform
function to convert column names, fixing the localeCompare error in
mapping pages.
2026-02-02 21:54:52 -05:00
root
d3eeb4cab3 fix: handle missing tables in dashboard stats API
- Added tableExists helper to check if tables exist before querying
- Gracefully handle missing auvik_tenants, rmm_sites, and quotes tables
- Return partial data when some tables are missing
2026-02-02 21:50:23 -05:00
root
db4d431d26 perf: use cached database data for dashboard stats
- Created /api/dashboard/stats endpoint that queries local PostgreSQL only
- Updated companies API to use cached database instead of Autotask API
- Dashboard now loads instantly from cached data instead of waiting for external APIs
- Scheduled syncs keep data fresh throughout the day
2026-02-02 21:45:18 -05:00
root
6df319166d feat: update favicon to match dashboard Activity icon
Created SVG icon that matches the Activity/pulse icon used in the app:
- Blue gradient background matching the app theme
- White pulse/activity line icon
- Updated layout.tsx to use the new SVG icon
2026-02-02 21:29:52 -05:00
root
49adba17f1 feat: add favicon support
- Added icon metadata to layout.tsx for proper favicon handling
- Copied favicon.ico to public folder for accessibility
2026-02-02 21:27:17 -05:00
root
efff465a86 style: center navigation bar to match rest of app layout
Changed navigation layout from spread (justify-between) to centered:
- Logo positioned absolutely on the left
- Navigation menu centered with mx-auto
- Right actions positioned absolutely on the right
- Container uses justify-center for proper centering
2026-02-02 21:22:57 -05:00
root
1f9ac476b4 fix: correct environment variable name in sync scheduler
The scheduled sync was using AUTOTASK_INTEGRATION_CODE but the actual
environment variable is AUTOTASK_API_INTEGRATION_CODE. This caused
scheduled syncs to fail with 'IntegrationCode is invalid' while
manual syncs worked fine.

Changed:
- AUTOTASK_INTEGRATION_CODE -> AUTOTASK_API_INTEGRATION_CODE

This aligns the scheduler with autotask-factory.ts which was already
using the correct variable name.
2026-02-02 21:13:35 -05:00
root
9f912aed24 feat: add authentication, user management, and admin features
Added comprehensive authentication and authorization system:

Authentication System:
- Better Auth integration with session management
- Login/logout pages and API routes
- Middleware for route protection
- Auth utilities and client libraries

User Management:
- User list, detail, and invite pages
- User API endpoints (CRUD operations)
- Session management for users
- Profile settings page

Role-Based Access Control:
- Role management pages (list, create, edit)
- Permission system with granular controls
- Role assignment to users
- Role API endpoints

Admin Features:
- Audit log page for tracking system events
- Admin settings page
- Audit service for logging user actions

Additional Features:
- Quotes management pages and components
- SalesBldr API integration
- Email service for notifications

Configuration & Documentation:
- Updated docker-compose.yml
- MCP server configuration (mcp.json)
- CVE-2025-55182 security review documentation
- Standards guide and PRD documents
- Re-enabling authentication documentation

Database Migrations:
- 012: Auth tables (users, sessions, accounts, verifications)
- 013: Role tables (roles, permissions, role_permissions, user_roles)
- 014: Admin settings table

UI Updates:
- Updated dashboard layout
- Enhanced app layout with auth integration
2026-01-31 12:43:14 -05:00
root
d8e6931b85 fix: ensure Companies and Resources get filters during incremental sync fallback
Fixed critical logic bug where Companies and Resources were not getting
proper filters applied when falling back from incremental to full sync.

Root Cause:
- During scheduled incremental sync, Companies and Resources correctly
  identify they don't support incremental sync
- However, the filter-building logic was in an else block that only
  executed for non-incremental syncs
- This caused Companies and Resources to sync with NO filters at all
- Autotask API now rejects queries without filters, returning:
  'Value cannot be null. Parameter name: filters'

Fix:
- Restructured logic so filter building happens for BOTH:
  1. Non-incremental (full) syncs
  2. Incremental syncs that fall back to full sync
- Companies and Resources now get active filters applied even during
  scheduled incremental syncs

This resolves the scheduled sync failures for Companies, Resources,
and all other entities that were failing due to the cascading effect
of early failures.
2026-01-30 22:50:07 -05:00
root
8405c813a3 feat: add missing Tickets entity fields from Autotask API
Added 10 critical missing fields to Tickets entity:

Database Migration (016):
- billing_code_id: Billing code assignment
- configuration_item_id: Primary asset/CI
- creator_resource_id: Ticket creator
- creator_type: Creator type (resource/contact)
- problem_ticket_id: Link to problem ticket
- rma_status: RMA status tracking
- rma_type: RMA type classification
- service_level_agreement_paused_next_event_hours: SLA pause tracking
- is_assigned_to_comanaged: Co-managed assignment flag
- is_visible_to_comanaged: Co-managed visibility flag

Entity Mapper Updates:
- Added all new fields with correct camelCase mapping
- Ensures all Autotask Tickets API fields are captured

This completes the Tickets entity to match the full Autotask API
specification and should resolve issues with missing ticket data.
2026-01-26 15:26:34 -05:00
root
cc16d9b32d fix: correct Tickets entity field name mappings from Autotask API
Fixed field names to use proper camelCase from Autotask API instead of
snake_case. This should resolve the issue where assigned_resource_id
was NULL because the mapper was looking for incorrect field names.

Changed mappings:
- firstResponseDateTime (was first_response_date_time)
- resolutionPlanDateTime (was resolution_plan_date_time)
- resolvedDateTime (was resolved_date_time)
- firstResponseAssignedResourceID (was first_response_assigned_resource_id)
- firstResponseInitiatingResourceID (was first_response_initiating_resource_id)
- projectID, opportunityID, contractID, monitorID (were snake_case)
- All change approval and ticket fields converted to camelCase
- All service thermometer fields converted to camelCase

This fix should populate assigned_resource_id and other fields correctly
on the next ticket sync.
2026-01-26 15:25:03 -05:00
root
7252d2cfcf feat: add all new Resource fields to data browser detail modal
Updated Resources data browser page to display all 40+ fields in the
detail modal including:
- Name fields (prefix, middle initial, suffix)
- All contact information (3 email addresses, home phone)
- Employment details (payroll, accounting, internal cost)
- Location and availability
- System preferences (date/time/number formats)
- Demographics and security (gender, license, security level)
- Survey ratings

Fields are organized into logical groups with comments for clarity.
2026-01-26 14:57:43 -05:00
root
bc01a6aafb fix: handle non-numeric values in Resources integer fields
Autotask API returns string values like 'PRIMARY' for some integer
fields (e.g., emailTypeCode). Added safeInt() helper function to:
- Parse numeric values correctly
- Return null for non-numeric strings
- Handle null/undefined/empty values

This prevents database errors when syncing Resources with non-standard
field values from Autotask API.
2026-01-26 14:48:37 -05:00