@burdenoff/microfe-assethandler 2026.625.2 → 2026.703.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/assethandler/AssetHandlerRoot.js +0 -24
  2. package/dist/assethandler/AssetHandlerRoot.js.map +1 -1
  3. package/dist/assethandler/AssetHandlerRoutes.js +92 -160
  4. package/dist/assethandler/AssetHandlerRoutes.js.map +1 -1
  5. package/dist/assethandler/pages/AnalyticsPage.js +367 -402
  6. package/dist/assethandler/pages/AnalyticsPage.js.map +1 -1
  7. package/dist/assethandler/pages/AssetsAssetCategoriesPage.js +29 -26
  8. package/dist/assethandler/pages/AssetsAssetCategoriesPage.js.map +1 -1
  9. package/dist/assethandler/pages/AssetsAssetCheckInOutPage.js +278 -164
  10. package/dist/assethandler/pages/AssetsAssetCheckInOutPage.js.map +1 -1
  11. package/dist/assethandler/pages/AssetsAssetCreatePage.js +200 -242
  12. package/dist/assethandler/pages/AssetsAssetCreatePage.js.map +1 -1
  13. package/dist/assethandler/pages/AssetsAssetDetailPage.js +192 -286
  14. package/dist/assethandler/pages/AssetsAssetDetailPage.js.map +1 -1
  15. package/dist/assethandler/pages/AssetsAssetListPage.js +204 -296
  16. package/dist/assethandler/pages/AssetsAssetListPage.js.map +1 -1
  17. package/dist/assethandler/pages/AssetsAssetTrackingPage.js +38 -42
  18. package/dist/assethandler/pages/AssetsAssetTrackingPage.js.map +1 -1
  19. package/dist/assethandler/pages/DashboardPage.js +212 -236
  20. package/dist/assethandler/pages/DashboardPage.js.map +1 -1
  21. package/dist/assethandler/pages/ItilIncidentDetailPage.js +41 -85
  22. package/dist/assethandler/pages/ItilIncidentDetailPage.js.map +1 -1
  23. package/dist/assethandler/pages/MaintenanceMaintenanceCalendarPage.js +1 -1
  24. package/dist/assethandler/pages/MaintenanceMaintenanceCalendarPage.js.map +1 -1
  25. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.js +37 -86
  26. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.js.map +1 -1
  27. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js +82 -98
  28. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js.map +1 -1
  29. package/dist/assethandler/pages/OperationsOperationsHubPage.js +6 -22
  30. package/dist/assethandler/pages/OperationsOperationsHubPage.js.map +1 -1
  31. package/dist/assethandler/pages/OperationsWorkOrderDetailPage.js +4 -34
  32. package/dist/assethandler/pages/OperationsWorkOrderDetailPage.js.map +1 -1
  33. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js +105 -150
  34. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js.map +1 -1
  35. package/dist/assethandler/pages/TransactionsTransactionDetailPage.js +116 -152
  36. package/dist/assethandler/pages/TransactionsTransactionDetailPage.js.map +1 -1
  37. package/dist/assethandler/providers/AssetHandlerProvider.js.map +1 -1
  38. package/dist/assethandler/store/assethandlerStore.js +68 -2206
  39. package/dist/assethandler/store/assethandlerStore.js.map +1 -1
  40. package/dist/assethandler/utils/toast.js +33 -0
  41. package/dist/assethandler/utils/toast.js.map +1 -0
  42. package/package.json +5 -4
  43. package/dist/assethandler/pages/AssetsAssetEditPage.js +0 -353
  44. package/dist/assethandler/pages/AssetsAssetEditPage.js.map +0 -1
  45. package/dist/assethandler/pages/AuditTrailPage.js +0 -215
  46. package/dist/assethandler/pages/AuditTrailPage.js.map +0 -1
  47. package/dist/assethandler/pages/MarketplaceMarketplaceDetailPage.js +0 -177
  48. package/dist/assethandler/pages/MarketplaceMarketplaceDetailPage.js.map +0 -1
  49. package/dist/assethandler/pages/MarketplaceMarketplaceListPage.js +0 -162
  50. package/dist/assethandler/pages/MarketplaceMarketplaceListPage.js.map +0 -1
  51. package/dist/assethandler/pages/MarketplaceMarketplaceOrdersPage.js +0 -143
  52. package/dist/assethandler/pages/MarketplaceMarketplaceOrdersPage.js.map +0 -1
  53. package/dist/assethandler/pages/MarketplaceMarketplaceSellPage.js +0 -163
  54. package/dist/assethandler/pages/MarketplaceMarketplaceSellPage.js.map +0 -1
  55. package/dist/assethandler/pages/ReportsReportBuilderPage.js +0 -208
  56. package/dist/assethandler/pages/ReportsReportBuilderPage.js.map +0 -1
  57. package/dist/assethandler/pages/ReportsReportsDashboardPage.js +0 -236
  58. package/dist/assethandler/pages/ReportsReportsDashboardPage.js.map +0 -1
  59. package/dist/assethandler/pages/ReportsReportsListPage.js +0 -144
  60. package/dist/assethandler/pages/ReportsReportsListPage.js.map +0 -1
  61. package/dist/assethandler/pages/SecurityScheduleBackupPage.js +0 -149
  62. package/dist/assethandler/pages/SecurityScheduleBackupPage.js.map +0 -1
  63. package/dist/assethandler/pages/UsersPage.js +0 -208
  64. package/dist/assethandler/pages/UsersPage.js.map +0 -1
  65. package/dist/assethandler/pages/UsersUserCreatePage.js +0 -220
  66. package/dist/assethandler/pages/UsersUserCreatePage.js.map +0 -1
  67. package/dist/assethandler/pages/UsersUserManagementHubPage.js +0 -373
  68. package/dist/assethandler/pages/UsersUserManagementHubPage.js.map +0 -1
  69. package/dist/assethandler/pages/WorkflowsWorkflowBuilderPage.js +0 -264
  70. package/dist/assethandler/pages/WorkflowsWorkflowBuilderPage.js.map +0 -1
  71. package/dist/assethandler/pages/WorkflowsWorkflowExecutionsPage.js +0 -206
  72. package/dist/assethandler/pages/WorkflowsWorkflowExecutionsPage.js.map +0 -1
  73. package/dist/assethandler/pages/WorkflowsWorkflowListPage.js +0 -171
  74. package/dist/assethandler/pages/WorkflowsWorkflowListPage.js.map +0 -1
  75. package/dist/assethandler/pages/WorkflowsWorkflowTemplatesPage.js +0 -173
  76. package/dist/assethandler/pages/WorkflowsWorkflowTemplatesPage.js.map +0 -1
