@burdenoff/microfe-assethandler 2026.813.1 → 2026.813.2

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 (78) hide show
  1. package/dist/assethandler/components/charts/BarsChart.js +25 -25
  2. package/dist/assethandler/components/charts/ChartParts.js +27 -27
  3. package/dist/assethandler/components/charts/DonutChart.js +17 -17
  4. package/dist/assethandler/components/charts/ProgressMeter.js +5 -5
  5. package/dist/assethandler/components/charts/RadialGauge.js +13 -13
  6. package/dist/assethandler/components/charts/Sparkline.js +27 -27
  7. package/dist/assethandler/components/charts/TrendChart.js +47 -47
  8. package/dist/assethandler/components/index.js +1 -1
  9. package/dist/assethandler/pages/AiPredictionsPage.js +20 -20
  10. package/dist/assethandler/pages/AnalyticsPage.d.ts.map +1 -1
  11. package/dist/assethandler/pages/AnalyticsPage.js +133 -133
  12. package/dist/assethandler/pages/AnalyticsPage.js.map +1 -1
  13. package/dist/assethandler/pages/AssetsAssetCategoriesPage.d.ts.map +1 -1
  14. package/dist/assethandler/pages/AssetsAssetCategoriesPage.js +55 -55
  15. package/dist/assethandler/pages/AssetsAssetCategoriesPage.js.map +1 -1
  16. package/dist/assethandler/pages/AssetsAssetCreatePage.d.ts.map +1 -1
  17. package/dist/assethandler/pages/AssetsAssetCreatePage.js +77 -78
  18. package/dist/assethandler/pages/AssetsAssetCreatePage.js.map +1 -1
  19. package/dist/assethandler/pages/AssetsAssetDetailPage.d.ts.map +1 -1
  20. package/dist/assethandler/pages/AssetsAssetDetailPage.js +140 -141
  21. package/dist/assethandler/pages/AssetsAssetDetailPage.js.map +1 -1
  22. package/dist/assethandler/pages/AssetsAssetListPage.js +249 -249
  23. package/dist/assethandler/pages/AssetsAssetListPage.js.map +1 -1
  24. package/dist/assethandler/pages/AssetsAssetTrackingPage.js +8 -8
  25. package/dist/assethandler/pages/CmdbBrowserPage.js +34 -34
  26. package/dist/assethandler/pages/DashboardPage.d.ts.map +1 -1
  27. package/dist/assethandler/pages/DashboardPage.js +256 -255
  28. package/dist/assethandler/pages/DashboardPage.js.map +1 -1
  29. package/dist/assethandler/pages/DiscoveryJobsPage.js +27 -27
  30. package/dist/assethandler/pages/EsgDashboardPage.js +53 -53
  31. package/dist/assethandler/pages/FinanceBudgetDetailPage.d.ts.map +1 -1
  32. package/dist/assethandler/pages/FinanceBudgetDetailPage.js +156 -155
  33. package/dist/assethandler/pages/FinanceBudgetDetailPage.js.map +1 -1
  34. package/dist/assethandler/pages/FinanceFinanceHubPage.d.ts.map +1 -1
  35. package/dist/assethandler/pages/FinanceFinanceHubPage.js +475 -475
  36. package/dist/assethandler/pages/FinanceFinanceHubPage.js.map +1 -1
  37. package/dist/assethandler/pages/FinanceInvoiceDetailPage.d.ts.map +1 -1
  38. package/dist/assethandler/pages/FinanceInvoiceDetailPage.js +141 -140
  39. package/dist/assethandler/pages/FinanceInvoiceDetailPage.js.map +1 -1
  40. package/dist/assethandler/pages/ItilChangeManagementPage.js +21 -21
  41. package/dist/assethandler/pages/ItilIncidentManagementPage.js +34 -34
  42. package/dist/assethandler/pages/ItilProblemManagementPage.js +17 -17
  43. package/dist/assethandler/pages/KnowledgeBasePage.js +39 -39
  44. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.d.ts.map +1 -1
  45. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.js +114 -114
  46. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.js.map +1 -1
  47. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.d.ts.map +1 -1
  48. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js +158 -157
  49. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js.map +1 -1
  50. package/dist/assethandler/pages/OperationsOperationsHubPage.d.ts.map +1 -1
  51. package/dist/assethandler/pages/OperationsOperationsHubPage.js +253 -252
  52. package/dist/assethandler/pages/OperationsOperationsHubPage.js.map +1 -1
  53. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.d.ts.map +1 -1
  54. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js +96 -95
  55. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js.map +1 -1
  56. package/dist/assethandler/pages/ProvenancePage.js +21 -21
  57. package/dist/assethandler/pages/ReportsDashboardPage.d.ts.map +1 -1
  58. package/dist/assethandler/pages/ReportsDashboardPage.js +301 -301
  59. package/dist/assethandler/pages/ReportsDashboardPage.js.map +1 -1
  60. package/dist/assethandler/pages/SecuritySecurityHubPage.js +126 -126
  61. package/dist/assethandler/pages/SecuritySecurityHubPage.js.map +1 -1
  62. package/dist/assethandler/pages/TransactionsTransactionDetailPage.d.ts.map +1 -1
  63. package/dist/assethandler/pages/TransactionsTransactionDetailPage.js +112 -113
  64. package/dist/assethandler/pages/TransactionsTransactionDetailPage.js.map +1 -1
  65. package/dist/assethandler/pages/TransactionsTransactionListPage.d.ts.map +1 -1
  66. package/dist/assethandler/pages/TransactionsTransactionListPage.js +136 -137
  67. package/dist/assethandler/pages/TransactionsTransactionListPage.js.map +1 -1
  68. package/dist/assethandler/providers/AssetHandlerProvider.d.ts +14 -0
  69. package/dist/assethandler/providers/AssetHandlerProvider.d.ts.map +1 -1
  70. package/dist/assethandler/providers/AssetHandlerProvider.js +44 -34
  71. package/dist/assethandler/providers/AssetHandlerProvider.js.map +1 -1
  72. package/dist/assethandler/types/index.d.ts +10 -0
  73. package/dist/assethandler/types/index.d.ts.map +1 -1
  74. package/dist/assethandler/utils/money.d.ts +34 -0
  75. package/dist/assethandler/utils/money.d.ts.map +1 -0
  76. package/dist/assethandler/utils/money.js +27 -0
  77. package/dist/assethandler/utils/money.js.map +1 -0
  78. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
