feat: add wagon performance report and export functionality

- Implemented  for Excel download of wagon performance report sections, including column width adjustment and timestamped filenames.
- Created  to compute derived wagon performance figures based on movements and status logs, ensuring consistency with API data.
- Enhanced  with new fields for tracking last movement and statistics window days for improved reporting capabilities.
This commit is contained in:
marshalyordanos
2026-09-03 23:25:19 +03:00
parent 380ba4c4c9
commit eaa006a932
12 changed files with 3038 additions and 48 deletions

View File

@@ -62,6 +62,8 @@ import ContractTemplatesPage from "./pages/contract_templates/ContractTemplatesP
import PortalContentPage from "./pages/portal_content/PortalContentPage";
import ContractTemplateEditorPage from "./pages/contract_templates/ContractTemplateEditorPage";
import FleetResourcePage from "./pages/fleet/FleetResourcePage";
import WagonPerformancePage from "./pages/wagon-performance/WagonPerformancePage";
import WagonPerformanceDetailPage from "./pages/wagon-performance/WagonPerformanceDetailPage";
import WagonTransfersPage from "./pages/wagons/WagonTransfersPage";
import VehicleDetailPage from "./pages/fleet/VehicleDetailPage";
import DriverDetailPage from "./pages/fleet/DriverDetailPage";
@@ -232,6 +234,24 @@ const App = () => {
</RequirePermission>
}
/>
{/* Wagon performance — a read-only executive report beside Overview.
Separate from the Fleet Management wagons desk, which owns CRUD. */}
<Route
path="wagon-performance"
element={
<RequirePermission permission={FREIGHT_PERMS.wagons.view}>
<WagonPerformancePage />
</RequirePermission>
}
/>
<Route
path="wagon-performance/:id"
element={
<RequirePermission permission={FREIGHT_PERMS.wagons.view}>
<WagonPerformanceDetailPage />
</RequirePermission>
}
/>
{/* One drill-down route per overview domain — the old per-tab charts,
now each on its own page. Single source of truth for the
permission gate is OVERVIEW_DOMAINS, shared with the summary