@@ -1,414 +1,375 @@
1
1
  import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
2
- import { useState as t } from "react";
3
- import { Activity as n, ArrowUpRight as r, BarChart3 as i, Box as a, DollarSign as o, Download as s, PieChart as c, TrendingDown as l } from "lucide-react";
4
- import { Badge as u, CTAOverflowMenu as d, Card as f, CardContent as p, CardDescription as m, CardHeader as h, CardTitle as g, EmphasisPanel as _, GlassCard as v, GradientText as y, PagePurpose as b, Separator as x, Tabs as S, TabsContent as C, TabsList as w, TabsTrigger as T } from "@burdenoff/fe-libs/ui";
5
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
2
+ import { useMemo as t } from "react";
3
+ import { Activity as n, AlertTriangle as r, Box as i, PieChart as a, Wallet as o, Wrench as s } from "lucide-react";
4
+ import { Badge as c, Card as l, CardContent as u, CardDescription as d, CardHeader as f, CardTitle as p, EmphasisPanel as m, GlassCard as h, GradientText as g, IllustratedEmptyState as _, PagePurpose as v, Separator as y, Tabs as b, TabsContent as x, TabsList as S, TabsTrigger as C } from "@burdenoff/fe-libs/ui";
5
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
6
6
  //#region src/assethandler/pages/AnalyticsPage.tsx
7
- function O() {
8
- let { assets: O, portfolio: k, transactions: A, incidents: j, maintenanceRecords: M, workflows: N } = e(), [P, F] = t("30d"), I = O.reduce((e, t) => e + t.currentValue, 0), L = O.reduce((e, t) => e + t.value, 0), R = L - I, z = L > 0 ? (R / L * 100).toFixed(1) : "0", B = O.length > 0 ? Math.round(I / O.length) : 0, V = O.reduce((e, t) => {
7
+ var E = (e) => e === "active" ? "default" : e === "maintenance" ? "secondary" : "outline";
8
+ function D() {
9
+ let { assets: D, transactions: O, incidents: k, maintenanceRecords: A, budgets: j, invoices: M, workOrders: N } = e(), P = t(() => D.reduce((e, t) => {
9
10
  let n = t.category.replace("_", " ");
10
- return e[n] || (e[n] = {
11
- count: 0,
12
- value: 0
13
- }), e[n].count++, e[n].value += t.currentValue, e;
14
- }, {}), H = O.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {}), U = O.reduce((e, t) => (e[t.department] || (e[t.department] = {
15
- count: 0,
16
- value: 0
17
- }), e[t.department].count++, e[t.department].value += t.currentValue, e), {}), W = j.filter((e) => e.status === "resolved" || e.status === "closed"), G = j.filter((e) => e.slaBreached), K = M.filter((e) => e.status === "completed"), q = M.reduce((e, t) => e + t.cost, 0);
18
- return /* @__PURE__ */ D("div", {
11
+ return e[n] = (e[n] || 0) + 1, e;
12
+ }, {}), [D]), F = t(() => D.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {}), [D]), I = t(() => D.reduce((e, t) => (e[t.condition] = (e[t.condition] || 0) + 1, e), {}), [D]), L = D.filter((e) => e.status === "active").length, R = D.filter((e) => e.condition === "poor" || e.condition === "damaged" || e.status === "maintenance"), z = O.reduce((e, t) => e + Math.abs(t.amount), 0), B = j.reduce((e, t) => e + t.allocated, 0), V = j.reduce((e, t) => e + t.spent, 0), H = j.reduce((e, t) => e + t.remaining, 0), U = A.reduce((e, t) => e + (t.actualCost ?? t.estimatedCost ?? 0), 0), W = M.filter((e) => e.status !== "paid" && e.status !== "cancelled"), G = W.reduce((e, t) => e + t.amount, 0), K = k.filter((e) => e.status === "resolved" || e.status === "closed"), q = k.filter((e) => e.slaBreached), J = A.filter((e) => e.status === "completed"), Y = A.filter((e) => e.status === "scheduled"), X = N.filter((e) => e.status !== "completed" && e.status !== "cancelled");
13
+ return /* @__PURE__ */ T("div", {
19
14
  className: "space-y-6 p-6",
20
15
  children: [
21
- /* @__PURE__ */ D("div", {
16
+ /* @__PURE__ */ w("div", {
22
17
  className: "flex items-center justify-between",
23
- children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h1", {
18
+ children: /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
24
19
  className: "text-3xl font-bold",
25
- children: /* @__PURE__ */ E(y, { children: "Analytics & Business Intelligence" })
26
- }), /* @__PURE__ */ E("p", {
20
+ children: /* @__PURE__ */ w(g, { children: "Analytics & Business Intelligence" })
21
+ }), /* @__PURE__ */ w("p", {
27
22
  className: "text-sm text-text-secondary mt-1",
28
- children: "Comprehensive asset management analytics and insights"
29
- })] }), /* @__PURE__ */ D("div", {
30
- className: "flex gap-2",
31
- children: [/* @__PURE__ */ D("select", {
32
- value: P,
33
- onChange: (e) => F(e.target.value),
34
- className: "rounded-md border border-border-default bg-bg-surface px-3 py-1.5 text-sm",
35
- children: [
36
- /* @__PURE__ */ E("option", {
37
- value: "7d",
38
- children: "Last 7 days"
39
- }),
40
- /* @__PURE__ */ E("option", {
41
- value: "30d",
42
- children: "Last 30 days"
43
- }),
44
- /* @__PURE__ */ E("option", {
45
- value: "90d",
46
- children: "Last 90 days"
47
- }),
48
- /* @__PURE__ */ E("option", {
49
- value: "1y",
50
- children: "Last year"
51
- })
52
- ]
53
- }), /* @__PURE__ */ E(d, {
54
- primary: {
55
- label: "Generate Report",
56
- onSelect: () => {}
57
- },
58
- actions: [{
59
- label: "Export",
60
- onSelect: () => {},
61
- icon: /* @__PURE__ */ E(s, { className: "h-4 w-4" })
62
- }]
63
- })]
64
- })]
23
+ children: "Asset, financial and operational insights across your estate"
24
+ })] })
65
25
  }),