1
  import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
2
- import { useCopy as t } from "../hooks/useCopy.js";
3
- import { cn as n } from "../utils/cn.js";
4
- import { formatCompact as r, formatCurrencyCompact as i, seriesColor as ee } from "../components/charts/chartTheme.js";
2
+ import { formatCompact as t, seriesColor as n } from "../components/charts/chartTheme.js";
3
+ import { useAssetMoney as r } from "../providers/AssetHandlerProvider.js";
4
+ import { useCopy as i } from "../hooks/useCopy.js";
5
+ import { cn as ee } from "../utils/cn.js";
5
6
  import { TrendChart as a } from "../components/charts/TrendChart.js";
6
7
  import { BarsChart as o } from "../components/charts/BarsChart.js";
7
8
  import { DonutChart as s } from "../components/charts/DonutChart.js";
@@ -41,54 +42,54 @@ var me = b`
41
42
  }
42
43
  }
43
44
  }
44
- `, A = i("USD");
45
- function j(e) {
45
+ `;
46
+ function A(e) {
46
47
  return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
47
48
  }
48
- function M(e) {
49
+ function he(e) {
49
50
  if (!e) return null;
50
51
  let t = new Date(e);
51
52
  return Number.isNaN(t.getTime()) ? null : t;
52
53
  }
53
- function N(e) {
54
+ function ge(e) {
54
55
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`;
55
56
  }
