Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EdgarJr30/proyecto-de-grado-cms/llms.txt

Use this file to discover all available pages before exploring further.

Introduction

The Reporting & Analytics module provides a powerful, enterprise-grade dashboard for visualizing and analyzing maintenance operations across your organization. Built with real-time data aggregation, the platform delivers actionable insights for executives, operations managers, and technical teams.

Key Features

Multi-Dimensional Analysis

Analyze work orders, assets, inventory, and administrative metrics from multiple perspectives with customizable filters.

Real-Time KPIs

Track critical metrics like open work orders, overdue tasks, asset health, and inventory levels with live updates.

Custom Layouts

Drag-and-drop interface for personalizing dashboard layouts with user-specific preferences saved automatically.

Smart Filtering

Global filters for date ranges, locations, and custom periods (30d, 90d, YTD) apply across all report views.

Report Categories

The platform organizes reports into five specialized tabs:

Executive Summary

High-level overview for leadership and decision-makers:
  • Open and overdue work orders
  • Assets out of service
  • Inventory reorder alerts
  • Active announcements
  • Total inventory valuation
  • Special incident tracking

Work Management

Detailed analysis of maintenance operations:
  • Request and work order backlogs
  • Urgent and overdue tickets
  • Technician workload and productivity
  • SLA compliance rates
  • Deadline adherence metrics
  • Priority and status distributions

Assets

Comprehensive asset health and performance metrics:
  • Asset status and criticality distributions
  • Maintenance cost tracking
  • Downtime analysis
  • Warranty expiration tracking
  • Maintenance type breakdowns
  • Top assets by tickets, cost, and downtime

Inventory Parts

Supply chain and inventory intelligence:
  • Stock levels (on-hand, reserved, available)
  • Reorder suggestions
  • Part consumption trends
  • Document status tracking
  • Critical parts monitoring
  • Valuation and cost analysis

Administration

System health and access control insights:
  • User and role distribution
  • Permission matrix analysis
  • Technician assignments by section
  • Announcement management
  • Location demand analysis
  • Active user tracking

Architecture

Data Sources

Reports pull from multiple database views and tables:
// Executive summary aggregates data from:
- v_tickets_compat (work orders)
- v_assets (asset inventory)
- v_reorder_suggestions (inventory)
- announcements (system alerts)
- v_inventory_kardex (stock movements)

// Work management queries:
- tickets table with location/date filters
- ticket_assets (asset associations)
- assignee performance metrics

Report Service API

The reportService.ts provides five main report generators:
1

getExecutiveSummaryReport

Aggregates high-level KPIs across all modules with location/date filtering
2

getWorkManagementReport

Analyzes ticket lifecycle, technician productivity, and SLA compliance
3

getAssetsReport

Tracks asset health, maintenance costs, and downtime metrics
4

getInventoryPartsReport

Monitors stock levels, consumption patterns, and reorder needs
5

getAdminReportsData

Provides system administration and access control insights

Performance Optimization

Reports use database views (v_tickets_compat, v_assets, v_available_stock) for optimized query performance. Large datasets are limited to 10,000 rows with server-side aggregation.

Caching Strategy

The system implements intelligent data fetching:
  • Reports load on-demand when switching tabs
  • Filter changes trigger automatic refresh
  • Layout preferences persist in localStorage and optional remote sync
  • Animation states prevent unnecessary re-renders

Permissions

Access to report tabs is controlled by RBAC permissions:
TabRequired Permissions
Executive SummaryAlways visible
Work ManagementAlways visible
Assetsassets:read or assets:full_access
Inventory Partsinventory:read or inventory:full_access
Administrationusers:read, rbac:manage_permissions, rbac:manage_roles, or announcements:read
Users without appropriate permissions will not see restricted tabs. Ensure proper role configuration before granting report access.

Getting Started

1

Access Reports

Navigate to Reports from the main sidebar menu
2

Select Date Range

Choose a preset (30d, 90d, YTD) or set custom date filters
3

Filter by Location

Optionally filter data by specific facility or location
4

Choose Report Tab

Switch between Executive, Work, Assets, Parts, or Admin views
5

Customize Layout

Drag and drop KPI tiles and report cards to your preferred arrangement

Best Practices

Use narrower date ranges (30 days) for detailed analysis and broader ranges (YTD) for trend identification. Custom ranges work best for specific incident investigations.
Schedule weekly executive reviews and daily operational checks of critical KPIs like overdue work orders and inventory reorder alerts.
When analyzing facility-specific issues, use location filters to isolate metrics and identify site-specific patterns.
While direct export isn’t available in the UI, combine report insights with work order exports for comprehensive documentation.

Technical Details

The reporting system is built on:
  • Frontend: React 19 with TypeScript, Framer Motion animations
  • Backend: Supabase Postgres with materialized views
  • State Management: React hooks with local caching
  • Layout Persistence: reportLayoutService.ts with localStorage/remote sync

Code Location

Key implementation files:
  • /src/services/reportService.ts - Data aggregation and calculations
  • /src/services/reportLayoutService.ts - Layout persistence logic
  • /src/components/reports/ReportsDashboard.tsx - Main dashboard component
  • /src/pages/ReportsPage.tsx - Reports page wrapper

Next Steps

Explore the interactive dashboard features and learn how to customize your reporting views

Build docs developers (and LLMs) love