66
- /* @__PURE__ */ E(b, { children: "Turn raw asset data into decisions. See where value is concentrated, how it is depreciating, which categories cost the most to run, and how operations are trending — so you can plan budgets, justify replacements and spot risk before it shows up as downtime." }),
67
- /* @__PURE__ */ D(S, {
26
+ /* @__PURE__ */ w(v, { children: "Turn raw asset data into decisions. See how your estate is distributed by category, status and condition, where budget is being spent, and how operations are trending — so you can plan work, justify replacements and spot risk before it shows up as downtime." }),
27
+ /* @__PURE__ */ T(b, {
68
28
  defaultValue: "overview",
69
29
  children: [
70
- /* @__PURE__ */ D(w, { children: [
71
- /* @__PURE__ */ E(T, {
30
+ /* @__PURE__ */ T(S, { children: [
31
+ /* @__PURE__ */ w(C, {
72
32
  value: "overview",
73
33
  children: "Overview"
74
34
  }),
75
- /* @__PURE__ */ E(T, {
35
+ /* @__PURE__ */ w(C, {
76
36
  value: "financial",
77
37
  children: "Financial"
78
38
  }),
79
- /* @__PURE__ */ E(T, {
39
+ /* @__PURE__ */ w(C, {
80
40
  value: "operational",
81
41
  children: "Operational"
82
42
  }),
83
- /* @__PURE__ */ E(T, {
43
+ /* @__PURE__ */ w(C, {
84
44
  value: "insights",
85
45
  children: "Insights"
86
46
  })
87
47
  ] }),
88
- /* @__PURE__ */ D(C, {
48
+ /* @__PURE__ */ T(x, {
89
49
  value: "overview",
90
50
  className: "space-y-6 mt-6",
91
- children: [
92
- /* @__PURE__ */ D("div", {
93
- className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
94
- children: [
95
- /* @__PURE__ */ D(v, {
96
- treatment: "metric",
97
- className: "border-border-seam",
98
- children: [/* @__PURE__ */ D(h, {
99
- className: "flex flex-row items-center justify-between space-y-0 pb-2",
100
- children: [/* @__PURE__ */ E(g, {
101
- className: "text-sm font-medium",
102
- children: "Total Portfolio Value"
103
- }), /* @__PURE__ */ E(o, { className: "h-4 w-4 text-text-secondary" })]
104
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D("div", {
105
- className: "text-2xl font-bold tabular-nums",
106
- children: ["$", k.totalValue.toLocaleString()]
107
- }), /* @__PURE__ */ D("p", {
108
- className: "text-xs text-text-secondary flex items-center mt-1",
109
- children: [
110
- /* @__PURE__ */ E(r, { className: "mr-1 h-3 w-3 text-status-success-text" }),
111
- /* @__PURE__ */ E("span", {
112
- className: "text-status-success-text",
113
- children: "+5.6%"
114
- }),
115
- " from last quarter"
116
- ]
117
- })] })]
118
- }),
119
- /* @__PURE__ */ D(v, {
120
- treatment: "metric",
121
- className: "border-border-seam",
122
- children: [/* @__PURE__ */ D(h, {
123
- className: "flex flex-row items-center justify-between space-y-0 pb-2",
124
- children: [/* @__PURE__ */ E(g, {
125
- className: "text-sm font-medium",
126
- children: "Total Depreciation"
127
- }), /* @__PURE__ */ E(l, { className: "h-4 w-4 text-text-secondary" })]
128
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D("div", {
129
- className: "text-2xl font-bold text-status-error-text",
130
- children: ["-$", R.toLocaleString()]
131
- }), /* @__PURE__ */ D("p", {
132
- className: "text-xs text-text-secondary",
133
- children: [z, "% of original value"]
134
- })] })]
135
- }),
136
- /* @__PURE__ */ D(v, {
137
- treatment: "metric",
138
- className: "border-border-seam",
139
- children: [/* @__PURE__ */ D(h, {
140
- className: "flex flex-row items-center justify-between space-y-0 pb-2",
141
- children: [/* @__PURE__ */ E(g, {
142
- className: "text-sm font-medium",
143
- children: "Total Assets"
144
- }), /* @__PURE__ */ E(a, { className: "h-4 w-4 text-text-secondary" })]
145
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E("div", {
146
- className: "text-2xl font-bold tabular-nums",
147
- children: k.totalAssets
148
- }), /* @__PURE__ */ D("p", {
149
- className: "text-xs text-text-secondary",
150
- children: [O.filter((e) => e.status === "active").length, " currently active"]
151
- })] })]
152
- }),
153
- /* @__PURE__ */ D(v, {
154
- treatment: "metric",
155
- className: "border-border-seam",
156
- children: [/* @__PURE__ */ D(h, {
157
- className: "flex flex-row items-center justify-between space-y-0 pb-2",
158
- children: [/* @__PURE__ */ E(g, {
159
- className: "text-sm font-medium",
160
- children: "Avg. Asset Value"
161
- }), /* @__PURE__ */ E(i, { className: "h-4 w-4 text-text-secondary" })]
162
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D("div", {
163
- className: "text-2xl font-bold tabular-nums",
164
- children: ["$", B.toLocaleString()]
165
- }), /* @__PURE__ */ E("p", {
166
- className: "text-xs text-text-secondary",
167
- children: "Across all categories"
168
- })] })]
169
- })
170
- ]
171
- }),
172
- /* @__PURE__ */ D("div", {
173
- className: "grid gap-6 lg:grid-cols-2",
174
- children: [/* @__PURE__ */ D(f, { children: [/* @__PURE__ */ D(h, { children: [/* @__PURE__ */ D(g, {
175
- className: "flex items-center gap-2",
176
- children: [/* @__PURE__ */ E(c, { className: "h-4 w-4" }), "Category Distribution"]
177
- }), /* @__PURE__ */ E(m, { children: "Assets by category with values" })] }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ E("div", {
51
+ children: [/* @__PURE__ */ T("div", {
52
+ className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
53
+ children: [
54
+ /* @__PURE__ */ T(h, {
55
+ treatment: "metric",
56
+ className: "border-border-seam",
57
+ children: [/* @__PURE__ */ T(f, {
58
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
59
+ children: [/* @__PURE__ */ w(p, {
60
+ className: "text-sm font-medium",
61
+ children: "Total Assets"
62
+ }), /* @__PURE__ */ w(i, { className: "h-4 w-4 text-text-secondary" })]
63
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
64
+ className: "text-2xl font-bold tabular-nums",
65
+ children: D.length
66
+ }), /* @__PURE__ */ T("p", {
67
+ className: "text-xs text-text-secondary",
68
+ children: [L, " currently active"]
69
+ })] })]
70
+ }),
71
+ /* @__PURE__ */ T(h, {
72
+ treatment: "metric",
73
+ className: "border-border-seam",
74
+ children: [/* @__PURE__ */ T(f, {
75
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
76
+ children: [/* @__PURE__ */ w(p, {
77
+ className: "text-sm font-medium",
78
+ children: "Categories"
79
+ }), /* @__PURE__ */ w(a, { className: "h-4 w-4 text-text-secondary" })]
80
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
81
+ className: "text-2xl font-bold tabular-nums",
82
+ children: Object.keys(P).length
83
+ }), /* @__PURE__ */ w("p", {
84
+ className: "text-xs text-text-secondary",
85
+ children: "Distinct asset categories"
86
+ })] })]
87
+ }),
88
+ /* @__PURE__ */ T(h, {
89
+ treatment: "metric",
90
+ className: "border-border-seam",
91
+ children: [/* @__PURE__ */ T(f, {
92
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
93
+ children: [/* @__PURE__ */ w(p, {
94
+ className: "text-sm font-medium",
95
+ children: "Needs Attention"
96
+ }), /* @__PURE__ */ w(r, { className: "h-4 w-4 text-text-secondary" })]
97
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
98
+ className: "text-2xl font-bold tabular-nums",
99
+ children: R.length
100
+ }), /* @__PURE__ */ w("p", {
101
+ className: "text-xs text-text-secondary",
102
+ children: "Poor / damaged / in maintenance"
103
+ })] })]
104
+ }),
105
+ /* @__PURE__ */ T(h, {
106
+ treatment: "metric",
107
+ className: "border-border-seam",
108
+ children: [/* @__PURE__ */ T(f, {
109
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
110
+ children: [/* @__PURE__ */ w(p, {
111
+ className: "text-sm font-medium",
112
+ children: "Open Incidents"
113
+ }), /* @__PURE__ */ w(n, { className: "h-4 w-4 text-text-secondary" })]
114
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
115
+ className: "text-2xl font-bold tabular-nums",
116
+ children: k.length - K.length
117
+ }), /* @__PURE__ */ T("p", {
118
+ className: "text-xs text-text-secondary",
119
+ children: [k.length, " total logged"]
120
+ })] })]
121
+ })
122
+ ]
123
+ }), /* @__PURE__ */ T("div", {
124
+ className: "grid gap-6 lg:grid-cols-2",
125
+ children: [/* @__PURE__ */ T(l, { children: [/* @__PURE__ */ T(f, { children: [/* @__PURE__ */ T(p, {
126
+ className: "flex items-center gap-2",
127
+ children: [/* @__PURE__ */ w(a, { className: "h-4 w-4" }), "Category Distribution"]
128
+ }), /* @__PURE__ */ w(d, { children: "Assets grouped by category" })] }), /* @__PURE__ */ w(u, { children: D.length === 0 ? /* @__PURE__ */ w(_, {
129
+ illustration: "empty-data",
130
+ title: "No assets yet",
131
+ description: "Add assets to see how your estate is distributed."
132
+ }) : /* @__PURE__ */ w("div", {
133
+ className: "space-y-3",
134
+ children: Object.entries(P).sort((e, t) => t[1] - e[1]).map(([e, t]) => {
135
+ let n = Math.round(t / D.length * 100);
136
+ return /* @__PURE__ */ T("div", {
137
+ className: "space-y-1",
138
+ children: [/* @__PURE__ */ T("div", {
139
+ className: "flex items-center justify-between text-sm",
140
+ children: [/* @__PURE__ */ w("span", {
141
+ className: "font-medium capitalize",
142
+ children: e
143
+ }), /* @__PURE__ */ T("span", {
144
+ className: "text-text-secondary",
145
+ children: [
146
+ t,
147
+ " · ",
148
+ n,
149
+ "%"
150
+ ]
151
+ })]
152
+ }), /* @__PURE__ */ w("div", {
153
+ className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
154
+ children: /* @__PURE__ */ w("div", {
155
+ className: "h-full rounded-full bg-action-primary-bg",
156
+ style: { width: `${n}%` }
157
+ })
158
+ })]
159
+ }, e);
160
+ })
161
+ }) })] }), /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ T(f, { children: [/* @__PURE__ */ T(p, {
162
+ className: "flex items-center gap-2",
163
+ children: [/* @__PURE__ */ w(n, { className: "h-4 w-4" }), "Status & Condition"]
164
+ }), /* @__PURE__ */ w(d, { children: "Current asset status and condition mix" })] }), /* @__PURE__ */ T(u, { children: [
165
+ /* @__PURE__ */ w("div", {
178
166
  className: "space-y-3",
179
- children: Object.entries(V).sort((e, t) => t[1].value - e[1].value).map(([e, t]) => {
180
- let n = Math.round(t.count / O.length * 100);
181
- return /* @__PURE__ */ D("div", {
182
- className: "space-y-1",
183
- children: [/* @__PURE__ */ D("div", {
184
- className: "flex items-center justify-between text-sm",
185
- children: [/* @__PURE__ */ E("span", {
186
- className: "font-medium capitalize",
187
- children: e
188
- }), /* @__PURE__ */ D("span", {
189
- className: "text-text-secondary",
190
- children: [
191
- t.count,
192
- " · $",
193
- (t.value / 1e3).toFixed(1),
194
- "K"
195
- ]
167
+ children: Object.entries(F).map(([e, t]) => {
168
+ let n = D.length > 0 ? Math.round(t / D.length * 100) : 0;
169
+ return /* @__PURE__ */ T("div", {
170
+ className: "flex items-center justify-between",
171
+ children: [/* @__PURE__ */ w(c, {
172
+ variant: E(e),
173
+ children: e.replace("_", " ")
174
+ }), /* @__PURE__ */ T("div", {
175
+ className: "flex items-center gap-3",
176
+ children: [/* @__PURE__ */ w("div", {
177
+ className: "h-2 w-24 rounded-full bg-bg-sunken overflow-hidden",
178
+ children: /* @__PURE__ */ w("div", {
179
+ className: "h-full rounded-full bg-action-primary-bg",
180
+ style: { width: `${n}%` }
181
+ })
182
+ }), /* @__PURE__ */ w("span", {
183
+ className: "text-sm font-medium w-8 text-right",
184
+ children: t
196
185
  })]
197
- }), /* @__PURE__ */ E("div", {
198
- className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
199
- children: /* @__PURE__ */ E("div", {
200
- className: "h-full rounded-full bg-action-primary-bg",
201
- style: { width: `${n}%` }
202
- })
203
186
  })]
204
187
  }, e);
205
188
  })
206
- }) })] }), /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ D(h, { children: [/* @__PURE__ */ D(g, {
207
- className: "flex items-center gap-2",
208
- children: [/* @__PURE__ */ E(n, { className: "h-4 w-4" }), "Status Breakdown"]
209
- }), /* @__PURE__ */ E(m, { children: "Current asset status distribution" })] }), /* @__PURE__ */ D(p, { children: [
210
- /* @__PURE__ */ E("div", {
211
- className: "space-y-3",
212
- children: Object.entries(H).map(([e, t]) => {
213
- let n = Math.round(t / O.length * 100);
214
- return /* @__PURE__ */ D("div", {
215
- className: "flex items-center justify-between",
216
- children: [/* @__PURE__ */ E("div", {
217
- className: "flex items-center gap-2",
218
- children: /* @__PURE__ */ E(u, {
219
- variant: e === "active" ? "default" : e === "under_maintenance" ? "secondary" : "outline",
220
- children: e.replace("_", " ")
221
- })
222
- }), /* @__PURE__ */ D("div", {
223
- className: "flex items-center gap-3",
224
- children: [/* @__PURE__ */ E("div", {
225
- className: "h-2 w-24 rounded-full bg-bg-sunken overflow-hidden",
226
- children: /* @__PURE__ */ E("div", {
227
- className: "h-full rounded-full bg-action-primary-bg",
228
- style: { width: `${n}%` }
229
- })
230
- }), /* @__PURE__ */ E("span", {
231
- className: "text-sm font-medium w-8 text-right",
232
- children: t
233
- })]
234
- })]
235
- }, e);
236
- })
237
- }),
238
- /* @__PURE__ */ E(x, { className: "my-4" }),
239
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h4", {
240
- className: "text-sm font-medium mb-3",
241
- children: "By Department"
242
- }), /* @__PURE__ */ E("div", {
243
- className: "space-y-2",
244
- children: Object.entries(U).sort((e, t) => t[1].count - e[1].count).slice(0, 5).map(([e, t]) => /* @__PURE__ */ D("div", {
245
- className: "flex items-center justify-between text-sm",
246
- children: [/* @__PURE__ */ E("span", { children: e }), /* @__PURE__ */ D("span", {
247
- className: "text-text-secondary",
248
- children: [t.count, " assets"]
249
- })]
250
- }, e))
251
- })] })
252
- ] })] })]
253
- }),
254
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ D(h, { children: [/* @__PURE__ */ E(g, { children: "Depreciation Trend" }), /* @__PURE__ */ E(m, { children: "Portfolio depreciation over the last 6 months" })] }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ E("div", {
255
- className: "flex items-end gap-2 h-40",
256
- children: k.depreciationTrend.map((e) => {
257
- let t = Math.max(...k.depreciationTrend.map((e) => e.value)), n = t > 0 ? e.value / t * 100 : 0;
258
- return /* @__PURE__ */ D("div", {
259
- className: "flex-1 flex flex-col items-center gap-1",
189
+ }),
190
+ /* @__PURE__ */ w(y, { className: "my-4" }),
191
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h4", {
192
+ className: "text-sm font-medium mb-3",
193
+ children: "By Condition"
194
+ }), /* @__PURE__ */ w("div", {
195
+ className: "flex flex-wrap gap-2",
196
+ children: Object.entries(I).map(([e, t]) => /* @__PURE__ */ T(c, {
197
+ variant: "outline",
198
+ className: "capitalize",
260
199
  children: [
261
- /* @__PURE__ */ D("span", {
262
- className: "text-[10px] text-text-secondary",
263
- children: [
264
- "$",
265
- (e.value / 1e6).toFixed(2),
266
- "M"
267
- ]
268
- }),
269
- /* @__PURE__ */ E("div", {
270
- className: "w-full bg-action-primary-bg/80 rounded-t",
271
- style: { height: `${n}%` }
272
- }),
273
- /* @__PURE__ */ E("span", {
274
- className: "text-[10px] text-text-secondary",
275
- children: e.month.replace(" 20", "'")
276
- })
200
+ e,
201
+ ": ",
202
+ t
277
203
  ]
278
- }, e.month);
279
- })
280
- }) })] })
281
- ]
204
+ }, e))
205
+ })] })
206
+ ] })] })]
207
+ })]
282
208
  }),