56
- function P(e) {
57
+ function j(e) {
57
58
  let [t, n] = e.split("-").map(Number);
58
59
  return new Date(t, n - 1, 1).toLocaleString(void 0, { month: "short" });
59
60
  }
60
- var F = {
61
+ var M = {
61
62
  success: "bg-status-success-bg-subtle text-status-success-text",
62
63
  warning: "bg-status-warning-bg-subtle text-status-warning-text",
63
64
  error: "bg-status-error-bg-subtle text-status-error-text",
64
65
  info: "bg-status-info-bg-subtle text-status-info-text",
65
66
  neutral: "bg-bg-sunken text-text-secondary"
66
67
  };
67
- function I({ tone: e, children: t }) {
68
+ function N({ tone: e, children: t }) {
68
69
  return /* @__PURE__ */ x("span", {
69
- className: n("inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium capitalize whitespace-nowrap", F[e]),
70
+ className: ee("inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium capitalize whitespace-nowrap", M[e]),
70
71
  children: t
71
72
  });
72
73
  }
73
- var he = (e) => e === "completed" || e === "approved" ? "success" : e === "rejected" ? "error" : e === "pending" ? "warning" : "neutral";
74
- function L() {
75
- let i = t(), { assets: b, transactions: F, incidents: L, maintenanceRecords: R, budgets: z, invoices: B, workOrders: V } = e(), { data: H } = se(me, {
74
+ var _e = (e) => e === "completed" || e === "approved" ? "success" : e === "rejected" ? "error" : e === "pending" ? "warning" : "neutral";
75
+ function P() {
76
+ let { compact: b, format: M } = r(), P = i(), { assets: F, transactions: I, incidents: L, maintenanceRecords: R, budgets: z, invoices: ve, workOrders: B } = e(), { data: V } = se(me, {
76
77
  fetchPolicy: "cache-and-network",
77
78
  errorPolicy: "all"
78
- }), U = H?.financialSummary, W = H?.utilizationReport, G = u(() => {
79
- let e = b.reduce((e, t) => {
80
- let n = j(t.category);
79
+ }), H = V?.financialSummary, U = V?.utilizationReport, W = u(() => {
80
+ let e = F.reduce((e, t) => {
81
+ let n = A(t.category);
81
82
  return e[n] = (e[n] || 0) + 1, e;
82
83
  }, {});
83
84
  return Object.entries(e).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
84
85
  name: e,
85
86
  value: t
86
87
  }));
87
- }, [b]), K = u(() => G.map((e) => ({
88
+ }, [F]), G = u(() => W.map((e) => ({
88
89
  category: e.name,
89
90
  count: e.value
90
- })), [G]), ge = u(() => {
91
- let e = b.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {}), t = {
91
+ })), [W]), ye = u(() => {
92
+ let e = F.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {}), t = {
92
93
  active: "success",
93
94
  maintenance: "warning",
94
95
  retired: "neutral",
@@ -102,96 +103,96 @@ function L() {
102
103
  neutral: "var(--color-text-muted)"
103
104
  };
104
105
  return Object.entries(e).sort((e, t) => t[1] - e[1]).map(([e, r]) => ({
105
- name: j(e),
106
+ name: A(e),
106
107
  value: r,
107
108
  color: n[t[e] ?? "neutral"]
108
109
  }));
109
- }, [b]), _e = u(() => {
110
+ }, [F]), be = u(() => {
110
111
  let e = [
111
112
  "excellent",
112
113
  "good",
113
114
  "fair",
114
115
  "poor",
115
116
  "damaged"
116
- ], t = b.reduce((e, t) => (e[t.condition] = (e[t.condition] || 0) + 1, e), {});
117
+ ], t = F.reduce((e, t) => (e[t.condition] = (e[t.condition] || 0) + 1, e), {});
117
118
  return e.filter((e) => t[e]).map((e) => ({
118
- condition: j(e),
119
+ condition: A(e),
119
120
  count: t[e]
120
121
  })).concat(Object.entries(t).filter(([t]) => !e.includes(t)).map(([e, t]) => ({
121
- condition: j(e),
122
+ condition: A(e),
122
123
  count: t
123
124
  })));
124
- }, [b]), q = b.length, ve = b.filter((e) => e.status === "active").length, J = G.length, Y = b.filter((e) => e.condition === "poor" || e.condition === "damaged" || e.status === "maintenance"), ye = F.reduce((e, t) => e + Math.abs(t.amount), 0), be = z.reduce((e, t) => e + t.allocated, 0), xe = z.reduce((e, t) => e + t.spent, 0), Se = z.reduce((e, t) => e + t.remaining, 0), Ce = R.reduce((e, t) => e + (t.actualCost ?? t.estimatedCost ?? 0), 0), we = B.filter((e) => e.status !== "paid" && e.status !== "cancelled"), Te = we.reduce((e, t) => e + t.amount, 0), X = u(() => z.map((e) => ({
125
+ }, [F]), K = F.length, xe = F.filter((e) => e.status === "active").length, q = W.length, J = F.filter((e) => e.condition === "poor" || e.condition === "damaged" || e.status === "maintenance"), Se = I.reduce((e, t) => e + Math.abs(t.amount), 0), Y = z.reduce((e, t) => e + t.allocated, 0), X = z.reduce((e, t) => e + t.spent, 0), Ce = z.reduce((e, t) => e + t.remaining, 0), we = R.reduce((e, t) => e + (t.actualCost ?? t.estimatedCost ?? 0), 0), Te = ve.filter((e) => e.status !== "paid" && e.status !== "cancelled"), Ee = Te.reduce((e, t) => e + t.amount, 0), Z = u(() => z.map((e) => ({
125
126
  name: e.name,
126
127
  allocated: e.allocated,
127
128
  spent: e.spent
128
- })), [z]), Z = u(() => {
129
+ })), [z]), De = u(() => {
129
130
  let e = /* @__PURE__ */ new Map();
130
- for (let t of F) {
131
- let n = M(t.date);
131
+ for (let t of I) {
132
+ let n = he(t.date);
132
133
  if (!n) continue;
133
- let r = N(n);
134
+ let r = ge(n);
134
135
  e.set(r, (e.get(r) ?? 0) + Math.abs(t.amount));
135
136
  }
136
137
  return [...e.keys()].sort().map((t) => ({
137
- month: P(t),
138
+ month: j(t),
138
139
  spend: Math.round(e.get(t) ?? 0)
139
140
  }));
140
- }, [F]), Ee = L.filter((e) => e.status === "resolved" || e.status === "closed"), Q = L.filter((e) => e.slaBreached), De = L.length > 0 ? Math.round((1 - Q.length / L.length) * 100) : 100, Oe = R.filter((e) => e.status === "completed"), ke = R.filter((e) => e.status === "scheduled"), Ae = V.filter((e) => e.status !== "completed" && e.status !== "cancelled"), je = u(() => (W?.byStatus ?? []).map((e) => ({
141
- status: j(e.status),
141
+ }, [I]), Oe = L.filter((e) => e.status === "resolved" || e.status === "closed"), Q = L.filter((e) => e.slaBreached), ke = L.length > 0 ? Math.round((1 - Q.length / L.length) * 100) : 100, Ae = R.filter((e) => e.status === "completed"), je = R.filter((e) => e.status === "scheduled"), Me = B.filter((e) => e.status !== "completed" && e.status !== "cancelled"), Ne = u(() => (U?.byStatus ?? []).map((e) => ({
142
+ status: A(e.status),
142
143
  count: e.count
143
- })), [W]), Me = u(() => {
144
- let e = V.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {});
144
+ })), [U]), Pe = u(() => {
145
+ let e = B.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {});
145
146
  return Object.entries(e).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
146
- name: j(e),
147
+ name: A(e),
147
148
  value: t
148
149
  }));
149
- }, [V]), Ne = u(() => {
150
+ }, [B]), $ = u(() => {
150
151
  let e = /* @__PURE__ */ new Map();
151
152
  for (let t of R) {
152
- let n = M(t.completedDate ?? t.scheduledDate), r = t.actualCost ?? t.estimatedCost;
153
+ let n = he(t.completedDate ?? t.scheduledDate), r = t.actualCost ?? t.estimatedCost;
153
154
  if (!n || r === void 0) continue;
154
- let i = N(n);
155
+ let i = ge(n);
155
156
  e.set(i, (e.get(i) ?? 0) + r);
156
157
  }
157
158
  return [...e.keys()].sort().map((t) => ({
158
- month: P(t),
159
+ month: j(t),
159
160
  cost: Math.round(e.get(t) ?? 0)
160
161
  }));
161
- }, [R]), $ = U ? [
162
+ }, [R]), Fe = H ? [
162
163
  {
163
164
  label: "Total Asset Value",
164
- value: U.totalAssetValue,
165
+ value: H.totalAssetValue,
165
166
  icon: re
166
167
  },
167
168
  {
168
169
  label: "Total Depreciation",
169
- value: U.totalDepreciation,
170
+ value: H.totalDepreciation,
170
171
  icon: ae
171
172
  },
172
173
  {
173
174
  label: "Maintenance Spend",
174
- value: U.totalMaintenanceSpend,
175
+ value: H.totalMaintenanceSpend,
175
176
  icon: y
176
177
  },
177
178
  {
178
179
  label: "Transaction Expense",
179
- value: U.transactionExpense,
180
+ value: H.transactionExpense,
180
181
  icon: _
181
182
  },
182
183
  {
183
184
  label: "Budget Allocated",
184
- value: U.budgetAllocated,
185
+ value: H.budgetAllocated,
185
186
  icon: v
186
187
  },
187
188
  {
188
189
  label: "Budget Spent",
189
- value: U.budgetSpent,
190
+ value: H.budgetSpent,
190
191
  icon: v
191
192
  },
192
193
  {
193
194
  label: "Invoices Outstanding",
194
- value: U.invoicesOutstanding,
195
+ value: H.invoicesOutstanding,
195
196
  icon: f
196
197
  }
197
198
  ] : [];
