@burdenoff/microfe-assethandler 2026.703.4 → 2026.703.6
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.
- package/dist/assethandler/AssetHandlerRoutes.js +16 -5
- package/dist/assethandler/AssetHandlerRoutes.js.map +1 -1
- package/dist/assethandler/components/ActivityTimeline.js +70 -0
- package/dist/assethandler/components/ActivityTimeline.js.map +1 -0
- package/dist/assethandler/components/AttachmentsPanel.js +204 -0
- package/dist/assethandler/components/AttachmentsPanel.js.map +1 -0
- package/dist/assethandler/components/CommentsPanel.js +137 -0
- package/dist/assethandler/components/CommentsPanel.js.map +1 -0
- package/dist/assethandler/components/NotFoundState.js +25 -0
- package/dist/assethandler/components/NotFoundState.js.map +1 -0
- package/dist/assethandler/components/Pagination.js +90 -0
- package/dist/assethandler/components/Pagination.js.map +1 -0
- package/dist/assethandler/components/index.js +5 -0
- package/dist/assethandler/pages/AnalyticsPage.js +398 -200
- package/dist/assethandler/pages/AnalyticsPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetCategoriesPage.js +62 -68
- package/dist/assethandler/pages/AssetsAssetCategoriesPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetCreatePage.js +158 -4
- package/dist/assethandler/pages/AssetsAssetCreatePage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetDetailPage.js +685 -181
- package/dist/assethandler/pages/AssetsAssetDetailPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetListPage.js +184 -167
- package/dist/assethandler/pages/AssetsAssetListPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetTrackingPage.js +105 -134
- package/dist/assethandler/pages/AssetsAssetTrackingPage.js.map +1 -1
- package/dist/assethandler/pages/FinanceBudgetDetailPage.js +272 -85
- package/dist/assethandler/pages/FinanceBudgetDetailPage.js.map +1 -1
- package/dist/assethandler/pages/FinanceFinanceHubPage.js +602 -153
- package/dist/assethandler/pages/FinanceFinanceHubPage.js.map +1 -1
- package/dist/assethandler/pages/FinanceInvoiceDetailPage.js +139 -95
- package/dist/assethandler/pages/FinanceInvoiceDetailPage.js.map +1 -1
- package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js +269 -149
- package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js.map +1 -1
- package/dist/assethandler/pages/ReportsDashboardPage.js +530 -0
- package/dist/assethandler/pages/ReportsDashboardPage.js.map +1 -0
- package/dist/assethandler/pages/TransactionsTransactionDetailPage.js +216 -165
- package/dist/assethandler/pages/TransactionsTransactionDetailPage.js.map +1 -1
- package/dist/assethandler/pages/TransactionsTransactionListPage.js +157 -132
- package/dist/assethandler/pages/TransactionsTransactionListPage.js.map +1 -1
- package/dist/assethandler/providers/AssetHandlerProvider.js +24 -3
- package/dist/assethandler/providers/AssetHandlerProvider.js.map +1 -1
- package/dist/assethandler/store/assethandlerStore.js +28 -4
- package/dist/assethandler/store/assethandlerStore.js.map +1 -1
- package/dist/assethandler/utils/csv.js +16 -0
- package/dist/assethandler/utils/csv.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,146 +1,175 @@
|
|
|
1
1
|
import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
|
-
import { Activity as n, AlertTriangle as r, Box as i,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { Activity as n, AlertTriangle as r, Box as i, DollarSign as a, Gauge as o, PieChart as s, TrendingDown as c, Users as l, Wallet as u, Wrench as d } from "lucide-react";
|
|
4
|
+
import { gql as f } from "@apollo/client";
|
|
5
|
+
import { useQuery as p } from "@apollo/client/react";
|
|
6
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
7
|
+
import { Badge as g, Card as _, CardContent as v, CardDescription as y, CardHeader as b, CardTitle as x, EmphasisPanel as S, GlassCard as C, GradientText as w, IllustratedEmptyState as T, PagePurpose as E, Separator as D, Tabs as O, TabsContent as k, TabsList as ee, TabsTrigger as A } from "@burdenoff/fe-libs/ui";
|
|
6
8
|
//#region src/assethandler/pages/AnalyticsPage.tsx
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
var j = f`
|
|
10
|
+
query AssetHandlerAnalyticsRollups {
|
|
11
|
+
financialSummary {
|
|
12
|
+
totalAssetValue
|
|
13
|
+
totalDepreciation
|
|
14
|
+
totalMaintenanceSpend
|
|
15
|
+
budgetAllocated
|
|
16
|
+
budgetSpent
|
|
17
|
+
invoicesOutstanding
|
|
18
|
+
invoicesOutstandingCount
|
|
19
|
+
transactionExpense
|
|
20
|
+
}
|
|
21
|
+
utilizationReport {
|
|
22
|
+
totalAssets
|
|
23
|
+
assignedAssets
|
|
24
|
+
unassignedAssets
|
|
25
|
+
idleAssets
|
|
26
|
+
overdueAssignments
|
|
27
|
+
byStatus {
|
|
28
|
+
status
|
|
29
|
+
count
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`, M = (e) => e === void 0 ? "—" : `$${Math.round(e).toLocaleString()}`, N = (e) => e === "active" ? "default" : e === "maintenance" ? "secondary" : "outline";
|
|
34
|
+
function P() {
|
|
35
|
+
let { assets: f, transactions: P, incidents: F, maintenanceRecords: I, budgets: L, invoices: R, workOrders: z } = e(), { data: B } = p(j, {
|
|
36
|
+
fetchPolicy: "cache-and-network",
|
|
37
|
+
errorPolicy: "all"
|
|
38
|
+
}), V = B?.financialSummary, H = B?.utilizationReport, U = Math.max(1, ...H?.byStatus.map((e) => e.count) ?? [1]), W = t(() => f.reduce((e, t) => {
|
|
10
39
|
let n = t.category.replace("_", " ");
|
|
11
40
|
return e[n] = (e[n] || 0) + 1, e;
|
|
12
|
-
}, {}), [
|
|
13
|
-
return /* @__PURE__ */
|
|
41
|
+
}, {}), [f]), te = t(() => f.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {}), [f]), ne = t(() => f.reduce((e, t) => (e[t.condition] = (e[t.condition] || 0) + 1, e), {}), [f]), G = f.filter((e) => e.status === "active").length, K = f.filter((e) => e.condition === "poor" || e.condition === "damaged" || e.status === "maintenance"), re = P.reduce((e, t) => e + Math.abs(t.amount), 0), q = L.reduce((e, t) => e + t.allocated, 0), J = L.reduce((e, t) => e + t.spent, 0), Y = L.reduce((e, t) => e + t.remaining, 0), X = I.reduce((e, t) => e + (t.actualCost ?? t.estimatedCost ?? 0), 0), Z = R.filter((e) => e.status !== "paid" && e.status !== "cancelled"), ie = Z.reduce((e, t) => e + t.amount, 0), Q = F.filter((e) => e.status === "resolved" || e.status === "closed"), $ = F.filter((e) => e.slaBreached), ae = I.filter((e) => e.status === "completed"), oe = I.filter((e) => e.status === "scheduled"), se = z.filter((e) => e.status !== "completed" && e.status !== "cancelled");
|
|
42
|
+
return /* @__PURE__ */ h("div", {
|
|
14
43
|
className: "space-y-6 p-6",
|
|
15
44
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ m("div", {
|
|
17
46
|
className: "flex items-center justify-between",
|
|
18
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
|
|
19
48
|
className: "text-3xl font-bold",
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
}), /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ m(w, { children: "Analytics & Business Intelligence" })
|
|
50
|
+
}), /* @__PURE__ */ m("p", {
|
|
22
51
|
className: "text-sm text-text-secondary mt-1",
|
|
23
52
|
children: "Asset, financial and operational insights across your estate"
|
|
24
53
|
})] })
|
|
25
54
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ m(E, { 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." }),
|
|
56
|
+
/* @__PURE__ */ h(O, {
|
|
28
57
|
defaultValue: "overview",
|
|
29
58
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ h(ee, { children: [
|
|
60
|
+
/* @__PURE__ */ m(A, {
|
|
32
61
|
value: "overview",
|
|
33
62
|
children: "Overview"
|
|
34
63
|
}),
|
|
35
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ m(A, {
|
|
36
65
|
value: "financial",
|
|
37
66
|
children: "Financial"
|
|
38
67
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ m(A, {
|
|
40
69
|
value: "operational",
|
|
41
70
|
children: "Operational"
|
|
42
71
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ m(A, {
|
|
44
73
|
value: "insights",
|
|
45
74
|
children: "Insights"
|
|
46
75
|
})
|
|
47
76
|
] }),
|
|
48
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ h(k, {
|
|
49
78
|
value: "overview",
|
|
50
79
|
className: "space-y-6 mt-6",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ h("div", {
|
|
52
81
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
53
82
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ h(C, {
|
|
55
84
|
treatment: "metric",
|
|
56
85
|
className: "border-border-seam",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ h(b, {
|
|
58
87
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ m(x, {
|
|
60
89
|
className: "text-sm font-medium",
|
|
61
90
|
children: "Total Assets"
|
|
62
|
-
}), /* @__PURE__ */
|
|
63
|
-
}), /* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ m(i, { className: "h-4 w-4 text-text-secondary" })]
|
|
92
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
64
93
|
className: "text-2xl font-bold tabular-nums",
|
|
65
|
-
children:
|
|
66
|
-
}), /* @__PURE__ */
|
|
94
|
+
children: f.length
|
|
95
|
+
}), /* @__PURE__ */ h("p", {
|
|
67
96
|
className: "text-xs text-text-secondary",
|
|
68
|
-
children: [
|
|
97
|
+
children: [G, " currently active"]
|
|
69
98
|
})] })]
|
|
70
99
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ h(C, {
|
|
72
101
|
treatment: "metric",
|
|
73
102
|
className: "border-border-seam",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ h(b, {
|
|
75
104
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ m(x, {
|
|
77
106
|
className: "text-sm font-medium",
|
|
78
107
|
children: "Categories"
|
|
79
|
-
}), /* @__PURE__ */
|
|
80
|
-
}), /* @__PURE__ */
|
|
108
|
+
}), /* @__PURE__ */ m(s, { className: "h-4 w-4 text-text-secondary" })]
|
|
109
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
81
110
|
className: "text-2xl font-bold tabular-nums",
|
|
82
|
-
children: Object.keys(
|
|
83
|
-
}), /* @__PURE__ */
|
|
111
|
+
children: Object.keys(W).length
|
|
112
|
+
}), /* @__PURE__ */ m("p", {
|
|
84
113
|
className: "text-xs text-text-secondary",
|
|
85
114
|
children: "Distinct asset categories"
|
|
86
115
|
})] })]
|
|
87
116
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ h(C, {
|
|
89
118
|
treatment: "metric",
|
|
90
119
|
className: "border-border-seam",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ h(b, {
|
|
92
121
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ m(x, {
|
|
94
123
|
className: "text-sm font-medium",
|
|
95
124
|
children: "Needs Attention"
|
|
96
|
-
}), /* @__PURE__ */
|
|
97
|
-
}), /* @__PURE__ */
|
|
125
|
+
}), /* @__PURE__ */ m(r, { className: "h-4 w-4 text-text-secondary" })]
|
|
126
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
98
127
|
className: "text-2xl font-bold tabular-nums",
|
|
99
|
-
children:
|
|
100
|
-
}), /* @__PURE__ */
|
|
128
|
+
children: K.length
|
|
129
|
+
}), /* @__PURE__ */ m("p", {
|
|
101
130
|
className: "text-xs text-text-secondary",
|
|
102
131
|
children: "Poor / damaged / in maintenance"
|
|
103
132
|
})] })]
|
|
104
133
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ h(C, {
|
|
106
135
|
treatment: "metric",
|
|
107
136
|
className: "border-border-seam",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ h(b, {
|
|
109
138
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ m(x, {
|
|
111
140
|
className: "text-sm font-medium",
|
|
112
141
|
children: "Open Incidents"
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ m(n, { className: "h-4 w-4 text-text-secondary" })]
|
|
143
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
115
144
|
className: "text-2xl font-bold tabular-nums",
|
|
116
|
-
children:
|
|
117
|
-
}), /* @__PURE__ */
|
|
145
|
+
children: F.length - Q.length
|
|
146
|
+
}), /* @__PURE__ */ h("p", {
|
|
118
147
|
className: "text-xs text-text-secondary",
|
|
119
|
-
children: [
|
|
148
|
+
children: [F.length, " total logged"]
|
|
120
149
|
})] })]
|
|
121
150
|
})
|
|
122
151
|
]
|
|
123
|
-
}), /* @__PURE__ */
|
|
152
|
+
}), /* @__PURE__ */ h("div", {
|
|
124
153
|
className: "grid gap-6 lg:grid-cols-2",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ h(x, {
|
|
126
155
|
className: "flex items-center gap-2",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
128
|
-
}), /* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ m(s, { className: "h-4 w-4" }), "Category Distribution"]
|
|
157
|
+
}), /* @__PURE__ */ m(y, { children: "Assets grouped by category" })] }), /* @__PURE__ */ m(v, { children: f.length === 0 ? /* @__PURE__ */ m(T, {
|
|
129
158
|
illustration: "empty-data",
|
|
130
159
|
title: "No assets yet",
|
|
131
160
|
description: "Add assets to see how your estate is distributed."
|
|
132
|
-
}) : /* @__PURE__ */
|
|
161
|
+
}) : /* @__PURE__ */ m("div", {
|
|
133
162
|
className: "space-y-3",
|
|
134
|
-
children: Object.entries(
|
|
135
|
-
let n = Math.round(t /
|
|
136
|
-
return /* @__PURE__ */
|
|
163
|
+
children: Object.entries(W).sort((e, t) => t[1] - e[1]).map(([e, t]) => {
|
|
164
|
+
let n = Math.round(t / f.length * 100);
|
|
165
|
+
return /* @__PURE__ */ h("div", {
|
|
137
166
|
className: "space-y-1",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ h("div", {
|
|
139
168
|
className: "flex items-center justify-between text-sm",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ m("span", {
|
|
141
170
|
className: "font-medium capitalize",
|
|
142
171
|
children: e
|
|
143
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ h("span", {
|
|
144
173
|
className: "text-text-secondary",
|
|
145
174
|
children: [
|
|
146
175
|
t,
|
|
@@ -149,37 +178,37 @@ function D() {
|
|
|
149
178
|
"%"
|
|
150
179
|
]
|
|
151
180
|
})]
|
|
152
|
-
}), /* @__PURE__ */
|
|
181
|
+
}), /* @__PURE__ */ m("div", {
|
|
153
182
|
className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
154
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ m("div", {
|
|
155
184
|
className: "h-full rounded-full bg-action-primary-bg",
|
|
156
185
|
style: { width: `${n}%` }
|
|
157
186
|
})
|
|
158
187
|
})]
|
|
159
188
|
}, e);
|
|
160
189
|
})
|
|
161
|
-
}) })] }), /* @__PURE__ */
|
|
190
|
+
}) })] }), /* @__PURE__ */ h(_, { children: [/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ h(x, {
|
|
162
191
|
className: "flex items-center gap-2",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
-
}), /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ m(n, { className: "h-4 w-4" }), "Status & Condition"]
|
|
193
|
+
}), /* @__PURE__ */ m(y, { children: "Current asset status and condition mix" })] }), /* @__PURE__ */ h(v, { children: [
|
|
194
|
+
/* @__PURE__ */ m("div", {
|
|
166
195
|
className: "space-y-3",
|
|
167
|
-
children: Object.entries(
|
|
168
|
-
let n =
|
|
169
|
-
return /* @__PURE__ */
|
|
196
|
+
children: Object.entries(te).map(([e, t]) => {
|
|
197
|
+
let n = f.length > 0 ? Math.round(t / f.length * 100) : 0;
|
|
198
|
+
return /* @__PURE__ */ h("div", {
|
|
170
199
|
className: "flex items-center justify-between",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
-
variant:
|
|
200
|
+
children: [/* @__PURE__ */ m(g, {
|
|
201
|
+
variant: N(e),
|
|
173
202
|
children: e.replace("_", " ")
|
|
174
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ h("div", {
|
|
175
204
|
className: "flex items-center gap-3",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ m("div", {
|
|
177
206
|
className: "h-2 w-24 rounded-full bg-bg-sunken overflow-hidden",
|
|
178
|
-
children: /* @__PURE__ */
|
|
207
|
+
children: /* @__PURE__ */ m("div", {
|
|
179
208
|
className: "h-full rounded-full bg-action-primary-bg",
|
|
180
209
|
style: { width: `${n}%` }
|
|
181
210
|
})
|
|
182
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ m("span", {
|
|
183
212
|
className: "text-sm font-medium w-8 text-right",
|
|
184
213
|
children: t
|
|
185
214
|
})]
|
|
@@ -187,13 +216,13 @@ function D() {
|
|
|
187
216
|
}, e);
|
|
188
217
|
})
|
|
189
218
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ m(D, { className: "my-4" }),
|
|
220
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h4", {
|
|
192
221
|
className: "text-sm font-medium mb-3",
|
|
193
222
|
children: "By Condition"
|
|
194
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ m("div", {
|
|
195
224
|
className: "flex flex-wrap gap-2",
|
|
196
|
-
children: Object.entries(
|
|
225
|
+
children: Object.entries(ne).map(([e, t]) => /* @__PURE__ */ h(g, {
|
|
197
226
|
variant: "outline",
|
|
198
227
|
className: "capitalize",
|
|
199
228
|
children: [
|
|
@@ -206,100 +235,181 @@ function D() {
|
|
|
206
235
|
] })] })]
|
|
207
236
|
})]
|
|
208
237
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ h(k, {
|
|
210
239
|
value: "financial",
|
|
211
240
|
className: "space-y-6 mt-6",
|
|
212
241
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ h(x, {
|
|
243
|
+
className: "flex items-center gap-2",
|
|
244
|
+
children: [/* @__PURE__ */ m(a, { className: "h-4 w-4" }), "Financial Summary"]
|
|
245
|
+
}), /* @__PURE__ */ m(y, { children: "Portfolio valuation, budget and receivables across the estate" })] }), /* @__PURE__ */ m(v, { children: /* @__PURE__ */ h("div", {
|
|
246
|
+
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
247
|
+
children: [
|
|
248
|
+
/* @__PURE__ */ h("div", {
|
|
249
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
250
|
+
children: [/* @__PURE__ */ h("div", {
|
|
251
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
252
|
+
children: [/* @__PURE__ */ m(a, { className: "h-3.5 w-3.5" }), "Total Asset Value"]
|
|
253
|
+
}), /* @__PURE__ */ m("p", {
|
|
254
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
255
|
+
children: M(V?.totalAssetValue)
|
|
256
|
+
})]
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ h("div", {
|
|
259
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
260
|
+
children: [/* @__PURE__ */ h("div", {
|
|
261
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
262
|
+
children: [/* @__PURE__ */ m(c, { className: "h-3.5 w-3.5" }), "Total Depreciation"]
|
|
263
|
+
}), /* @__PURE__ */ m("p", {
|
|
264
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
265
|
+
children: M(V?.totalDepreciation)
|
|
266
|
+
})]
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ h("div", {
|
|
269
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
270
|
+
children: [/* @__PURE__ */ h("div", {
|
|
271
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
272
|
+
children: [/* @__PURE__ */ m(d, { className: "h-3.5 w-3.5" }), "Maintenance Spend"]
|
|
273
|
+
}), /* @__PURE__ */ m("p", {
|
|
274
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
275
|
+
children: M(V?.totalMaintenanceSpend)
|
|
276
|
+
})]
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ h("div", {
|
|
279
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
280
|
+
children: [/* @__PURE__ */ h("div", {
|
|
281
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
282
|
+
children: [/* @__PURE__ */ m(n, { className: "h-3.5 w-3.5" }), "Transaction Expense"]
|
|
283
|
+
}), /* @__PURE__ */ m("p", {
|
|
284
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
285
|
+
children: M(V?.transactionExpense)
|
|
286
|
+
})]
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ h("div", {
|
|
289
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
290
|
+
children: [/* @__PURE__ */ h("div", {
|
|
291
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
292
|
+
children: [/* @__PURE__ */ m(u, { className: "h-3.5 w-3.5" }), "Budget Allocated"]
|
|
293
|
+
}), /* @__PURE__ */ m("p", {
|
|
294
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
295
|
+
children: M(V?.budgetAllocated)
|
|
296
|
+
})]
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ h("div", {
|
|
299
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
300
|
+
children: [/* @__PURE__ */ h("div", {
|
|
301
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
302
|
+
children: [/* @__PURE__ */ m(u, { className: "h-3.5 w-3.5" }), "Budget Spent"]
|
|
303
|
+
}), /* @__PURE__ */ m("p", {
|
|
304
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
305
|
+
children: M(V?.budgetSpent)
|
|
306
|
+
})]
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ h("div", {
|
|
309
|
+
className: "rounded-lg border border-border-seam p-3 md:col-span-2",
|
|
310
|
+
children: [/* @__PURE__ */ h("div", {
|
|
311
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
312
|
+
children: [/* @__PURE__ */ m(r, { className: "h-3.5 w-3.5" }), "Invoices Outstanding"]
|
|
313
|
+
}), /* @__PURE__ */ h("p", {
|
|
314
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
315
|
+
children: [M(V?.invoicesOutstanding), /* @__PURE__ */ m("span", {
|
|
316
|
+
className: "ml-2 text-xs font-normal text-text-secondary",
|
|
317
|
+
children: V ? `${V.invoicesOutstandingCount} unpaid` : "—"
|
|
318
|
+
})]
|
|
319
|
+
})]
|
|
320
|
+
})
|
|
321
|
+
]
|
|
322
|
+
}) })] }),
|
|
323
|
+
/* @__PURE__ */ h("div", {
|
|
214
324
|
className: "grid gap-4 md:grid-cols-4",
|
|
215
325
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
217
327
|
className: "pb-2",
|
|
218
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ m(x, {
|
|
219
329
|
className: "text-sm font-medium",
|
|
220
330
|
children: "Transactions"
|
|
221
331
|
})
|
|
222
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
223
333
|
className: "text-2xl font-bold tabular-nums",
|
|
224
|
-
children:
|
|
225
|
-
}), /* @__PURE__ */
|
|
334
|
+
children: P.length
|
|
335
|
+
}), /* @__PURE__ */ h("p", {
|
|
226
336
|
className: "text-xs text-text-secondary",
|
|
227
337
|
children: [
|
|
228
338
|
"$",
|
|
229
|
-
|
|
339
|
+
re.toLocaleString(),
|
|
230
340
|
" total value"
|
|
231
341
|
]
|
|
232
342
|
})] })] }),
|
|
233
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
234
344
|
className: "pb-2",
|
|
235
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ m(x, {
|
|
236
346
|
className: "text-sm font-medium",
|
|
237
347
|
children: "Budget Allocated"
|
|
238
348
|
})
|
|
239
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ h("div", {
|
|
240
350
|
className: "text-2xl font-bold tabular-nums",
|
|
241
|
-
children: ["$",
|
|
242
|
-
}), /* @__PURE__ */
|
|
351
|
+
children: ["$", q.toLocaleString()]
|
|
352
|
+
}), /* @__PURE__ */ h("p", {
|
|
243
353
|
className: "text-xs text-text-secondary",
|
|
244
354
|
children: [
|
|
245
355
|
"$",
|
|
246
|
-
|
|
356
|
+
J.toLocaleString(),
|
|
247
357
|
" spent"
|
|
248
358
|
]
|
|
249
359
|
})] })] }),
|
|
250
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
251
361
|
className: "pb-2",
|
|
252
|
-
children: /* @__PURE__ */
|
|
362
|
+
children: /* @__PURE__ */ m(x, {
|
|
253
363
|
className: "text-sm font-medium",
|
|
254
364
|
children: "Maintenance Cost"
|
|
255
365
|
})
|
|
256
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ h("div", {
|
|
257
367
|
className: "text-2xl font-bold tabular-nums",
|
|
258
|
-
children: ["$",
|
|
259
|
-
}), /* @__PURE__ */
|
|
368
|
+
children: ["$", X.toLocaleString()]
|
|
369
|
+
}), /* @__PURE__ */ h("p", {
|
|
260
370
|
className: "text-xs text-text-secondary",
|
|
261
|
-
children: [
|
|
371
|
+
children: [I.length, " maintenance records"]
|
|
262
372
|
})] })] }),
|
|
263
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
264
374
|
className: "pb-2",
|
|
265
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ m(x, {
|
|
266
376
|
className: "text-sm font-medium",
|
|
267
377
|
children: "Outstanding Invoices"
|
|
268
378
|
})
|
|
269
|
-
}), /* @__PURE__ */
|
|
379
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ h("div", {
|
|
270
380
|
className: "text-2xl font-bold tabular-nums",
|
|
271
|
-
children: ["$",
|
|
272
|
-
}), /* @__PURE__ */
|
|
381
|
+
children: ["$", ie.toLocaleString()]
|
|
382
|
+
}), /* @__PURE__ */ h("p", {
|
|
273
383
|
className: "text-xs text-text-secondary",
|
|
274
384
|
children: [
|
|
275
|
-
|
|
385
|
+
Z.length,
|
|
276
386
|
" of ",
|
|
277
|
-
|
|
387
|
+
R.length,
|
|
278
388
|
" unpaid"
|
|
279
389
|
]
|
|
280
390
|
})] })] })
|
|
281
391
|
]
|
|
282
392
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ h(x, {
|
|
284
394
|
className: "flex items-center gap-2",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
286
|
-
}), /* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ m(u, { className: "h-4 w-4" }), "Budget Utilization"]
|
|
396
|
+
}), /* @__PURE__ */ m(y, { children: "Allocated vs. spent per budget" })] }), /* @__PURE__ */ m(v, { children: L.length === 0 ? /* @__PURE__ */ m(T, {
|
|
287
397
|
illustration: "empty-data",
|
|
288
398
|
title: "No budgets yet",
|
|
289
399
|
description: "Create a budget to track allocation and spend here."
|
|
290
|
-
}) : /* @__PURE__ */
|
|
400
|
+
}) : /* @__PURE__ */ h("div", {
|
|
291
401
|
className: "space-y-3",
|
|
292
402
|
children: [
|
|
293
|
-
|
|
403
|
+
L.map((e) => {
|
|
294
404
|
let t = e.allocated > 0 ? Math.min(100, Math.round(e.spent / e.allocated * 100)) : 0;
|
|
295
|
-
return /* @__PURE__ */
|
|
405
|
+
return /* @__PURE__ */ h("div", {
|
|
296
406
|
className: "space-y-1",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ h("div", {
|
|
298
408
|
className: "flex items-center justify-between text-sm",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ m("span", {
|
|
300
410
|
className: "font-medium",
|
|
301
411
|
children: e.name
|
|
302
|
-
}), /* @__PURE__ */
|
|
412
|
+
}), /* @__PURE__ */ h("span", {
|
|
303
413
|
className: "text-text-secondary",
|
|
304
414
|
children: [
|
|
305
415
|
"$",
|
|
@@ -308,68 +418,68 @@ function D() {
|
|
|
308
418
|
e.allocated.toLocaleString()
|
|
309
419
|
]
|
|
310
420
|
})]
|
|
311
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ m("div", {
|
|
312
422
|
className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
313
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ m("div", {
|
|
314
424
|
className: `h-full rounded-full ${t >= 100 ? "bg-status-error-text" : "bg-action-primary-bg"}`,
|
|
315
425
|
style: { width: `${t}%` }
|
|
316
426
|
})
|
|
317
427
|
})]
|
|
318
428
|
}, e.id);
|
|
319
429
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ m(D, {}),
|
|
431
|
+
/* @__PURE__ */ h("div", {
|
|
322
432
|
className: "flex items-center justify-between text-sm font-medium",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
433
|
+
children: [/* @__PURE__ */ m("span", { children: "Remaining across all budgets" }), /* @__PURE__ */ h("span", { children: ["$", Y.toLocaleString()] })]
|
|
324
434
|
})
|
|
325
435
|
]
|
|
326
436
|
}) })] }),
|
|
327
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, { children: "Recent Transactions" }) }), /* @__PURE__ */ m(v, { children: P.length === 0 ? /* @__PURE__ */ m(T, {
|
|
328
438
|
illustration: "empty-data",
|
|
329
439
|
title: "No transactions",
|
|
330
440
|
description: "Asset purchases, leases and disposals will appear here."
|
|
331
|
-
}) : /* @__PURE__ */
|
|
441
|
+
}) : /* @__PURE__ */ m("div", {
|
|
332
442
|
className: "overflow-x-auto",
|
|
333
|
-
children: /* @__PURE__ */
|
|
443
|
+
children: /* @__PURE__ */ h("table", {
|
|
334
444
|
className: "w-full text-sm",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
445
|
+
children: [/* @__PURE__ */ m("thead", { children: /* @__PURE__ */ h("tr", {
|
|
336
446
|
className: "border-b",
|
|
337
447
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ m("th", {
|
|
339
449
|
className: "text-left py-2 font-medium",
|
|
340
450
|
children: "Type"
|
|
341
451
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ m("th", {
|
|
343
453
|
className: "text-left py-2 font-medium",
|
|
344
454
|
children: "Description"
|
|
345
455
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ m("th", {
|
|
347
457
|
className: "text-right py-2 font-medium",
|
|
348
458
|
children: "Amount"
|
|
349
459
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ m("th", {
|
|
351
461
|
className: "text-left py-2 font-medium",
|
|
352
462
|
children: "Status"
|
|
353
463
|
})
|
|
354
464
|
]
|
|
355
|
-
}) }), /* @__PURE__ */
|
|
465
|
+
}) }), /* @__PURE__ */ m("tbody", { children: P.slice(0, 5).map((e) => /* @__PURE__ */ h("tr", {
|
|
356
466
|
className: "border-b hover:bg-bg-sunken/50",
|
|
357
467
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ m("td", {
|
|
359
469
|
className: "py-2 capitalize",
|
|
360
470
|
children: e.type
|
|
361
471
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ m("td", {
|
|
363
473
|
className: "py-2 truncate max-w-xs",
|
|
364
474
|
children: e.description
|
|
365
475
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ h("td", {
|
|
367
477
|
className: `py-2 text-right font-medium ${e.amount < 0 ? "text-status-error-text" : ""}`,
|
|
368
478
|
children: ["$", Math.abs(e.amount).toLocaleString()]
|
|
369
479
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ m("td", {
|
|
371
481
|
className: "py-2",
|
|
372
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ m(g, {
|
|
373
483
|
variant: "outline",
|
|
374
484
|
children: e.status
|
|
375
485
|
})
|
|
@@ -380,174 +490,262 @@ function D() {
|
|
|
380
490
|
}) })] })
|
|
381
491
|
]
|
|
382
492
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ h(k, {
|
|
384
494
|
value: "operational",
|
|
385
495
|
className: "space-y-6 mt-6",
|
|
386
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ h(x, {
|
|
497
|
+
className: "flex items-center gap-2",
|
|
498
|
+
children: [/* @__PURE__ */ m(o, { className: "h-4 w-4" }), "Asset Utilization"]
|
|
499
|
+
}), /* @__PURE__ */ m(y, { children: "Assignment coverage and idle capacity across the estate" })] }), /* @__PURE__ */ h(v, {
|
|
500
|
+
className: "space-y-6",
|
|
501
|
+
children: [/* @__PURE__ */ h("div", {
|
|
502
|
+
className: "grid gap-4 md:grid-cols-3 lg:grid-cols-5",
|
|
503
|
+
children: [
|
|
504
|
+
/* @__PURE__ */ h("div", {
|
|
505
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
506
|
+
children: [/* @__PURE__ */ h("div", {
|
|
507
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
508
|
+
children: [/* @__PURE__ */ m(i, { className: "h-3.5 w-3.5" }), "Total Assets"]
|
|
509
|
+
}), /* @__PURE__ */ m("p", {
|
|
510
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
511
|
+
children: H?.totalAssets ?? "—"
|
|
512
|
+
})]
|
|
513
|
+
}),
|
|
514
|
+
/* @__PURE__ */ h("div", {
|
|
515
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
516
|
+
children: [/* @__PURE__ */ h("div", {
|
|
517
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
518
|
+
children: [/* @__PURE__ */ m(l, { className: "h-3.5 w-3.5" }), "Assigned"]
|
|
519
|
+
}), /* @__PURE__ */ m("p", {
|
|
520
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
521
|
+
children: H?.assignedAssets ?? "—"
|
|
522
|
+
})]
|
|
523
|
+
}),
|
|
524
|
+
/* @__PURE__ */ h("div", {
|
|
525
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
526
|
+
children: [/* @__PURE__ */ h("div", {
|
|
527
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
528
|
+
children: [/* @__PURE__ */ m(i, { className: "h-3.5 w-3.5" }), "Unassigned"]
|
|
529
|
+
}), /* @__PURE__ */ m("p", {
|
|
530
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
531
|
+
children: H?.unassignedAssets ?? "—"
|
|
532
|
+
})]
|
|
533
|
+
}),
|
|
534
|
+
/* @__PURE__ */ h("div", {
|
|
535
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
536
|
+
children: [/* @__PURE__ */ h("div", {
|
|
537
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
538
|
+
children: [/* @__PURE__ */ m(n, { className: "h-3.5 w-3.5" }), "Idle"]
|
|
539
|
+
}), /* @__PURE__ */ m("p", {
|
|
540
|
+
className: "text-xl font-bold tabular-nums mt-1",
|
|
541
|
+
children: H?.idleAssets ?? "—"
|
|
542
|
+
})]
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ h("div", {
|
|
545
|
+
className: "rounded-lg border border-border-seam p-3",
|
|
546
|
+
children: [/* @__PURE__ */ h("div", {
|
|
547
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
548
|
+
children: [/* @__PURE__ */ m(r, { className: "h-3.5 w-3.5 text-status-error-text" }), "Overdue"]
|
|
549
|
+
}), /* @__PURE__ */ m("p", {
|
|
550
|
+
className: "text-xl font-bold tabular-nums mt-1 text-status-error-text",
|
|
551
|
+
children: H?.overdueAssignments ?? "—"
|
|
552
|
+
})]
|
|
553
|
+
})
|
|
554
|
+
]
|
|
555
|
+
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h4", {
|
|
556
|
+
className: "text-sm font-medium mb-3",
|
|
557
|
+
children: "Assets by Status"
|
|
558
|
+
}), H && H.byStatus.length > 0 ? /* @__PURE__ */ m("div", {
|
|
559
|
+
className: "space-y-3",
|
|
560
|
+
children: H.byStatus.map(({ status: e, count: t }) => /* @__PURE__ */ h("div", {
|
|
561
|
+
className: "flex items-center justify-between",
|
|
562
|
+
children: [/* @__PURE__ */ m(g, {
|
|
563
|
+
variant: N(e),
|
|
564
|
+
className: "capitalize",
|
|
565
|
+
children: e.replace(/_/g, " ")
|
|
566
|
+
}), /* @__PURE__ */ h("div", {
|
|
567
|
+
className: "flex items-center gap-3",
|
|
568
|
+
children: [/* @__PURE__ */ m("div", {
|
|
569
|
+
className: "h-2 w-24 rounded-full bg-bg-sunken overflow-hidden",
|
|
570
|
+
children: /* @__PURE__ */ m("div", {
|
|
571
|
+
className: "h-full rounded-full bg-action-primary-bg",
|
|
572
|
+
style: { width: `${Math.round(t / U * 100)}%` }
|
|
573
|
+
})
|
|
574
|
+
}), /* @__PURE__ */ m("span", {
|
|
575
|
+
className: "text-sm font-medium w-8 text-right tabular-nums",
|
|
576
|
+
children: t
|
|
577
|
+
})]
|
|
578
|
+
})]
|
|
579
|
+
}, e))
|
|
580
|
+
}) : /* @__PURE__ */ m("p", {
|
|
581
|
+
className: "text-sm text-text-secondary",
|
|
582
|
+
children: "—"
|
|
583
|
+
})] })]
|
|
584
|
+
})] }), /* @__PURE__ */ h("div", {
|
|
387
585
|
className: "grid gap-4 md:grid-cols-4",
|
|
388
586
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
390
588
|
className: "pb-2",
|
|
391
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ m(x, {
|
|
392
590
|
className: "text-sm font-medium",
|
|
393
591
|
children: "Incidents"
|
|
394
592
|
})
|
|
395
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
396
594
|
className: "text-2xl font-bold tabular-nums",
|
|
397
|
-
children:
|
|
398
|
-
}), /* @__PURE__ */
|
|
595
|
+
children: F.length
|
|
596
|
+
}), /* @__PURE__ */ h("p", {
|
|
399
597
|
className: "text-xs text-text-secondary",
|
|
400
|
-
children: [
|
|
598
|
+
children: [Q.length, " resolved"]
|
|
401
599
|
})] })] }),
|
|
402
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
403
601
|
className: "pb-2",
|
|
404
|
-
children: /* @__PURE__ */
|
|
602
|
+
children: /* @__PURE__ */ m(x, {
|
|
405
603
|
className: "text-sm font-medium",
|
|
406
604
|
children: "SLA Breaches"
|
|
407
605
|
})
|
|
408
|
-
}), /* @__PURE__ */
|
|
606
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
409
607
|
className: "text-2xl font-bold text-status-error-text",
|
|
410
|
-
children:
|
|
411
|
-
}), /* @__PURE__ */
|
|
608
|
+
children: $.length
|
|
609
|
+
}), /* @__PURE__ */ h("p", {
|
|
412
610
|
className: "text-xs text-text-secondary",
|
|
413
|
-
children: [((1 -
|
|
611
|
+
children: [((1 - $.length / Math.max(F.length, 1)) * 100).toFixed(1), "% within SLA"]
|
|
414
612
|
})] })] }),
|
|
415
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
416
614
|
className: "pb-2",
|
|
417
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ m(x, {
|
|
418
616
|
className: "text-sm font-medium",
|
|
419
617
|
children: "Maintenance Done"
|
|
420
618
|
})
|
|
421
|
-
}), /* @__PURE__ */
|
|
619
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
422
620
|
className: "text-2xl font-bold tabular-nums",
|
|
423
|
-
children:
|
|
424
|
-
}), /* @__PURE__ */
|
|
621
|
+
children: ae.length
|
|
622
|
+
}), /* @__PURE__ */ h("p", {
|
|
425
623
|
className: "text-xs text-text-secondary",
|
|
426
624
|
children: [
|
|
427
625
|
"of ",
|
|
428
|
-
|
|
626
|
+
I.length,
|
|
429
627
|
" total"
|
|
430
628
|
]
|
|
431
629
|
})] })] }),
|
|
432
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m(b, {
|
|
433
631
|
className: "pb-2",
|
|
434
|
-
children: /* @__PURE__ */
|
|
632
|
+
children: /* @__PURE__ */ m(x, {
|
|
435
633
|
className: "text-sm font-medium",
|
|
436
634
|
children: "Open Work Orders"
|
|
437
635
|
})
|
|
438
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m("div", {
|
|
439
637
|
className: "text-2xl font-bold tabular-nums",
|
|
440
|
-
children:
|
|
441
|
-
}), /* @__PURE__ */
|
|
638
|
+
children: se.length
|
|
639
|
+
}), /* @__PURE__ */ h("p", {
|
|
442
640
|
className: "text-xs text-text-secondary",
|
|
443
641
|
children: [
|
|
444
642
|
"of ",
|
|
445
|
-
|
|
643
|
+
z.length,
|
|
446
644
|
" total"
|
|
447
645
|
]
|
|
448
646
|
})] })] })
|
|
449
647
|
]
|
|
450
|
-
})
|
|
648
|
+
})]
|
|
451
649
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ h(k, {
|
|
453
651
|
value: "insights",
|
|
454
652
|
className: "space-y-6 mt-6",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
653
|
+
children: [/* @__PURE__ */ h("div", {
|
|
456
654
|
className: "grid gap-4 md:grid-cols-3",
|
|
457
655
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ h(_, {
|
|
459
657
|
className: "border-status-info-border bg-status-info-bg-subtle",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
658
|
+
children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
|
|
461
659
|
className: "text-status-info-text text-base",
|
|
462
660
|
children: "Diversification"
|
|
463
|
-
}) }), /* @__PURE__ */
|
|
661
|
+
}) }), /* @__PURE__ */ m(v, { children: /* @__PURE__ */ h("p", {
|
|
464
662
|
className: "text-sm text-status-info-text",
|
|
465
663
|
children: [
|
|
466
664
|
"Your estate spans ",
|
|
467
|
-
Object.keys(
|
|
665
|
+
Object.keys(W).length,
|
|
468
666
|
" categories across",
|
|
469
667
|
" ",
|
|
470
|
-
|
|
668
|
+
f.length,
|
|
471
669
|
" assets. ",
|
|
472
|
-
|
|
670
|
+
G,
|
|
473
671
|
" are currently active."
|
|
474
672
|
]
|
|
475
673
|
}) })]
|
|
476
674
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ h(_, {
|
|
478
676
|
className: "border-status-success-border bg-status-success-bg-subtle",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
|
|
480
678
|
className: "text-status-success-text text-base",
|
|
481
679
|
children: "Budget"
|
|
482
|
-
}) }), /* @__PURE__ */
|
|
680
|
+
}) }), /* @__PURE__ */ m(v, { children: /* @__PURE__ */ h("p", {
|
|
483
681
|
className: "text-sm text-status-success-text",
|
|
484
682
|
children: [
|
|
485
683
|
"$",
|
|
486
|
-
|
|
684
|
+
J.toLocaleString(),
|
|
487
685
|
" spent of $",
|
|
488
|
-
|
|
686
|
+
q.toLocaleString(),
|
|
489
687
|
" ",
|
|
490
688
|
"allocated, leaving $",
|
|
491
|
-
|
|
689
|
+
Y.toLocaleString(),
|
|
492
690
|
" across ",
|
|
493
|
-
|
|
691
|
+
L.length,
|
|
494
692
|
" ",
|
|
495
693
|
"budgets."
|
|
496
694
|
]
|
|
497
695
|
}) })]
|
|
498
696
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ h(_, {
|
|
500
698
|
className: "border-status-warning-border bg-status-warning-bg-subtle",
|
|
501
|
-
children: [/* @__PURE__ */
|
|
699
|
+
children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
|
|
502
700
|
className: "text-status-warning-text text-base",
|
|
503
701
|
children: "Maintenance"
|
|
504
|
-
}) }), /* @__PURE__ */
|
|
702
|
+
}) }), /* @__PURE__ */ m(v, { children: /* @__PURE__ */ h("p", {
|
|
505
703
|
className: "text-sm text-status-warning-text",
|
|
506
704
|
children: [
|
|
507
|
-
|
|
705
|
+
oe.length,
|
|
508
706
|
" maintenance tasks are scheduled. Total maintenance spend is $",
|
|
509
|
-
|
|
707
|
+
X.toLocaleString(),
|
|
510
708
|
". Stay on top of preventive maintenance."
|
|
511
709
|
]
|
|
512
710
|
}) })]
|
|
513
711
|
})
|
|
514
712
|
]
|
|
515
|
-
}), /* @__PURE__ */
|
|
713
|
+
}), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ h(b, {
|
|
516
714
|
className: "px-0 pt-0",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
715
|
+
children: [/* @__PURE__ */ h(x, {
|
|
518
716
|
className: "flex items-center gap-2",
|
|
519
|
-
children: [/* @__PURE__ */
|
|
520
|
-
}), /* @__PURE__ */
|
|
521
|
-
}), /* @__PURE__ */
|
|
717
|
+
children: [/* @__PURE__ */ m(d, { className: "h-4 w-4" }), "Assets Needing Attention"]
|
|
718
|
+
}), /* @__PURE__ */ m(y, { children: "Assets in poor or damaged condition, or currently under maintenance" })]
|
|
719
|
+
}), /* @__PURE__ */ m(v, {
|
|
522
720
|
className: "px-0 pb-0",
|
|
523
|
-
children:
|
|
721
|
+
children: K.length === 0 ? /* @__PURE__ */ m(T, {
|
|
524
722
|
illustration: "empty-success",
|
|
525
723
|
title: "Everything looks healthy",
|
|
526
724
|
description: "No assets are flagged as poor, damaged or in maintenance right now."
|
|
527
|
-
}) : /* @__PURE__ */
|
|
725
|
+
}) : /* @__PURE__ */ m("div", {
|
|
528
726
|
className: "space-y-3",
|
|
529
|
-
children:
|
|
727
|
+
children: K.slice(0, 6).map((e, t) => /* @__PURE__ */ h("div", {
|
|
530
728
|
className: "flex items-center justify-between p-3 rounded-lg border border-border-seam bg-gloss-card",
|
|
531
|
-
children: [/* @__PURE__ */
|
|
729
|
+
children: [/* @__PURE__ */ h("div", {
|
|
532
730
|
className: "flex items-center gap-3",
|
|
533
|
-
children: [/* @__PURE__ */
|
|
731
|
+
children: [/* @__PURE__ */ m("div", {
|
|
534
732
|
className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-xs font-medium text-primary",
|
|
535
733
|
children: t + 1
|
|
536
|
-
}), /* @__PURE__ */
|
|
734
|
+
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
537
735
|
className: "text-sm font-medium",
|
|
538
736
|
children: e.name
|
|
539
|
-
}), /* @__PURE__ */
|
|
737
|
+
}), /* @__PURE__ */ h("p", {
|
|
540
738
|
className: "text-xs text-text-secondary capitalize",
|
|
541
739
|
children: [e.category.replace("_", " "), e.location ? ` · ${e.location}` : ""]
|
|
542
740
|
})] })]
|
|
543
|
-
}), /* @__PURE__ */
|
|
741
|
+
}), /* @__PURE__ */ h("div", {
|
|
544
742
|
className: "flex items-center gap-2",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
743
|
+
children: [/* @__PURE__ */ m(g, {
|
|
546
744
|
variant: "outline",
|
|
547
745
|
className: "capitalize",
|
|
548
746
|
children: e.condition
|
|
549
|
-
}), /* @__PURE__ */
|
|
550
|
-
variant:
|
|
747
|
+
}), /* @__PURE__ */ m(g, {
|
|
748
|
+
variant: N(e.status),
|
|
551
749
|
children: e.status.replace("_", " ")
|
|
552
750
|
})]
|
|
553
751
|
})]
|
|
@@ -561,6 +759,6 @@ function D() {
|
|
|
561
759
|
});
|
|
562
760
|
}
|
|
563
761
|
//#endregion
|
|
564
|
-
export {
|
|
762
|
+
export { P as AnalyticsPage };
|
|
565
763
|
|
|
566
764
|
//# sourceMappingURL=AnalyticsPage.js.map
|