283
- /* @__PURE__ */ D(C, {
209
+ /* @__PURE__ */ T(x, {
284
210
  value: "financial",
285
211
  className: "space-y-6 mt-6",
286
212
  children: [
287
- /* @__PURE__ */ D("div", {
288
- className: "grid gap-4 md:grid-cols-3",
213
+ /* @__PURE__ */ T("div", {
214
+ className: "grid gap-4 md:grid-cols-4",
289
215
  children: [
290
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, {
216
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
291
217
  className: "pb-2",
292
- children: /* @__PURE__ */ E(g, {
218
+ children: /* @__PURE__ */ w(p, {
293
219
  className: "text-sm font-medium",
294
- children: "Total Transactions"
220
+ children: "Transactions"
295
221
  })
296
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E("div", {
222
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
297
223
  className: "text-2xl font-bold tabular-nums",
298
- children: A.length
299
- }), /* @__PURE__ */ D("p", {
224
+ children: O.length
225
+ }), /* @__PURE__ */ T("p", {
300
226
  className: "text-xs text-text-secondary",
301
227
  children: [
302
228
  "$",
303
- A.reduce((e, t) => e + Math.abs(t.amount), 0).toLocaleString(),
229
+ z.toLocaleString(),
304
230
  " total value"
305
231
  ]
306
232
  })] })] }),
307
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, {
233
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
308
234
  className: "pb-2",
309
- children: /* @__PURE__ */ E(g, {
235
+ children: /* @__PURE__ */ w(p, {
236
+ className: "text-sm font-medium",
237
+ children: "Budget Allocated"
238
+ })
239
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T("div", {
240
+ className: "text-2xl font-bold tabular-nums",
241
+ children: ["$", B.toLocaleString()]
242
+ }), /* @__PURE__ */ T("p", {
243
+ className: "text-xs text-text-secondary",
244
+ children: [
245
+ "$",
246
+ V.toLocaleString(),
247
+ " spent"
248
+ ]
249
+ })] })] }),
250
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
251
+ className: "pb-2",
252
+ children: /* @__PURE__ */ w(p, {
310
253
  className: "text-sm font-medium",
311
254
  children: "Maintenance Cost"
312
255
  })
313
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D("div", {
256
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T("div", {
314
257
  className: "text-2xl font-bold tabular-nums",
315
- children: ["$", q.toLocaleString()]
316
- }), /* @__PURE__ */ D("p", {
258
+ children: ["$", U.toLocaleString()]
259
+ }), /* @__PURE__ */ T("p", {
317
260
  className: "text-xs text-text-secondary",
318
- children: [M.length, " maintenance records"]
261
+ children: [A.length, " maintenance records"]
319
262
  })] })] }),