@@ -239,24 +240,24 @@ function L() {
239
240
  children: [
240
241
  /* @__PURE__ */ x(c, {
241
242
  hero: !0,
242
- label: i("assethandler.analytics.metrics.totalAssets", "Total {{assets}}"),
243
- value: q,
244
- format: r,
243
+ label: P("assethandler.analytics.metrics.totalAssets", "Total {{assets}}"),
244
+ value: K,
245
+ format: t,
245
246
  icon: p
246
247
  }),
247
248
  /* @__PURE__ */ x(c, {
248
249
  label: "Categories",
249
- value: J,
250
+ value: q,
250
251
  icon: g
251
252
  }),
252
253
  /* @__PURE__ */ x(c, {
253
254
  label: "Needs Attention",
254
- value: Y.length,
255
+ value: J.length,
255
256
  icon: f
256
257
  }),
257
258
  /* @__PURE__ */ x(c, {
258
259
  label: "Open Incidents",
259
- value: L.length - Ee.length,
260
+ value: L.length - Oe.length,
260
261
  icon: d
261
262
  })
262
263
  ]
@@ -268,14 +269,14 @@ function L() {
268
269
  subtitle: "Computed from real data",
269
270
  icon: g,
270
271
  children: /* @__PURE__ */ x(o, {
271
- data: K,
272
+ data: G,
272
273
  xKey: "category",
273
274
  series: [{
274
275
  key: "count",
275
276
  label: "Assets"
276
277
  }],
277
278
  orientation: "horizontal",
278
- height: Math.max(220, K.length * 40),
279
+ height: Math.max(220, G.length * 40),
279
280
  categoryWidth: 120,
280
281
  emptyLabel: "No assets yet",
281
282
  ariaLabel: "Assets by category"
@@ -285,9 +286,9 @@ function L() {
285
286
  subtitle: "Computed from real data",
286
287
  icon: d,
287
288
  children: /* @__PURE__ */ x(s, {
288
- data: ge,
289
- centerLabel: i("assethandler.analytics.donut.centerLabel", "{{assets}}"),
290
- centerValue: q,
289
+ data: ye,
290
+ centerLabel: P("assethandler.analytics.donut.centerLabel", "{{assets}}"),
291
+ centerValue: K,
291
292
  height: 260,
292
293
  emptyLabel: "No assets yet",
293
294
  ariaLabel: "Assets by status"
@@ -299,7 +300,7 @@ function L() {
299
300
  subtitle: "Computed from real data",
300
301
  icon: h,
301
302
  children: /* @__PURE__ */ x(o, {
302
- data: _e,
303
+ data: be,
303
304
  xKey: "condition",
304
305
  series: [{
305
306
  key: "count",
@@ -316,13 +317,13 @@ function L() {
316
317
  value: "financial",
317
318
  className: "space-y-6 mt-6",
318
319
  children: [
319
- U ? /* @__PURE__ */ x("div", {
320
+ H ? /* @__PURE__ */ x("div", {
320
321
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
321
- children: $.slice(0, 4).map((e, t) => /* @__PURE__ */ x(c, {
322
+ children: Fe.slice(0, 4).map((e, t) => /* @__PURE__ */ x(c, {
322
323
  hero: t === 0,
323
324
  label: e.label,
324
325
  value: e.value,
325
- format: A,
326
+ format: b,
326
327
  icon: e.icon
327
328
  }, e.label))
328
329
  }) : /* @__PURE__ */ x(C, { children: /* @__PURE__ */ x(w, {
@@ -333,14 +334,14 @@ function L() {
333
334
  description: "Portfolio valuation and budget rollups will appear once financial data is recorded."
334
335
  })
335
336
  }) }),
336
- U ? /* @__PURE__ */ x("div", {
337
+ H ? /* @__PURE__ */ x("div", {
337
338
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
338
- children: $.slice(4).map((e) => /* @__PURE__ */ x(c, {
339
+ children: Fe.slice(4).map((e) => /* @__PURE__ */ x(c, {
339
340
  label: e.label,
340
341
  value: e.value,
341
- format: A,
342
+ format: b,
342
343
  icon: e.icon,
343
- delta: e.label === "Invoices Outstanding" ? `${U.invoicesOutstandingCount} unpaid` : void 0,
344
+ delta: e.label === "Invoices Outstanding" ? `${H.invoicesOutstandingCount} unpaid` : void 0,
344
345
  deltaTone: "neutral"
345
346
  }, e.label))
346
347
  }) : null,
@@ -350,43 +351,43 @@ function L() {
350
351
  title: "Budget: Allocated vs Spent",
351
352
  subtitle: "Per budget, from real data",
352
353
  icon: v,
353
- children: X.length === 0 ? /* @__PURE__ */ x(D, {
354
+ children: Z.length === 0 ? /* @__PURE__ */ x(D, {
354
355
  illustration: "empty-data",
355
356
  title: "No budgets yet",
356
357
  description: "Create a budget to track allocation and spend here."
357
358
  }) : /* @__PURE__ */ x(o, {
358
- data: X,
359
+ data: Z,
359
360
  xKey: "name",
360
361
  series: [{
361
362
  key: "allocated",
362
363
  label: "Allocated",
363
- color: ee(1)
364
+ color: n(1)
364
365
  }, {
365
366
  key: "spent",
366
367
  label: "Spent"
367
368
  }],
368
- height: Math.max(220, X.length * 56),
369
+ height: Math.max(220, Z.length * 56),
369
370
  orientation: "horizontal",
370
371
  categoryWidth: 120,
371
- valueFormat: A,
372
+ valueFormat: b,
372
373
  ariaLabel: "Budget allocated versus spent"
373
374
  })
374
375
  }), /* @__PURE__ */ x(l, {
375
376
  title: "Spend Over Time",
376
377
  subtitle: "Monthly transaction spend",
377
378
  icon: _,
378
- children: Z.length === 0 ? /* @__PURE__ */ x(D, {
379
+ children: De.length === 0 ? /* @__PURE__ */ x(D, {
379
380
  illustration: "empty-data",
380
381
  title: "No transactions yet",
381
382
  description: "Recorded purchases, leases and disposals will chart here."
382
383
  }) : /* @__PURE__ */ x(a, {
383
- data: Z,
384
+ data: De,
384
385
  xKey: "month",
385
386
  series: [{
386
387
  key: "spend",
387
388
  label: "Spend"
388
389
  }],
389
- valueFormat: A,
390
+ valueFormat: b,
390
391
  height: 260,
391
392
  ariaLabel: "Monthly transaction spend"
392
393
  })
@@ -407,14 +408,14 @@ function L() {
407
408
  label: e.name,
408
409
  value: e.spent,
409
410
  max: e.allocated,
410
- format: (e) => `$${Math.round(e).toLocaleString()}`
411
+ format: (e) => M(Math.round(e))
411
412
  }, e.id)),
412
413
  /* @__PURE__ */ x(de, {}),
413
414
  /* @__PURE__ */ S("div", {
414
415
  className: "flex items-center justify-between text-sm font-medium",
415
- children: [/* @__PURE__ */ x("span", { children: "Remaining across all budgets" }), /* @__PURE__ */ S("span", {
416
+ children: [/* @__PURE__ */ x("span", { children: "Remaining across all budgets" }), /* @__PURE__ */ x("span", {
416
417
  className: "tabular-nums",
417
- children: ["$", Se.toLocaleString()]
418
+ children: M(Ce)
418
419
  })]
419
420
  })
420
421
  ]
@@ -425,31 +426,31 @@ function L() {
425
426
  children: [
426
427
  /* @__PURE__ */ x(c, {
427
428
  label: "Transactions",
428
- value: F.length,
429
+ value: I.length,
429
430
  icon: _,
430
- delta: `$${ye.toLocaleString()} value`,
431
+ delta: `${M(Se)} value`,
431
432
  deltaTone: "neutral"
432
433
  }),
433
434
  /* @__PURE__ */ x(c, {
434
435
  label: "Budget Allocated",
435
- value: be,
436
- format: A,
436
+ value: Y,
437
+ format: b,
437
438
  icon: v,
438
- delta: `$${xe.toLocaleString()} spent`,
439
+ delta: `${M(X)} spent`,
439
440
  deltaTone: "neutral"
440
441
  }),
441
442
  /* @__PURE__ */ x(c, {
442
443
  label: "Maintenance Cost",
443
- value: Ce,
444
- format: A,
444
+ value: we,
445
+ format: b,
445
446
  icon: y
446
447
  }),
447
448
  /* @__PURE__ */ x(c, {
448
449
  label: "Outstanding Invoices",
449
- value: Te,
450
- format: A,
450
+ value: Ee,
451
+ format: b,
451
452
  icon: f,
452
- delta: `${we.length} of ${B.length}`,
453
+ delta: `${Te.length} of ${ve.length}`,
453
454
  deltaTone: "neutral"
454
455
  })
455
456
  ]
@@ -457,7 +458,7 @@ function L() {
457
458
  /* @__PURE__ */ x(l, {
458
459
  title: "Recent Transactions",
459
460
  icon: _,
460
- children: F.length === 0 ? /* @__PURE__ */ x(D, {
461
+ children: I.length === 0 ? /* @__PURE__ */ x(D, {
461
462
  illustration: "empty-data",
462
463
  title: "No transactions",
463
464
  description: "Asset purchases, leases and disposals will appear here."
@@ -485,7 +486,7 @@ function L() {
485
486
  children: "Status"
486
487
  })
487
488
  ]
488
- }) }), /* @__PURE__ */ x("tbody", { children: F.slice(0, 6).map((e) => /* @__PURE__ */ S("tr", {
489
+ }) }), /* @__PURE__ */ x("tbody", { children: I.slice(0, 6).map((e) => /* @__PURE__ */ S("tr", {
489
490
  className: "border-b border-border-seam hover:bg-bg-sunken/50",
490
491
  children: [
491
492
  /* @__PURE__ */ x("td", {
@@ -496,14 +497,14 @@ function L() {
496
497
  className: "max-w-xs truncate py-2.5",
497
498
  children: e.description
498
499
  }),
499
- /* @__PURE__ */ S("td", {
500
- className: n("py-2.5 text-right font-medium tabular-nums", e.amount < 0 && "text-status-error-text"),
501
- children: ["$", Math.abs(e.amount).toLocaleString()]
500
+ /* @__PURE__ */ x("td", {
501
+ className: ee("py-2.5 text-right font-medium tabular-nums", e.amount < 0 && "text-status-error-text"),
502
+ children: M(Math.abs(e.amount))
502
503
  }),
503
504
  /* @__PURE__ */ x("td", {
504
505
  className: "py-2.5",
505
- children: /* @__PURE__ */ x(I, {
506
- tone: he(e.status),
506
+ children: /* @__PURE__ */ x(N, {
507
+ tone: _e(e.status),
507
508
  children: e.status
508
509
  })
509
510
  })
@@ -522,30 +523,30 @@ function L() {
522
523
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-5",
523
524
  children: [
524
525
  /* @__PURE__ */ x(c, {
525
- label: i("assethandler.analytics.metrics.totalAssets", "Total {{assets}}"),
526
- value: W?.totalAssets ?? q,
526
+ label: P("assethandler.analytics.metrics.totalAssets", "Total {{assets}}"),
527
+ value: U?.totalAssets ?? K,
527
528
  icon: p
528
529
  }),
529
530
  /* @__PURE__ */ x(c, {
530
531
  label: "Assigned",
531
- value: W?.assignedAssets ?? "—",
532
+ value: U?.assignedAssets ?? "—",
532
533
  icon: oe
533
534
  }),
534
535
  /* @__PURE__ */ x(c, {
535
536
  label: "Unassigned",
536
- value: W?.unassignedAssets ?? "—",
537
+ value: U?.unassignedAssets ?? "—",
537
538
  icon: p
538
539
  }),
539
540
  /* @__PURE__ */ x(c, {
540
541
  label: "Idle",
541
- value: W?.idleAssets ?? "—",
542
+ value: U?.idleAssets ?? "—",
542
543
  icon: d
543
544
  }),
544
545
  /* @__PURE__ */ x(c, {
545
546
  label: "Overdue",
546
- value: W?.overdueAssignments ?? "—",
547
+ value: U?.overdueAssignments ?? "—",
547
548
  icon: f,
548
- delta: W && W.overdueAssignments > 0 ? "action needed" : void 0,
549
+ delta: U && U.overdueAssignments > 0 ? "action needed" : void 0,
549
550
  deltaTone: "negative",
550
551
  deltaDirection: "up"
551
552
  })
@@ -558,14 +559,14 @@ function L() {
558
559
  subtitle: "Assignment coverage",
559
560
  icon: h,
560
561
  children: /* @__PURE__ */ x(o, {
561
- data: je,
562
+ data: Ne,
562
563
  xKey: "status",
563
564
  series: [{
564
565
  key: "count",
565
566
  label: "Assets"
566
567
  }],
567
568
  orientation: "horizontal",
568
- height: Math.max(200, je.length * 40),
569
+ height: Math.max(200, Ne.length * 40),
569
570
  categoryWidth: 120,
570
571
  emptyLabel: "No utilization data",
571
572
  ariaLabel: "Assets by status"
@@ -575,9 +576,9 @@ function L() {
575
576
  subtitle: "From real data",
576
577
  icon: m,
577
578
  children: /* @__PURE__ */ x(s, {
578
- data: Me,
579
+ data: Pe,
579
580
  centerLabel: "Work orders",
580
- centerValue: V.length,
581
+ centerValue: B.length,
581
582
  height: 260,
582
583
  emptyLabel: "No work orders",
583
584
  ariaLabel: "Work orders by status"
@@ -588,18 +589,18 @@ function L() {
588
589
  title: "Maintenance Cost Over Time",
589
590
  subtitle: "Monthly recorded maintenance cost",
590
591
  icon: y,
591
- children: Ne.length === 0 ? /* @__PURE__ */ x(D, {
592
+ children: $.length === 0 ? /* @__PURE__ */ x(D, {
592
593
  illustration: "empty-data",
593
594
  title: "No maintenance cost yet",
594
595
  description: "Once maintenance records carry cost, monthly spend will chart here."
595
596
  }) : /* @__PURE__ */ x(a, {
596
- data: Ne,
597
+ data: $,
597
598
  xKey: "month",
598
599
  series: [{
599
600
  key: "cost",
600
601
  label: "Cost"
601
602
  }],
602
- valueFormat: A,
603
+ valueFormat: b,
603
604
  height: 260,
604
605
  ariaLabel: "Monthly maintenance cost"
605
606
  })
@@ -611,7 +612,7 @@ function L() {
611
612
  label: "Incidents",
612
613
  value: L.length,
613
614
  icon: d,
614
- delta: `${Ee.length} resolved`,
615
+ delta: `${Oe.length} resolved`,
615
616
  deltaTone: "neutral"
616
617
  }),
617
618
  /* @__PURE__ */ x(c, {
@@ -624,16 +625,16 @@ function L() {
624
625
  }),
625
626
  /* @__PURE__ */ x(c, {
626
627
  label: "Maintenance Done",
627
- value: Oe.length,
628
+ value: Ae.length,
628
629
  icon: y,
629
630
  delta: `of ${R.length}`,
630
631
  deltaTone: "neutral"
631
632
  }),
632
633
  /* @__PURE__ */ x(c, {
633
634
  label: "Open Work Orders",
634
- value: Ae.length,
635
+ value: Me.length,
635
636
  icon: m,
636
- delta: `of ${V.length}`,
637
+ delta: `of ${B.length}`,
637
638
  deltaTone: "neutral"
638
639
  })
639
640
  ]
@@ -650,7 +651,7 @@ function L() {
650
651
  subtitle: "Incidents resolved within SLA",
651
652
  icon: ie,
652
653
  children: /* @__PURE__ */ x(te, {
653
- value: De,
654
+ value: ke,
654
655
  label: "within SLA",
655
656
  sublabel: `${Q.length} of ${L.length} breached`,
656
657
  format: (e) => `${Math.round(e)}%`,
@@ -669,12 +670,12 @@ function L() {
669
670
  className: "text-sm text-status-info-text",
670
671
  children: [
671
672
  "Your estate spans ",
672
- J,
673
- " categories across ",
674
673
  q,
674
+ " categories across ",
675
+ K,
675
676
  " assets.",
676
677
  " ",
677
- ve,
678
+ xe,
678
679
  " are currently active."
679
680
  ]
680
681
  }) })]
@@ -687,17 +688,15 @@ function L() {
687
688
  }) }), /* @__PURE__ */ x(w, { children: /* @__PURE__ */ S("p", {
688
689
  className: "text-sm text-status-success-text",
689
690
  children: [
690
- "$",
691
- xe.toLocaleString(),
692
- " spent of $",
693
- be.toLocaleString(),
691
+ M(X),
692
+ " spent of ",
693
+ M(Y),
694
+ " allocated, leaving",
694
695
  " ",
695
- "allocated, leaving $",
696
- Se.toLocaleString(),
696
+ M(Ce),
697
697
  " across ",
698
698
  z.length,
699
- " ",
700
- "budgets."
699
+ " budgets."
701
700
  ]
702
701
  }) })]
703
702
  }),
@@ -709,9 +708,10 @@ function L() {
709
708
  }) }), /* @__PURE__ */ x(w, { children: /* @__PURE__ */ S("p", {
710
709
  className: "text-sm text-status-warning-text",
711
710
  children: [
712
- ke.length,
713
- " tasks scheduled. Total maintenance spend is $",
714
- Ce.toLocaleString(),
711
+ je.length,
712
+ " tasks scheduled. Total maintenance spend is",
713
+ " ",
714
+ M(we),
715
715
  ". Stay on top of preventive maintenance."
716
716
  ]
717
717
  }) })]
@@ -726,13 +726,13 @@ function L() {
726
726
  })
727
727
  }), /* @__PURE__ */ x(w, {
728
728
  className: "px-0 pb-0",
729
- children: Y.length === 0 ? /* @__PURE__ */ x(D, {
729
+ children: J.length === 0 ? /* @__PURE__ */ x(D, {
730
730
  illustration: "empty-success",
731
731
  title: "Everything looks healthy",
732
732
  description: "No assets are flagged as poor, damaged or in maintenance right now."
733
733
  }) : /* @__PURE__ */ x("div", {
734
734
  className: "space-y-3",
735
- children: Y.slice(0, 6).map((e, t) => /* @__PURE__ */ S("div", {
735
+ children: J.slice(0, 6).map((e, t) => /* @__PURE__ */ S("div", {
736
736
  className: "flex items-center justify-between gap-3 rounded-lg border border-border-seam bg-gloss-card p-3",
737
737
  children: [/* @__PURE__ */ S("div", {
738
738
  className: "flex min-w-0 items-center gap-3",
@@ -751,10 +751,10 @@ function L() {
751
751
  })]
752
752
  }), /* @__PURE__ */ S("div", {
753
753
  className: "flex shrink-0 items-center gap-2",
754
- children: [/* @__PURE__ */ x(I, {
754
+ children: [/* @__PURE__ */ x(N, {
755
755
  tone: e.condition === "damaged" ? "error" : "warning",
756
756
  children: e.condition
757
- }), /* @__PURE__ */ x(I, {
757
+ }), /* @__PURE__ */ x(N, {
758
758
  tone: e.status === "active" ? "success" : "warning",
759
759
  children: e.status.replace("_", " ")
760
760
  })]
@@ -769,6 +769,6 @@ function L() {
769
769
  });
770
770
  }
771
771
  //#endregion
772
- export { L as AnalyticsPage };
772
+ export { P as AnalyticsPage };
773
773
 
774
774
  //# sourceMappingURL=AnalyticsPage.js.map