@burdenoff/microfe-assethandler 2026.703.2 → 2026.703.4
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/AssetHandlerRoot.js +18 -18
- package/dist/assethandler/hooks/useAssetHandlerNavigate.js +19 -0
- package/dist/assethandler/hooks/useAssetHandlerNavigate.js.map +1 -0
- package/dist/assethandler/pages/AiPredictionsPage.js +29 -29
- package/dist/assethandler/pages/AnalyticsPage.js +154 -154
- package/dist/assethandler/pages/AssetsAssetCategoriesPage.js +48 -48
- package/dist/assethandler/pages/AssetsAssetCheckInOutPage.js +84 -84
- package/dist/assethandler/pages/AssetsAssetCheckInOutPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetCreatePage.js +82 -82
- package/dist/assethandler/pages/AssetsAssetCreatePage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetDetailPage.js +104 -103
- package/dist/assethandler/pages/AssetsAssetDetailPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetListPage.js +132 -132
- package/dist/assethandler/pages/AssetsAssetListPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetTrackingPage.js +52 -52
- package/dist/assethandler/pages/CmdbBrowserPage.js +27 -27
- package/dist/assethandler/pages/DashboardPage.js +119 -119
- package/dist/assethandler/pages/DashboardPage.js.map +1 -1
- package/dist/assethandler/pages/DigitalTwinPage.js +22 -22
- package/dist/assethandler/pages/DiscoveryJobsPage.js +35 -35
- package/dist/assethandler/pages/EsgDashboardPage.js +32 -32
- package/dist/assethandler/pages/FinanceBudgetDetailPage.js +57 -56
- package/dist/assethandler/pages/FinanceBudgetDetailPage.js.map +1 -1
- package/dist/assethandler/pages/FinanceFinanceHubPage.js +98 -98
- package/dist/assethandler/pages/FinanceFinanceHubPage.js.map +1 -1
- package/dist/assethandler/pages/FinanceInvoiceDetailPage.js +58 -57
- package/dist/assethandler/pages/FinanceInvoiceDetailPage.js.map +1 -1
- package/dist/assethandler/pages/IotDevicesPage.js +29 -29
- package/dist/assethandler/pages/ItilChangeDetailPage.js +76 -75
- package/dist/assethandler/pages/ItilChangeDetailPage.js.map +1 -1
- package/dist/assethandler/pages/ItilChangeManagementPage.js +49 -49
- package/dist/assethandler/pages/ItilIncidentDetailPage.js +63 -62
- package/dist/assethandler/pages/ItilIncidentDetailPage.js.map +1 -1
- package/dist/assethandler/pages/ItilIncidentManagementPage.js +72 -72
- package/dist/assethandler/pages/ItilItilhubPage.js +112 -112
- package/dist/assethandler/pages/ItilItilhubPage.js.map +1 -1
- package/dist/assethandler/pages/ItilProblemDetailPage.js +61 -60
- package/dist/assethandler/pages/ItilProblemDetailPage.js.map +1 -1
- package/dist/assethandler/pages/ItilProblemManagementPage.js +46 -46
- package/dist/assethandler/pages/KnowledgeBasePage.js +28 -28
- package/dist/assethandler/pages/MaintenanceMaintenanceCalendarPage.js +52 -52
- package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.js +29 -29
- package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js +58 -57
- package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js.map +1 -1
- package/dist/assethandler/pages/OperationsOperationsHubPage.js +80 -80
- package/dist/assethandler/pages/OperationsOperationsHubPage.js.map +1 -1
- package/dist/assethandler/pages/OperationsWorkOrderDetailPage.js +49 -48
- package/dist/assethandler/pages/OperationsWorkOrderDetailPage.js.map +1 -1
- package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js +52 -52
- package/dist/assethandler/pages/ProvenancePage.js +36 -36
- package/dist/assethandler/pages/SamLicensesPage.js +27 -27
- package/dist/assethandler/pages/SecurityComplianceDetailPage.js +39 -38
- package/dist/assethandler/pages/SecurityComplianceDetailPage.js.map +1 -1
- package/dist/assethandler/pages/SecurityPolicyDetailPage.js +50 -49
- package/dist/assethandler/pages/SecurityPolicyDetailPage.js.map +1 -1
- package/dist/assethandler/pages/SecuritySecurityEventDetailPage.js +47 -46
- package/dist/assethandler/pages/SecuritySecurityEventDetailPage.js.map +1 -1
- package/dist/assethandler/pages/SecuritySecurityHubPage.js +104 -104
- package/dist/assethandler/pages/SecuritySecurityHubPage.js.map +1 -1
- package/dist/assethandler/pages/TransactionsTransactionDetailPage.js +74 -73
- package/dist/assethandler/pages/TransactionsTransactionDetailPage.js.map +1 -1
- package/dist/assethandler/pages/TransactionsTransactionListPage.js +77 -77
- package/dist/assethandler/providers/AssetHandlerProvider.js +12 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationsWorkOrderDetailPage.js","names":[],"sources":["../../../src/assethandler/pages/OperationsWorkOrderDetailPage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Separator,\n GradientText,\n EmphasisPanel,\n PagePurpose,\n IllustratedEmptyState,\n} from '@burdenoff/fe-libs/ui';\nimport { ArrowLeft, CheckCircle } from 'lucide-react';\nimport {
|
|
1
|
+
{"version":3,"file":"OperationsWorkOrderDetailPage.js","names":[],"sources":["../../../src/assethandler/pages/OperationsWorkOrderDetailPage.tsx"],"sourcesContent":["import { useAssetHandlerNavigate } from '../hooks/useAssetHandlerNavigate';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Separator,\n GradientText,\n EmphasisPanel,\n PagePurpose,\n IllustratedEmptyState,\n} from '@burdenoff/fe-libs/ui';\nimport { ArrowLeft, CheckCircle } from 'lucide-react';\nimport { useParams } from 'react-router-dom';\nimport { useAssetHandlerStore } from '../store/assethandlerStore';\n\nconst priorityColors: Record<string, 'destructive' | 'default' | 'secondary' | 'outline'> = {\n critical: 'destructive',\n high: 'destructive',\n medium: 'default',\n low: 'secondary',\n};\n\nexport function OperationsWorkOrderDetailPage() {\n const navigate = useAssetHandlerNavigate();\n const { workOrderId } = useParams<{ workOrderId: string }>();\n const { workOrders } = useAssetHandlerStore();\n const wo = workOrders.find((item) => item.id === workOrderId) ?? workOrders[0];\n\n if (!wo)\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"Work order not found\"\n description=\"This work order may have been completed or removed. Return to the operations hub to find it.\"\n action={\n <Button size=\"sm\" onClick={() => navigate('/operations/operations-hub')}>\n Back to operations\n </Button>\n }\n />\n </div>\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate('/operations/operations-hub')}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <div>\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl font-bold\">\n <GradientText>{wo.id}</GradientText>\n </h1>\n <Badge variant={priorityColors[wo.priority]}>{wo.priority}</Badge>\n <Badge variant=\"outline\">{wo.status.replace('_', ' ')}</Badge>\n </div>\n <p className=\"text-sm text-text-secondary mt-1\">{wo.title}</p>\n </div>\n </div>\n <Button size=\"sm\">\n <CheckCircle className=\"mr-2 h-4 w-4\" />\n Complete\n </Button>\n </div>\n\n <PagePurpose>\n The full brief for a single work order: what needs doing, on which asset and by whom. Use\n this page to track the job from open to complete and keep the asset's maintenance\n history accurate.\n </PagePurpose>\n\n <div className=\"grid gap-6 lg:grid-cols-3\">\n <EmphasisPanel className=\"lg:col-span-2\">\n <CardHeader className=\"px-0 pt-0\">\n <CardTitle>Work Order Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4 px-0 pb-0\">\n <div>\n <h4 className=\"text-sm font-medium text-text-secondary\">Description</h4>\n <p className=\"text-sm mt-1\">{wo.description}</p>\n </div>\n <Separator />\n <div className=\"grid grid-cols-2 gap-4 text-sm\">\n <div>\n <span className=\"text-text-secondary\">Asset</span>\n <p className=\"font-medium\">{wo.assetId || 'Unassigned'}</p>\n </div>\n <div>\n <span className=\"text-text-secondary\">Type</span>\n <p className=\"font-medium\">{wo.type}</p>\n </div>\n <div>\n <span className=\"text-text-secondary\">Created</span>\n <p className=\"font-medium\">\n {wo.createdAt ? new Date(wo.createdAt).toLocaleDateString() : '—'}\n </p>\n </div>\n </div>\n </CardContent>\n </EmphasisPanel>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"text-base\">Assignment</CardTitle>\n </CardHeader>\n <CardContent>\n <dl className=\"space-y-3 text-sm\">\n <div className=\"flex justify-between\">\n <dt className=\"text-text-secondary\">Assigned To</dt>\n <dd className=\"text-xs font-medium\">{wo.assignedTo}</dd>\n </div>\n <div className=\"flex justify-between\">\n <dt className=\"text-text-secondary\">Priority</dt>\n <dd>\n <Badge variant={priorityColors[wo.priority]}>{wo.priority}</Badge>\n </dd>\n </div>\n <div className=\"flex justify-between\">\n <dt className=\"text-text-secondary\">Status</dt>\n <dd>\n <Badge variant=\"outline\">{wo.status.replace('_', ' ')}</Badge>\n </dd>\n </div>\n </dl>\n </CardContent>\n </Card>\n </div>\n </div>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { CheckCircle2 as n, MapPin as r, Package as i, Wrench as a } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { Badge as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p, GlassCard as m, GradientText as h, IllustratedEmptyState as g, PagePurpose as _, Table as v, TableBody as y, TableCell as b, TableHead as x, TableHeader as S, TableRow as C } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/assethandler/pages/PortfolioPortfolioOverviewPage.tsx
|
|
7
7
|
function w(e, t) {
|
|
8
8
|
let n = e.reduce((e, n) => {
|
|
@@ -14,152 +14,152 @@ function w(e, t) {
|
|
|
14
14
|
var T = (e) => e === "active" ? "default" : e === "disposed" ? "destructive" : "secondary";
|
|
15
15
|
function E() {
|
|
16
16
|
let { assets: E } = e(), D = t(() => w(E, (e) => e.category.replace(/_/g, " ")), [E]), O = t(() => w(E, (e) => e.status), [E]), k = t(() => w(E, (e) => e.condition), [E]), A = t(() => w(E, (e) => e.location.trim() || "Unlocated"), [E]), j = O.find(([e]) => e === "active")?.[1] ?? 0, M = O.find(([e]) => e === "maintenance")?.[1] ?? 0, N = Math.max(...D.map(([, e]) => e), 1);
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ c("div", {
|
|
18
18
|
className: "space-y-6 p-6",
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h1", {
|
|
21
21
|
className: "text-2xl font-semibold",
|
|
22
|
-
children: /* @__PURE__ */
|
|
23
|
-
}), /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ s(h, { children: "Portfolio Overview" })
|
|
23
|
+
}), /* @__PURE__ */ s("p", {
|
|
24
24
|
className: "text-sm text-text-secondary",
|
|
25
25
|
children: "A comprehensive view of your asset portfolio and how it is distributed."
|
|
26
26
|
})] }),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
E.length === 0 ? /* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ s(_, { children: "The big-picture view of everything you own: how many assets you have and how they break down by category, status, condition and location. Use it to inform replacement planning and audit." }),
|
|
28
|
+
E.length === 0 ? /* @__PURE__ */ s(g, {
|
|
29
29
|
illustration: "empty-data",
|
|
30
30
|
title: "No assets in your portfolio yet",
|
|
31
31
|
description: "Once you add assets, this overview will summarise them by category, status, condition and location."
|
|
32
|
-
}) : /* @__PURE__ */
|
|
32
|
+
}) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ c("div", {
|
|
33
33
|
className: "grid gap-4 md:grid-cols-4",
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ c(m, {
|
|
36
36
|
treatment: "metric",
|
|
37
37
|
className: "border-border-seam",
|
|
38
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ c(f, {
|
|
39
39
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ s(p, {
|
|
41
41
|
className: "text-sm font-medium",
|
|
42
42
|
children: "Total Assets"
|
|
43
|
-
}), /* @__PURE__ */
|
|
44
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ s(i, { className: "h-4 w-4 text-text-secondary" })]
|
|
44
|
+
}), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
|
|
45
45
|
className: "text-2xl font-bold tabular-nums",
|
|
46
46
|
children: E.length.toLocaleString()
|
|
47
|
-
}), /* @__PURE__ */
|
|
47
|
+
}), /* @__PURE__ */ s("p", {
|
|
48
48
|
className: "text-xs text-text-secondary",
|
|
49
49
|
children: "Across all categories"
|
|
50
50
|
})] })]
|
|
51
51
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ c(m, {
|
|
53
53
|
treatment: "glass",
|
|
54
54
|
glow: !0,
|
|
55
55
|
className: "border-border-seam",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ c(f, {
|
|
57
57
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ s(p, {
|
|
59
59
|
className: "text-sm font-medium",
|
|
60
60
|
children: "Active"
|
|
61
|
-
}), /* @__PURE__ */
|
|
62
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ s(n, { className: "h-4 w-4 text-status-success-text" })]
|
|
62
|
+
}), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
|
|
63
63
|
className: "text-2xl font-bold tabular-nums",
|
|
64
64
|
children: j
|
|
65
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ c("p", {
|
|
66
66
|
className: "text-xs text-text-secondary",
|
|
67
67
|
children: [E.length > 0 ? Math.round(j / E.length * 100) : 0, "% of estate"]
|
|
68
68
|
})] })]
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ c(m, {
|
|
71
71
|
treatment: "metric",
|
|
72
72
|
className: "border-border-seam",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
73
|
+
children: [/* @__PURE__ */ c(f, {
|
|
74
74
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ s(p, {
|
|
76
76
|
className: "text-sm font-medium",
|
|
77
77
|
children: "In Maintenance"
|
|
78
|
-
}), /* @__PURE__ */
|
|
79
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ s(a, { className: "h-4 w-4 text-status-warning-text" })]
|
|
79
|
+
}), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
|
|
80
80
|
className: "text-2xl font-bold tabular-nums",
|
|
81
81
|
children: M
|
|
82
|
-
}), /* @__PURE__ */
|
|
82
|
+
}), /* @__PURE__ */ s("p", {
|
|
83
83
|
className: "text-xs text-text-secondary",
|
|
84
84
|
children: "Currently being serviced"
|
|
85
85
|
})] })]
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ c(m, {
|
|
88
88
|
treatment: "metric",
|
|
89
89
|
className: "border-border-seam",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ c(f, {
|
|
91
91
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ s(p, {
|
|
93
93
|
className: "text-sm font-medium",
|
|
94
94
|
children: "Locations"
|
|
95
|
-
}), /* @__PURE__ */
|
|
96
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ s(r, { className: "h-4 w-4 text-text-secondary" })]
|
|
96
|
+
}), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
|
|
97
97
|
className: "text-2xl font-bold tabular-nums",
|
|
98
98
|
children: A.filter(([e]) => e !== "Unlocated").length
|
|
99
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ s("p", {
|
|
100
100
|
className: "text-xs text-text-secondary",
|
|
101
101
|
children: "Distinct asset locations"
|
|
102
102
|
})] })]
|
|
103
103
|
})
|
|
104
104
|
]
|
|
105
|
-
}), /* @__PURE__ */
|
|
105
|
+
}), /* @__PURE__ */ c("div", {
|
|
106
106
|
className: "grid gap-6 md:grid-cols-2",
|
|
107
107
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ c(u, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { children: "Assets by Category" }) }), /* @__PURE__ */ s(d, {
|
|
109
109
|
className: "space-y-3",
|
|
110
|
-
children: D.map(([e, t]) => /* @__PURE__ */
|
|
110
|
+
children: D.map(([e, t]) => /* @__PURE__ */ c("div", {
|
|
111
111
|
className: "space-y-1",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ c("div", {
|
|
113
113
|
className: "flex items-center justify-between text-sm",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ s("span", {
|
|
115
115
|
className: "font-medium capitalize",
|
|
116
116
|
children: e
|
|
117
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ c("span", {
|
|
118
118
|
className: "text-text-secondary",
|
|
119
119
|
children: [t, " assets"]
|
|
120
120
|
})]
|
|
121
|
-
}), /* @__PURE__ */
|
|
121
|
+
}), /* @__PURE__ */ s("div", {
|
|
122
122
|
className: "h-3 bg-bg-sunken rounded overflow-hidden",
|
|
123
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ s("div", {
|
|
124
124
|
className: "h-3 bg-action-primary-bg rounded",
|
|
125
125
|
style: { width: `${Math.round(t / N * 100)}%` }
|
|
126
126
|
})
|
|
127
127
|
})]
|
|
128
128
|
}, e))
|
|
129
129
|
})] }),
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ c(u, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { children: "Assets by Location" }) }), /* @__PURE__ */ s(d, { children: /* @__PURE__ */ c(v, { children: [/* @__PURE__ */ s(S, { children: /* @__PURE__ */ c(C, { children: [/* @__PURE__ */ s(x, { children: "Location" }), /* @__PURE__ */ s(x, {
|
|
131
131
|
className: "text-right",
|
|
132
132
|
children: "Count"
|
|
133
|
-
})] }) }), /* @__PURE__ */
|
|
133
|
+
})] }) }), /* @__PURE__ */ s(y, { children: A.map(([e, t]) => /* @__PURE__ */ c(C, { children: [/* @__PURE__ */ s(b, {
|
|
134
134
|
className: "font-medium",
|
|
135
135
|
children: e
|
|
136
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ s(b, {
|
|
137
137
|
className: "text-right",
|
|
138
138
|
children: t
|
|
139
139
|
})] }, e)) })] }) })] }),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ c(u, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { children: "Assets by Status" }) }), /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s("div", {
|
|
141
141
|
className: "flex flex-wrap gap-3",
|
|
142
|
-
children: O.map(([e, t]) => /* @__PURE__ */
|
|
142
|
+
children: O.map(([e, t]) => /* @__PURE__ */ c("div", {
|
|
143
143
|
className: "flex items-center gap-2 rounded-lg border p-3",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ s(l, {
|
|
145
145
|
variant: T(e),
|
|
146
146
|
className: "capitalize",
|
|
147
147
|
children: e.replace(/_/g, " ")
|
|
148
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ s("span", {
|
|
149
149
|
className: "text-lg font-bold",
|
|
150
150
|
children: t
|
|
151
151
|
})]
|
|
152
152
|
}, e))
|
|
153
153
|
}) })] }),
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ c(u, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { children: "Assets by Condition" }) }), /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s("div", {
|
|
155
155
|
className: "flex flex-wrap gap-3",
|
|
156
|
-
children: k.map(([e, t]) => /* @__PURE__ */
|
|
156
|
+
children: k.map(([e, t]) => /* @__PURE__ */ c("div", {
|
|
157
157
|
className: "flex items-center gap-2 rounded-lg border p-3",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ s(l, {
|
|
159
159
|
variant: "outline",
|
|
160
160
|
className: "capitalize",
|
|
161
161
|
children: e
|
|
162
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ s("span", {
|
|
163
163
|
className: "text-lg font-bold",
|
|
164
164
|
children: t
|
|
165
165
|
})]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useState as e } from "react";
|
|
2
2
|
import { ShieldCheck as t } from "lucide-react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { gql as n } from "@apollo/client";
|
|
4
|
+
import { useMutation as r, useQuery as i } from "@apollo/client/react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { EmphasisPanel as s, GradientText as c, IllustratedEmptyState as l, PagePurpose as u } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
//#region src/assethandler/pages/ProvenancePage.tsx
|
|
8
|
-
var d =
|
|
8
|
+
var d = n`
|
|
9
9
|
query AssetHandlerProvenanceRecords {
|
|
10
10
|
provenanceRecords {
|
|
11
11
|
id
|
|
@@ -17,7 +17,7 @@ var d = c`
|
|
|
17
17
|
attestedBy
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
`, f =
|
|
20
|
+
`, f = n`
|
|
21
21
|
mutation AssetHandlerRecordProvenance($input: RecordProvenanceInput!) {
|
|
22
22
|
recordProvenance(input: $input) {
|
|
23
23
|
id
|
|
@@ -25,48 +25,48 @@ var d = c`
|
|
|
25
25
|
}
|
|
26
26
|
`;
|
|
27
27
|
function p() {
|
|
28
|
-
let [
|
|
28
|
+
let [n, p] = e("AST-001"), [m, h] = e("polygon-amoy"), { data: g, loading: _, refetch: v } = i(d, { fetchPolicy: "cache-and-network" }), [y, { loading: b }] = r(f, { onCompleted: () => {
|
|
29
29
|
v();
|
|
30
30
|
} }), x = g?.provenanceRecords ?? [];
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ o("div", {
|
|
32
32
|
className: "space-y-4 p-4",
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ o("h1", {
|
|
35
35
|
className: "flex items-center gap-2 text-2xl font-semibold",
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ a(t, { className: "h-6 w-6" }),
|
|
38
38
|
" ",
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ a(c, { children: "Provenance" })
|
|
40
40
|
]
|
|
41
41
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */ s
|
|
42
|
+
/* @__PURE__ */ a(u, { children: "Prove an asset's history is tamper-proof. Record cryptographic attestations of key lifecycle events to a blockchain network so ownership, custody and condition can be independently verified later — essential for high-value, regulated or resold assets." }),
|
|
43
|
+
/* @__PURE__ */ o(s, { children: [/* @__PURE__ */ a("h2", {
|
|
44
44
|
className: "text-sm font-semibold mb-3",
|
|
45
45
|
children: "Record an attestation"
|
|
46
|
-
}), /* @__PURE__ */
|
|
46
|
+
}), /* @__PURE__ */ o("form", {
|
|
47
47
|
className: "grid gap-3 md:grid-cols-3",
|
|
48
48
|
onSubmit: (e) => {
|
|
49
49
|
e.preventDefault(), y({ variables: { input: {
|
|
50
|
-
assetId:
|
|
51
|
-
hash: `${
|
|
50
|
+
assetId: n,
|
|
51
|
+
hash: `${n}-${Date.now()}`,
|
|
52
52
|
chainNetwork: m,
|
|
53
53
|
metadata: { source: "assethandler-ui" }
|
|
54
54
|
} } });
|
|
55
55
|
},
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ a("input", {
|
|
58
58
|
className: "rounded-md border px-3 py-2",
|
|
59
|
-
value:
|
|
59
|
+
value: n,
|
|
60
60
|
onChange: (e) => p(e.target.value),
|
|
61
61
|
"aria-label": "Asset ID"
|
|
62
62
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ a("input", {
|
|
64
64
|
className: "rounded-md border px-3 py-2",
|
|
65
65
|
value: m,
|
|
66
66
|
onChange: (e) => h(e.target.value),
|
|
67
67
|
"aria-label": "Chain network"
|
|
68
68
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ a("button", {
|
|
70
70
|
className: "rounded-md bg-action-primary-bg px-3 py-2 text-action-primary-text",
|
|
71
71
|
disabled: b,
|
|
72
72
|
type: "submit",
|
|
@@ -74,42 +74,42 @@ function p() {
|
|
|
74
74
|
})
|
|
75
75
|
]
|
|
76
76
|
})] }),
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ o("div", {
|
|
78
78
|
className: "rounded-lg border",
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ o("div", {
|
|
81
81
|
className: "grid grid-cols-5 gap-3 border-b px-4 py-3 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ a("span", { children: "Asset" }),
|
|
84
|
+
/* @__PURE__ */ a("span", { children: "Network" }),
|
|
85
|
+
/* @__PURE__ */ a("span", { children: "Hash" }),
|
|
86
|
+
/* @__PURE__ */ a("span", { children: "Tx" }),
|
|
87
|
+
/* @__PURE__ */ a("span", { children: "Attested At" })
|
|
88
88
|
]
|
|
89
89
|
}),
|
|
90
|
-
_ && x.length === 0 ? /* @__PURE__ */
|
|
90
|
+
_ && x.length === 0 ? /* @__PURE__ */ a("div", {
|
|
91
91
|
className: "space-y-2 px-4 py-4",
|
|
92
|
-
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */
|
|
92
|
+
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ a("div", { className: "h-8 rounded-md bg-bg-sunken motion-safe:animate-vc-shimmer" }, t))
|
|
93
93
|
}) : null,
|
|
94
|
-
!_ && x.length === 0 ? /* @__PURE__ */
|
|
94
|
+
!_ && x.length === 0 ? /* @__PURE__ */ a(l, {
|
|
95
95
|
illustration: "empty-data",
|
|
96
96
|
title: "No provenance records yet",
|
|
97
97
|
description: "Record an attestation above to start an immutable, verifiable history for your assets."
|
|
98
98
|
}) : null,
|
|
99
|
-
x.map((e) => /* @__PURE__ */
|
|
99
|
+
x.map((e) => /* @__PURE__ */ o("div", {
|
|
100
100
|
className: "grid grid-cols-5 gap-3 border-b px-4 py-3 text-sm last:border-b-0",
|
|
101
101
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ a("span", { children: e.assetId }),
|
|
103
|
+
/* @__PURE__ */ a("span", { children: e.chainNetwork }),
|
|
104
|
+
/* @__PURE__ */ a("span", {
|
|
105
105
|
className: "truncate",
|
|
106
106
|
children: e.hash
|
|
107
107
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ a("span", {
|
|
109
109
|
className: "truncate text-text-secondary",
|
|
110
110
|
children: e.txHash ?? "pending"
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ a("span", {
|
|
113
113
|
className: "text-text-secondary",
|
|
114
114
|
children: new Date(e.attestedAt).toLocaleString()
|
|
115
115
|
})
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { KeyRound as e } from "lucide-react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { gql as t } from "@apollo/client";
|
|
3
|
+
import { useQuery as n } from "@apollo/client/react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { GlassCard as a, GradientText as o, IllustratedEmptyState as s, PagePurpose as c } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/assethandler/pages/SamLicensesPage.tsx
|
|
7
|
-
var l =
|
|
7
|
+
var l = t`
|
|
8
8
|
query AssetHandlerSoftwareAssets {
|
|
9
9
|
softwareAssets {
|
|
10
10
|
id
|
|
@@ -19,58 +19,58 @@ var l = s`
|
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
21
|
function u() {
|
|
22
|
-
let { data:
|
|
23
|
-
return /* @__PURE__ */
|
|
22
|
+
let { data: t, loading: u } = n(l, { fetchPolicy: "cache-and-network" }), d = t?.softwareAssets ?? [];
|
|
23
|
+
return /* @__PURE__ */ i("div", {
|
|
24
24
|
className: "space-y-4 p-4",
|
|
25
25
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ i("h1", {
|
|
27
27
|
className: "flex items-center gap-2 text-2xl font-semibold",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ r(e, { className: "h-6 w-6" }),
|
|
30
30
|
" ",
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ r(o, { children: "SAM Licenses" })
|
|
32
32
|
]
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ r(c, { children: "Software Asset Management (SAM): track every software entitlement against actual usage so you stay license-compliant and stop paying for seats nobody uses. Spot over- and under-licensing here to avoid audit penalties and reclaim wasted spend." }),
|
|
35
|
+
/* @__PURE__ */ i(a, {
|
|
36
36
|
treatment: "glass",
|
|
37
37
|
glow: !0,
|
|
38
38
|
className: "overflow-hidden border-border-seam",
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ i("div", {
|
|
41
41
|
className: "grid grid-cols-5 gap-3 border-b px-4 py-3 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ r("span", { children: "Software" }),
|
|
44
|
+
/* @__PURE__ */ r("span", { children: "Vendor" }),
|
|
45
|
+
/* @__PURE__ */ r("span", { children: "Version" }),
|
|
46
|
+
/* @__PURE__ */ r("span", { children: "Seats Used" }),
|
|
47
|
+
/* @__PURE__ */ r("span", { children: "Compliance" })
|
|
48
48
|
]
|
|
49
49
|
}),
|
|
50
|
-
u && d.length === 0 ? /* @__PURE__ */
|
|
50
|
+
u && d.length === 0 ? /* @__PURE__ */ r("div", {
|
|
51
51
|
className: "space-y-2 px-4 py-4",
|
|
52
|
-
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */
|
|
52
|
+
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ r("div", { className: "h-8 rounded-md bg-bg-sunken motion-safe:animate-vc-shimmer" }, t))
|
|
53
53
|
}) : null,
|
|
54
|
-
!u && d.length === 0 ? /* @__PURE__ */
|
|
54
|
+
!u && d.length === 0 ? /* @__PURE__ */ r(s, {
|
|
55
55
|
illustration: "empty-data",
|
|
56
56
|
title: "No software assets found",
|
|
57
57
|
description: "Discovered software assets and licenses will appear here."
|
|
58
58
|
}) : null,
|
|
59
|
-
d.map((e) => /* @__PURE__ */
|
|
59
|
+
d.map((e) => /* @__PURE__ */ i("div", {
|
|
60
60
|
className: "grid grid-cols-5 gap-3 border-b px-4 py-3 text-sm last:border-b-0",
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ r("span", {
|
|
63
63
|
className: "font-medium",
|
|
64
64
|
children: e.name
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ r("span", { children: e.vendor }),
|
|
67
|
+
/* @__PURE__ */ r("span", { children: e.version }),
|
|
68
|
+
/* @__PURE__ */ i("span", { children: [
|
|
69
69
|
e.seatsUsed ?? 0,
|
|
70
70
|
"/",
|
|
71
71
|
e.seatsPurchased ?? "-"
|
|
72
72
|
] }),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ i("span", { children: [e.compliancePercent.toFixed(1), "%"] })
|
|
74
74
|
]
|
|
75
75
|
}, e.id))
|
|
76
76
|
]
|