320
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, {
263
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
321
264
  className: "pb-2",
322
- children: /* @__PURE__ */ E(g, {
265
+ children: /* @__PURE__ */ w(p, {
323
266
  className: "text-sm font-medium",
324
- children: "Acquisitions (6mo)"
267
+ children: "Outstanding Invoices"
325
268
  })
326
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E("div", {
269
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T("div", {
327
270
  className: "text-2xl font-bold tabular-nums",
328
- children: k.acquisitionTrend.reduce((e, t) => e + t.count, 0)
329
- }), /* @__PURE__ */ D("p", {
271
+ children: ["$", G.toLocaleString()]
272
+ }), /* @__PURE__ */ T("p", {
330
273
  className: "text-xs text-text-secondary",
331
274
  children: [
332
- "$",
333
- (k.acquisitionTrend.reduce((e, t) => e + t.value, 0) / 1e3).toFixed(0),
334
- "K total spend"
275
+ W.length,
276
+ " of ",
277
+ M.length,
278
+ " unpaid"
335
279
  ]
336
280
  })] })] })
337
281
  ]
338
282
  }),
339
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ D(h, { children: [/* @__PURE__ */ E(g, { children: "Acquisition Trend" }), /* @__PURE__ */ E(m, { children: "New assets acquired over the last 6 months" })] }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ E("div", {
340
- className: "flex items-end gap-2 h-40",
341
- children: k.acquisitionTrend.map((e) => {
342
- let t = Math.max(...k.acquisitionTrend.map((e) => e.count)), n = t > 0 ? e.count / t * 100 : 0;
343
- return /* @__PURE__ */ D("div", {
344
- className: "flex-1 flex flex-col items-center gap-1",
345
- children: [
346
- /* @__PURE__ */ D("span", {
347
- className: "text-[10px] text-text-secondary",
348
- children: [e.count, " units"]
349
- }),
350
- /* @__PURE__ */ E("div", {
351
- className: "w-full bg-status-success-bg rounded-t",
352
- style: { height: `${n}%` }
353
- }),
354
- /* @__PURE__ */ E("span", {
355
- className: "text-[10px] text-text-secondary",
356
- children: e.month.replace(" 20", "'")
357
- })
358
- ]
359
- }, e.month);
360
- })
283
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ T(f, { children: [/* @__PURE__ */ T(p, {
284
+ className: "flex items-center gap-2",
285
+ children: [/* @__PURE__ */ w(o, { className: "h-4 w-4" }), "Budget Utilization"]
286
+ }), /* @__PURE__ */ w(d, { children: "Allocated vs. spent per budget" })] }), /* @__PURE__ */ w(u, { children: j.length === 0 ? /* @__PURE__ */ w(_, {
287
+ illustration: "empty-data",
288
+ title: "No budgets yet",
289
+ description: "Create a budget to track allocation and spend here."
290
+ }) : /* @__PURE__ */ T("div", {
291
+ className: "space-y-3",
292
+ children: [
293
+ j.map((e) => {
294
+ let t = e.allocated > 0 ? Math.min(100, Math.round(e.spent / e.allocated * 100)) : 0;
295
+ return /* @__PURE__ */ T("div", {
296
+ className: "space-y-1",
297
+ children: [/* @__PURE__ */ T("div", {
298
+ className: "flex items-center justify-between text-sm",
299
+ children: [/* @__PURE__ */ w("span", {
300
+ className: "font-medium",
301
+ children: e.name
302
+ }), /* @__PURE__ */ T("span", {
303
+ className: "text-text-secondary",
304
+ children: [
305
+ "$",
306
+ e.spent.toLocaleString(),
307
+ " / $",
308
+ e.allocated.toLocaleString()
309
+ ]
310
+ })]
311
+ }), /* @__PURE__ */ w("div", {
312
+ className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
313
+ children: /* @__PURE__ */ w("div", {
314
+ className: `h-full rounded-full ${t >= 100 ? "bg-status-error-text" : "bg-action-primary-bg"}`,
315
+ style: { width: `${t}%` }
316
+ })
317
+ })]
318
+ }, e.id);
319
+ }),
320
+ /* @__PURE__ */ w(y, {}),
321
+ /* @__PURE__ */ T("div", {
322
+ className: "flex items-center justify-between text-sm font-medium",
323
+ children: [/* @__PURE__ */ w("span", { children: "Remaining across all budgets" }), /* @__PURE__ */ T("span", { children: ["$", H.toLocaleString()] })]
324
+ })
325
+ ]
361
326
  }) })] }),
362
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, { children: /* @__PURE__ */ E(g, { children: "Recent Transactions" }) }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ E("div", {
327
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, { children: "Recent Transactions" }) }), /* @__PURE__ */ w(u, { children: O.length === 0 ? /* @__PURE__ */ w(_, {
328
+ illustration: "empty-data",
329
+ title: "No transactions",
330
+ description: "Asset purchases, leases and disposals will appear here."
331
+ }) : /* @__PURE__ */ w("div", {
363
332
  className: "overflow-x-auto",
364
- children: /* @__PURE__ */ D("table", {
333
+ children: /* @__PURE__ */ T("table", {
365
334
  className: "w-full text-sm",
366
- children: [/* @__PURE__ */ E("thead", { children: /* @__PURE__ */ D("tr", {
335
+ children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
367
336
  className: "border-b",
368
337
  children: [
369
- /* @__PURE__ */ E("th", {
370
- className: "text-left py-2 font-medium",
371
- children: "ID"
372
- }),
373
- /* @__PURE__ */ E("th", {
338
+ /* @__PURE__ */ w("th", {
374
339
  className: "text-left py-2 font-medium",
375
340
  children: "Type"
376
341
  }),
377
- /* @__PURE__ */ E("th", {
342
+ /* @__PURE__ */ w("th", {
378
343
  className: "text-left py-2 font-medium",
379
344
  children: "Description"
380
345
  }),
381
- /* @__PURE__ */ E("th", {
346
+ /* @__PURE__ */ w("th", {
382
347
  className: "text-right py-2 font-medium",
383
348
  children: "Amount"
384
349
  }),
385
- /* @__PURE__ */ E("th", {
350
+ /* @__PURE__ */ w("th", {
386
351
  className: "text-left py-2 font-medium",
387
352
  children: "Status"
388
353
  })
389
354
  ]
390
- }) }), /* @__PURE__ */ E("tbody", { children: A.slice(0, 5).map((e) => /* @__PURE__ */ D("tr", {
355
+ }) }), /* @__PURE__ */ w("tbody", { children: O.slice(0, 5).map((e) => /* @__PURE__ */ T("tr", {
391
356
  className: "border-b hover:bg-bg-sunken/50",
392
357
  children: [
393
- /* @__PURE__ */ E("td", {
394
- className: "py-2 font-mono text-xs",
395
- children: e.id
396
- }),
397
- /* @__PURE__ */ E("td", {
358
+ /* @__PURE__ */ w("td", {
398
359
  className: "py-2 capitalize",
399
360
  children: e.type
400
361
  }),
401
- /* @__PURE__ */ E("td", {
362
+ /* @__PURE__ */ w("td", {
402
363
  className: "py-2 truncate max-w-xs",
403
364
  children: e.description
404
365
  }),
405
- /* @__PURE__ */ D("td", {
366
+ /* @__PURE__ */ T("td", {
406
367
  className: `py-2 text-right font-medium ${e.amount < 0 ? "text-status-error-text" : ""}`,
407
368
  children: ["$", Math.abs(e.amount).toLocaleString()]
408
369
  }),
409
- /* @__PURE__ */ E("td", {
370
+ /* @__PURE__ */ w("td", {
410
371
  className: "py-2",
411
- children: /* @__PURE__ */ E(u, {
372
+ children: /* @__PURE__ */ w(c, {
412
373
  variant: "outline",
413
374
  children: e.status
414
375
  })
@@ -419,171 +380,175 @@ function O() {
419
380
  }) })] })
420
381
  ]
421
382
  }),
422
- /* @__PURE__ */ E(C, {
383
+ /* @__PURE__ */ w(x, {
423
384
  value: "operational",
424
385
  className: "space-y-6 mt-6",
425
- children: /* @__PURE__ */ D("div", {
386
+ children: /* @__PURE__ */ T("div", {
426
387
  className: "grid gap-4 md:grid-cols-4",
427
388
  children: [
428
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, {
389
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
429
390
  className: "pb-2",
430
- children: /* @__PURE__ */ E(g, {
391
+ children: /* @__PURE__ */ w(p, {
431
392
  className: "text-sm font-medium",
432
393
  children: "Incidents"
433
394
  })
434
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E("div", {
395
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
435
396
  className: "text-2xl font-bold tabular-nums",
436
- children: j.length
437
- }), /* @__PURE__ */ D("p", {
397
+ children: k.length
398
+ }), /* @__PURE__ */ T("p", {
438
399
  className: "text-xs text-text-secondary",
439
- children: [W.length, " resolved"]
400
+ children: [K.length, " resolved"]
440
401
  })] })] }),
441
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, {
402
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
442
403
  className: "pb-2",
443
- children: /* @__PURE__ */ E(g, {
404
+ children: /* @__PURE__ */ w(p, {
444
405
  className: "text-sm font-medium",
445
406
  children: "SLA Breaches"
446
407
  })
447
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E("div", {
408
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
448
409
  className: "text-2xl font-bold text-status-error-text",
449
- children: G.length
450
- }), /* @__PURE__ */ D("p", {
410
+ children: q.length
411
+ }), /* @__PURE__ */ T("p", {
451
412
  className: "text-xs text-text-secondary",
452
- children: [((1 - G.length / Math.max(j.length, 1)) * 100).toFixed(1), "% compliance"]
413
+ children: [((1 - q.length / Math.max(k.length, 1)) * 100).toFixed(1), "% within SLA"]
453
414
  })] })] }),
454
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, {
415
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
455
416
  className: "pb-2",
456
- children: /* @__PURE__ */ E(g, {
417
+ children: /* @__PURE__ */ w(p, {
457
418
  className: "text-sm font-medium",
458
419
  children: "Maintenance Done"
459
420
  })
460
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E("div", {
421
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
461
422
  className: "text-2xl font-bold tabular-nums",
462
- children: K.length
463
- }), /* @__PURE__ */ D("p", {
423
+ children: J.length
424
+ }), /* @__PURE__ */ T("p", {
464
425
  className: "text-xs text-text-secondary",
465
426
  children: [
466
427
  "of ",
467
- M.length,
428
+ A.length,
468
429
  " total"
469
430
  ]
470
431
  })] })] }),
471
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(h, {
432
+ /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
472
433
  className: "pb-2",
473
- children: /* @__PURE__ */ E(g, {
434
+ children: /* @__PURE__ */ w(p, {
474
435
  className: "text-sm font-medium",
475
- children: "Workflow Success"
436
+ children: "Open Work Orders"
476
437
  })
477
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D("div", {
438
+ }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w("div", {
478
439
  className: "text-2xl font-bold tabular-nums",
479
- children: [(N.reduce((e, t) => e + t.successRate, 0) / Math.max(N.length, 1)).toFixed(1), "%"]
480
- }), /* @__PURE__ */ D("p", {
440
+ children: X.length
441
+ }), /* @__PURE__ */ T("p", {
481
442
  className: "text-xs text-text-secondary",
482
- children: [N.length, " active workflows"]
443
+ children: [
444
+ "of ",
445
+ N.length,
446
+ " total"
447
+ ]
483
448
  })] })] })
484
449
  ]
485
450
  })
486
451
  }),
487
- /* @__PURE__ */ D(C, {
452
+ /* @__PURE__ */ T(x, {
488
453
  value: "insights",
489
454
  className: "space-y-6 mt-6",
490
- children: [/* @__PURE__ */ D("div", {
455
+ children: [/* @__PURE__ */ T("div", {
491
456
  className: "grid gap-4 md:grid-cols-3",
492
457
  children: [
493
- /* @__PURE__ */ D(f, {
458
+ /* @__PURE__ */ T(l, {
494
459
  className: "border-status-info-border bg-status-info-bg-subtle",
495
- children: [/* @__PURE__ */ E(h, { children: /* @__PURE__ */ E(g, {
460
+ children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, {
496
461
  className: "text-status-info-text text-base",
497
462
  children: "Diversification"
498
- }) }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ D("p", {
463
+ }) }), /* @__PURE__ */ w(u, { children: /* @__PURE__ */ T("p", {
499
464
  className: "text-sm text-status-info-text",
500
465
  children: [
501
- "Your portfolio spans ",
502
- Object.keys(V).length,
466
+ "Your estate spans ",
467
+ Object.keys(P).length,
503
468
  " categories across",
504
469
  " ",
505
- Object.keys(U).length,
506
- " departments. IT Hardware represents the largest segment at ",
507
- k.byCategory[0]?.count || 0,
508
- " assets."
470
+ D.length,
471
+ " assets. ",
472
+ L,
473
+ " are currently active."
509
474
  ]
510
475
  }) })]
511
476
  }),
512
- /* @__PURE__ */ D(f, {
477
+ /* @__PURE__ */ T(l, {
513
478
  className: "border-status-success-border bg-status-success-bg-subtle",
514
- children: [/* @__PURE__ */ E(h, { children: /* @__PURE__ */ E(g, {
479
+ children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, {
515
480
  className: "text-status-success-text text-base",
516
- children: "Performance"
517
- }) }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ D("p", {
481
+ children: "Budget"
482
+ }) }), /* @__PURE__ */ w(u, { children: /* @__PURE__ */ T("p", {
518
483
  className: "text-sm text-status-success-text",
519
484
  children: [
520
- "Portfolio depreciated value stands at $",
521
- (k.depreciatedValue / 1e6).toFixed(2),
522
- "M. Depreciation rate is within expected range at ",
523
- z,
524
- "% of original cost."
485
+ "$",
486
+ V.toLocaleString(),
487
+ " spent of $",
488
+ B.toLocaleString(),
489
+ " ",
490
+ "allocated, leaving $",
491
+ H.toLocaleString(),
492
+ " across ",
493
+ j.length,
494
+ " ",
495
+ "budgets."
525
496
  ]
526
497
  }) })]
527
498
  }),
528
- /* @__PURE__ */ D(f, {
499
+ /* @__PURE__ */ T(l, {
529
500
  className: "border-status-warning-border bg-status-warning-bg-subtle",
530
- children: [/* @__PURE__ */ E(h, { children: /* @__PURE__ */ E(g, {
501
+ children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, {
531
502
  className: "text-status-warning-text text-base",
532
503
  children: "Maintenance"
533
- }) }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ D("p", {
504
+ }) }), /* @__PURE__ */ w(u, { children: /* @__PURE__ */ T("p", {
534
505
  className: "text-sm text-status-warning-text",
535
506
  children: [
536
- M.filter((e) => e.status === "scheduled").length,
507
+ Y.length,
537
508
  " maintenance tasks are scheduled. Total maintenance spend is $",
538
- q.toLocaleString(),
509
+ U.toLocaleString(),
539
510
  ". Stay on top of preventive maintenance."
540
511
  ]
541
512
  }) })]
542
513
  })
543
514
  ]
544
- }), /* @__PURE__ */ D(_, { children: [/* @__PURE__ */ D(h, {
515
+ }), /* @__PURE__ */ T(m, { children: [/* @__PURE__ */ T(f, {
545
516
  className: "px-0 pt-0",
546
- children: [/* @__PURE__ */ E(g, { children: "Top Assets by Value" }), /* @__PURE__ */ E(m, { children: "Highest value assets in your portfolio" })]
547
- }), /* @__PURE__ */ E(p, {
517
+ children: [/* @__PURE__ */ T(p, {
518
+ className: "flex items-center gap-2",
519
+ children: [/* @__PURE__ */ w(s, { className: "h-4 w-4" }), "Assets Needing Attention"]
520
+ }), /* @__PURE__ */ w(d, { children: "Assets in poor or damaged condition, or currently under maintenance" })]
521
+ }), /* @__PURE__ */ w(u, {
548
522
  className: "px-0 pb-0",
549
- children: /* @__PURE__ */ E("div", {
523
+ children: R.length === 0 ? /* @__PURE__ */ w(_, {
524
+ illustration: "empty-success",
525
+ title: "Everything looks healthy",
526
+ description: "No assets are flagged as poor, damaged or in maintenance right now."
527
+ }) : /* @__PURE__ */ w("div", {
550
528
  className: "space-y-3",
551
- children: [...O].sort((e, t) => t.currentValue - e.currentValue).slice(0, 5).map((e, t) => /* @__PURE__ */ D("div", {
529
+ children: R.slice(0, 6).map((e, t) => /* @__PURE__ */ T("div", {
552
530
  className: "flex items-center justify-between p-3 rounded-lg border border-border-seam bg-gloss-card",
553
- children: [/* @__PURE__ */ D("div", {
531
+ children: [/* @__PURE__ */ T("div", {
554
532
  className: "flex items-center gap-3",
555
- children: [/* @__PURE__ */ E("div", {
533
+ children: [/* @__PURE__ */ w("div", {
556
534
  className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-xs font-medium text-primary",
557
535
  children: t + 1
558
- }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
536
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
559
537
  className: "text-sm font-medium",
560
538
  children: e.name
561
- }), /* @__PURE__ */ D("p", {
562
- className: "text-xs text-text-secondary",
563
- children: [
564
- e.department,
565
- " · ",
566
- e.category.replace("_", " ")
567
- ]
539
+ }), /* @__PURE__ */ T("p", {
540
+ className: "text-xs text-text-secondary capitalize",
541
+ children: [e.category.replace("_", " "), e.location ? ` · ${e.location}` : ""]
568
542
  })] })]
569
- }), /* @__PURE__ */ D("div", {
570
- className: "text-right",
571
- children: [/* @__PURE__ */ D("p", {
572
- className: "text-sm font-medium",
573
- children: ["$", e.currentValue.toLocaleString()]
574
- }), /* @__PURE__ */ E("p", {
575
- className: "text-xs text-text-secondary",
576
- children: e.currentValue < e.value ? /* @__PURE__ */ D("span", {
577
- className: "text-status-error-text",
578
- children: [
579
- "-",
580
- ((1 - e.currentValue / e.value) * 100).toFixed(1),
581
- "%"
582
- ]
583
- }) : /* @__PURE__ */ E("span", {
584
- className: "text-status-success-text",
585
- children: "No depreciation"
586
- })
543
+ }), /* @__PURE__ */ T("div", {
544
+ className: "flex items-center gap-2",
545
+ children: [/* @__PURE__ */ w(c, {
546
+ variant: "outline",
547
+ className: "capitalize",
548
+ children: e.condition
549
+ }), /* @__PURE__ */ w(c, {
550
+ variant: E(e.status),
551
+ children: e.status.replace("_", " ")
587
552
  })]
588
553
  })]
589
554
  }, e.id))
@@ -596,6 +561,6 @@ function O() {
596
561
  });
597
562
  }
598
563
  //#endregion
599
- export { O as AnalyticsPage };
564
+ export { D as AnalyticsPage };
600
565
 
601
566
  //# sourceMappingURL=AnalyticsPage.js.map