@burdenoff/microfe-assethandler 2026.703.2 → 2026.703.3
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,18 +1,18 @@
|
|
|
1
1
|
import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { Box as n, Code as r, Monitor as i, Plus as a, Server as o, Truck as s, Wifi as c, Wrench as l } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
import { Badge as f, Button as p, CardContent as m, CardDescription as h, CardHeader as g, CardTitle as _, GlassCard as v, GradientText as y, IllustratedEmptyState as b, PagePurpose as x, Separator as S } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/assethandler/pages/AssetsAssetCategoriesPage.tsx
|
|
7
7
|
var C = {
|
|
8
|
-
electronics: /* @__PURE__ */
|
|
9
|
-
it_hardware: /* @__PURE__ */
|
|
10
|
-
furniture: /* @__PURE__ */
|
|
11
|
-
vehicles: /* @__PURE__ */
|
|
12
|
-
equipment: /* @__PURE__ */
|
|
13
|
-
software: /* @__PURE__ */
|
|
14
|
-
networking: /* @__PURE__ */
|
|
15
|
-
servers: /* @__PURE__ */
|
|
8
|
+
electronics: /* @__PURE__ */ u(i, { className: "h-5 w-5" }),
|
|
9
|
+
it_hardware: /* @__PURE__ */ u(i, { className: "h-5 w-5" }),
|
|
10
|
+
furniture: /* @__PURE__ */ u(n, { className: "h-5 w-5" }),
|
|
11
|
+
vehicles: /* @__PURE__ */ u(s, { className: "h-5 w-5" }),
|
|
12
|
+
equipment: /* @__PURE__ */ u(l, { className: "h-5 w-5" }),
|
|
13
|
+
software: /* @__PURE__ */ u(r, { className: "h-5 w-5" }),
|
|
14
|
+
networking: /* @__PURE__ */ u(c, { className: "h-5 w-5" }),
|
|
15
|
+
servers: /* @__PURE__ */ u(o, { className: "h-5 w-5" })
|
|
16
16
|
}, w = {
|
|
17
17
|
electronics: "bg-status-info-bg-subtle text-status-info-text",
|
|
18
18
|
it_hardware: "bg-status-info-bg-subtle text-status-info-text",
|
|
@@ -39,15 +39,15 @@ function T() {
|
|
|
39
39
|
for (let t of Object.values(e)) t.topAssets.sort((e, t) => e.name.localeCompare(t.name)), t.topAssets = t.topAssets.slice(0, 3);
|
|
40
40
|
return e;
|
|
41
41
|
}, [r]), o = r.length;
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ d("div", {
|
|
43
43
|
className: "space-y-6 p-6",
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ d("div", {
|
|
46
46
|
className: "flex items-center justify-between",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
|
|
48
48
|
className: "text-2xl font-bold",
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
}), /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ u(y, { children: "Asset Categories" })
|
|
50
|
+
}), /* @__PURE__ */ d("p", {
|
|
51
51
|
className: "text-sm text-text-secondary",
|
|
52
52
|
children: [
|
|
53
53
|
Object.keys(i).length,
|
|
@@ -55,70 +55,70 @@ function T() {
|
|
|
55
55
|
o,
|
|
56
56
|
" total assets"
|
|
57
57
|
]
|
|
58
|
-
})] }), /* @__PURE__ */
|
|
58
|
+
})] }), /* @__PURE__ */ d(p, {
|
|
59
59
|
size: "sm",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ u(a, { className: "mr-2 h-4 w-4" }), "Add Category"]
|
|
61
61
|
})]
|
|
62
62
|
}),
|
|
63
|
-
/* @__PURE__ */ x
|
|
64
|
-
Object.keys(i).length === 0 ? /* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ u(x, { children: "Group and compare your assets by category to see where they are concentrated. Each card rolls up how many assets you have in a category, their status and condition mix, and a few example items — so you can plan procurement and replacements by category, not one asset at a time." }),
|
|
64
|
+
Object.keys(i).length === 0 ? /* @__PURE__ */ u(b, {
|
|
65
65
|
illustration: "empty-data",
|
|
66
66
|
title: "No categories yet",
|
|
67
67
|
description: "Add assets and they will be grouped into categories here automatically."
|
|
68
|
-
}) : /* @__PURE__ */
|
|
68
|
+
}) : /* @__PURE__ */ u("div", {
|
|
69
69
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
70
70
|
children: Object.entries(i).map(([e, t], r) => {
|
|
71
71
|
let i = o > 0 ? Math.round(t.count / o * 100) : 0;
|
|
72
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ d(v, {
|
|
73
73
|
treatment: r === 0 ? "glass" : "plain",
|
|
74
74
|
glow: r === 0,
|
|
75
75
|
className: "border-border-seam",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ d(g, {
|
|
77
77
|
className: "pb-3",
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ d("div", {
|
|
80
80
|
className: "flex items-center justify-between",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ u("div", {
|
|
82
82
|
className: `p-2 rounded-lg ${w[e] || "bg-bg-sunken"}`,
|
|
83
|
-
children: C[e] || /* @__PURE__ */
|
|
84
|
-
}), /* @__PURE__ */
|
|
83
|
+
children: C[e] || /* @__PURE__ */ u(n, { className: "h-5 w-5" })
|
|
84
|
+
}), /* @__PURE__ */ d(f, {
|
|
85
85
|
variant: "outline",
|
|
86
86
|
children: [i, "%"]
|
|
87
87
|
})]
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ u(_, {
|
|
90
90
|
className: "capitalize mt-3",
|
|
91
91
|
children: e.replace("_", " ")
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ d(h, { children: [t.count, " assets"] })
|
|
94
94
|
]
|
|
95
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ u(m, { children: /* @__PURE__ */ d("div", {
|
|
96
96
|
className: "space-y-3",
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ d("div", {
|
|
99
99
|
className: "flex justify-between text-sm",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ u("span", {
|
|
101
101
|
className: "text-text-secondary",
|
|
102
102
|
children: "Share of estate"
|
|
103
|
-
}), /* @__PURE__ */
|
|
103
|
+
}), /* @__PURE__ */ d("span", {
|
|
104
104
|
className: "font-medium",
|
|
105
105
|
children: [i, "%"]
|
|
106
106
|
})]
|
|
107
107
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ u("div", {
|
|
109
109
|
className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
110
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ u("div", {
|
|
111
111
|
className: "h-full rounded-full bg-action-primary-bg",
|
|
112
112
|
style: { width: `${i}%` }
|
|
113
113
|
})
|
|
114
114
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ u(S, {}),
|
|
116
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
117
117
|
className: "text-xs font-medium text-text-secondary mb-2",
|
|
118
118
|
children: "Status breakdown"
|
|
119
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ u("div", {
|
|
120
120
|
className: "flex flex-wrap gap-1",
|
|
121
|
-
children: Object.entries(t.statuses).map(([e, t]) => /* @__PURE__ */
|
|
121
|
+
children: Object.entries(t.statuses).map(([e, t]) => /* @__PURE__ */ d(f, {
|
|
122
122
|
variant: "secondary",
|
|
123
123
|
className: "text-[10px]",
|
|
124
124
|
children: [
|
|
@@ -128,13 +128,13 @@ function T() {
|
|
|
128
128
|
]
|
|
129
129
|
}, e))
|
|
130
130
|
})] }),
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ u(S, {}),
|
|
132
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
133
133
|
className: "text-xs font-medium text-text-secondary mb-2",
|
|
134
134
|
children: "Condition breakdown"
|
|
135
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ u("div", {
|
|
136
136
|
className: "flex flex-wrap gap-1",
|
|
137
|
-
children: Object.entries(t.conditions).map(([e, t]) => /* @__PURE__ */
|
|
137
|
+
children: Object.entries(t.conditions).map(([e, t]) => /* @__PURE__ */ d(f, {
|
|
138
138
|
variant: "outline",
|
|
139
139
|
className: "text-[10px]",
|
|
140
140
|
children: [
|
|
@@ -144,18 +144,18 @@ function T() {
|
|
|
144
144
|
]
|
|
145
145
|
}, e))
|
|
146
146
|
})] }),
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ u(S, {}),
|
|
148
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
149
149
|
className: "text-xs font-medium text-text-secondary mb-2",
|
|
150
150
|
children: "Example assets"
|
|
151
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ u("div", {
|
|
152
152
|
className: "space-y-1.5",
|
|
153
|
-
children: t.topAssets.map((e) => /* @__PURE__ */
|
|
153
|
+
children: t.topAssets.map((e) => /* @__PURE__ */ d("div", {
|
|
154
154
|
className: "flex items-center justify-between text-xs",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ u("span", {
|
|
156
156
|
className: "truncate flex-1",
|
|
157
157
|
children: e.name
|
|
158
|
-
}), /* @__PURE__ */
|
|
158
|
+
}), /* @__PURE__ */ u("span", {
|
|
159
159
|
className: "font-medium ml-2 capitalize text-text-secondary",
|
|
160
160
|
children: e.condition
|
|
161
161
|
})]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
|
|
2
2
|
import { notify as t } from "../utils/toast.js";
|
|
3
3
|
import { useMemo as n, useState as r } from "react";
|
|
4
|
-
import { AlertTriangle as i, ArrowDownToLine as a, ArrowUpFromLine as o, Clock as s, Search as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { AlertTriangle as i, ArrowDownToLine as a, ArrowUpFromLine as o, Clock as s, Search as ee } from "lucide-react";
|
|
5
|
+
import { gql as c } from "@apollo/client";
|
|
6
|
+
import { useMutation as l, useQuery as u } from "@apollo/client/react";
|
|
7
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
import { Badge as p, Button as m, Card as h, CardContent as g, EmphasisPanel as _, GradientText as v, IllustratedEmptyState as y, Input as b, PagePurpose as x, Tabs as S, TabsContent as C, TabsList as w, TabsTrigger as T } from "@burdenoff/fe-libs/ui";
|
|
9
9
|
//#region src/assethandler/pages/AssetsAssetCheckInOutPage.tsx
|
|
10
|
-
var E =
|
|
10
|
+
var E = c`
|
|
11
11
|
query AssetHandlerAssetAssignments {
|
|
12
12
|
assetAssignments {
|
|
13
13
|
id
|
|
@@ -22,14 +22,14 @@ var E = C`
|
|
|
22
22
|
notes
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`, D =
|
|
25
|
+
`, D = c`
|
|
26
26
|
mutation AssetHandlerCheckOutAsset($input: CheckOutAssetInput!) {
|
|
27
27
|
checkOutAsset(input: $input) {
|
|
28
28
|
id
|
|
29
29
|
status
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`, O =
|
|
32
|
+
`, O = c`
|
|
33
33
|
mutation AssetHandlerCheckInAsset($input: CheckInAssetInput!) {
|
|
34
34
|
checkInAsset(input: $input) {
|
|
35
35
|
id
|
|
@@ -46,42 +46,42 @@ var E = C`
|
|
|
46
46
|
OVERDUE: "overdue"
|
|
47
47
|
};
|
|
48
48
|
function j() {
|
|
49
|
-
let { assets:
|
|
49
|
+
let { assets: c } = e(), [j, M] = r(""), [te, N] = r(!1), [P, F] = r(""), [I, L] = r(""), [R, z] = r(""), [B, V] = r(""), { data: H, loading: U, refetch: W } = u(E, { fetchPolicy: "cache-and-network" }), [G, { loading: K }] = l(D, {
|
|
50
50
|
onCompleted: () => {
|
|
51
51
|
t.success("Asset checked out", "The assignment has been recorded."), N(!1), F(""), L(""), z(""), V(""), W();
|
|
52
52
|
},
|
|
53
53
|
onError: (e) => t.error("Check-out failed", e.message)
|
|
54
|
-
}), [q, { loading: J }] =
|
|
54
|
+
}), [q, { loading: J }] = l(O, {
|
|
55
55
|
onCompleted: () => {
|
|
56
56
|
t.success("Asset checked in", "The asset has been returned."), W();
|
|
57
57
|
},
|
|
58
58
|
onError: (e) => t.error("Check-in failed", e.message)
|
|
59
59
|
}), Y = n(() => H?.assetAssignments ?? [], [H]), X = Y.filter((e) => e.status === "CHECKED_OUT"), Z = Y.filter((e) => e.status === "OVERDUE"), Q = Y.filter((e) => e.status === "RETURNED"), $ = Y.filter((e) => j === "" || e.assetName.toLowerCase().includes(j.toLowerCase()) || e.assignedTo.toLowerCase().includes(j.toLowerCase()));
|
|
60
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ f("div", {
|
|
61
61
|
className: "space-y-6 p-6",
|
|
62
62
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ f("div", {
|
|
64
64
|
className: "flex items-center justify-between",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
|
|
66
66
|
className: "text-2xl font-bold",
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
}), /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ d(v, { children: "Asset Check-In / Check-Out" })
|
|
68
|
+
}), /* @__PURE__ */ d("p", {
|
|
69
69
|
className: "text-sm text-text-secondary",
|
|
70
70
|
children: "Manage asset assignments and returns"
|
|
71
|
-
})] }), /* @__PURE__ */
|
|
71
|
+
})] }), /* @__PURE__ */ d("div", {
|
|
72
72
|
className: "flex gap-2",
|
|
73
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ f(m, {
|
|
74
74
|
size: "sm",
|
|
75
75
|
onClick: () => N((e) => !e),
|
|
76
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ d(o, { className: "mr-2 h-4 w-4" }), "Check Out"]
|
|
77
77
|
})
|
|
78
78
|
})]
|
|
79
79
|
}),
|
|
80
|
-
/* @__PURE__ */ x
|
|
81
|
-
te && /* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ d(x, { children: "Know who has what, right now. Check assets out to people for a job or loan period and check them back in on return. Use it to chase overdue items and make sure nothing walks off without a trace." }),
|
|
81
|
+
te && /* @__PURE__ */ f(_, { children: [/* @__PURE__ */ d("h2", {
|
|
82
82
|
className: "text-sm font-semibold mb-3",
|
|
83
83
|
children: "Check out an asset"
|
|
84
|
-
}), /* @__PURE__ */
|
|
84
|
+
}), /* @__PURE__ */ f("form", {
|
|
85
85
|
className: "grid gap-3 md:grid-cols-2 lg:grid-cols-4",
|
|
86
86
|
onSubmit: (e) => {
|
|
87
87
|
if (e.preventDefault(), !P || !I.trim()) {
|
|
@@ -96,15 +96,15 @@ function j() {
|
|
|
96
96
|
} } });
|
|
97
97
|
},
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ f("select", {
|
|
100
100
|
className: "rounded-md border px-3 py-2 bg-bg-base",
|
|
101
101
|
value: P,
|
|
102
102
|
onChange: (e) => F(e.target.value),
|
|
103
103
|
"aria-label": "Asset to check out",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ d("option", {
|
|
105
105
|
value: "",
|
|
106
106
|
children: "Select an asset…"
|
|
107
|
-
}),
|
|
107
|
+
}), c.map((e) => /* @__PURE__ */ f("option", {
|
|
108
108
|
value: e.id,
|
|
109
109
|
children: [
|
|
110
110
|
e.name,
|
|
@@ -114,30 +114,30 @@ function j() {
|
|
|
114
114
|
]
|
|
115
115
|
}, e.id))]
|
|
116
116
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ d(b, {
|
|
118
118
|
placeholder: "Assign to (name or email)",
|
|
119
119
|
value: I,
|
|
120
120
|
onChange: (e) => L(e.target.value)
|
|
121
121
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ d(b, {
|
|
123
123
|
type: "date",
|
|
124
124
|
"aria-label": "Due date",
|
|
125
125
|
value: R,
|
|
126
126
|
onChange: (e) => z(e.target.value)
|
|
127
127
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ d(b, {
|
|
129
129
|
placeholder: "Notes (optional)",
|
|
130
130
|
value: B,
|
|
131
131
|
onChange: (e) => V(e.target.value)
|
|
132
132
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ f("div", {
|
|
134
134
|
className: "md:col-span-2 lg:col-span-4 flex gap-2",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ d(m, {
|
|
136
136
|
type: "submit",
|
|
137
137
|
size: "sm",
|
|
138
138
|
disabled: K,
|
|
139
139
|
children: K ? "Checking out…" : "Confirm check-out"
|
|
140
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ d(m, {
|
|
141
141
|
type: "button",
|
|
142
142
|
variant: "outline",
|
|
143
143
|
size: "sm",
|
|
@@ -147,61 +147,61 @@ function j() {
|
|
|
147
147
|
})
|
|
148
148
|
]
|
|
149
149
|
})] }),
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ f("div", {
|
|
151
151
|
className: "grid gap-4 md:grid-cols-4",
|
|
152
152
|
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ f(_, { children: [/* @__PURE__ */ f("div", {
|
|
154
154
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
156
|
-
}), /* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ d(o, { className: "h-4 w-4" }), "Active Checkouts"]
|
|
156
|
+
}), /* @__PURE__ */ d("p", {
|
|
157
157
|
className: "text-2xl font-bold mt-1 tabular-nums",
|
|
158
158
|
children: X.length
|
|
159
159
|
})] }),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ d(h, { children: /* @__PURE__ */ f(g, {
|
|
161
161
|
className: "pt-4",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ f("div", {
|
|
163
163
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
-
}), /* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ d(i, { className: "h-4 w-4 text-status-error-text" }), "Overdue"]
|
|
165
|
+
}), /* @__PURE__ */ d("p", {
|
|
166
166
|
className: "text-2xl font-bold mt-1 text-status-error-text",
|
|
167
167
|
children: Z.length
|
|
168
168
|
})]
|
|
169
169
|
}) }),
|
|
170
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ d(h, { children: /* @__PURE__ */ f(g, {
|
|
171
171
|
className: "pt-4",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ f("div", {
|
|
173
173
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
175
|
-
}), /* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ d(a, { className: "h-4 w-4" }), "Returned"]
|
|
175
|
+
}), /* @__PURE__ */ d("p", {
|
|
176
176
|
className: "text-2xl font-bold mt-1",
|
|
177
177
|
children: Q.length
|
|
178
178
|
})]
|
|
179
179
|
}) }),
|
|
180
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ d(h, { children: /* @__PURE__ */ f(g, {
|
|
181
181
|
className: "pt-4",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ f("div", {
|
|
183
183
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
185
|
-
}), /* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ d(s, { className: "h-4 w-4" }), "Total Records"]
|
|
185
|
+
}), /* @__PURE__ */ d("p", {
|
|
186
186
|
className: "text-2xl font-bold mt-1",
|
|
187
187
|
children: Y.length
|
|
188
188
|
})]
|
|
189
189
|
}) })
|
|
190
190
|
]
|
|
191
191
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ f("div", {
|
|
193
193
|
className: "relative max-w-md",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ d(ee, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ d(b, {
|
|
195
195
|
placeholder: "Search by asset or person…",
|
|
196
196
|
value: j,
|
|
197
197
|
onChange: (e) => M(e.target.value),
|
|
198
198
|
className: "pl-9"
|
|
199
199
|
})]
|
|
200
200
|
}),
|
|
201
|
-
/* @__PURE__ */ S
|
|
201
|
+
/* @__PURE__ */ f(S, {
|
|
202
202
|
defaultValue: "all",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ f(w, { children: [
|
|
204
|
+
/* @__PURE__ */ f(T, {
|
|
205
205
|
value: "all",
|
|
206
206
|
children: [
|
|
207
207
|
"All (",
|
|
@@ -209,7 +209,7 @@ function j() {
|
|
|
209
209
|
")"
|
|
210
210
|
]
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ f(T, {
|
|
213
213
|
value: "active",
|
|
214
214
|
children: [
|
|
215
215
|
"Active (",
|
|
@@ -217,7 +217,7 @@ function j() {
|
|
|
217
217
|
")"
|
|
218
218
|
]
|
|
219
219
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ f(T, {
|
|
221
221
|
value: "overdue",
|
|
222
222
|
children: [
|
|
223
223
|
"Overdue (",
|
|
@@ -225,7 +225,7 @@ function j() {
|
|
|
225
225
|
")"
|
|
226
226
|
]
|
|
227
227
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ f(T, {
|
|
229
229
|
value: "returned",
|
|
230
230
|
children: [
|
|
231
231
|
"Returned (",
|
|
@@ -240,111 +240,111 @@ function j() {
|
|
|
240
240
|
["returned", "RETURNED"]
|
|
241
241
|
].map(([e, t]) => {
|
|
242
242
|
let n = t === null ? $ : $.filter((e) => e.status === t);
|
|
243
|
-
return /* @__PURE__ */
|
|
243
|
+
return /* @__PURE__ */ d(C, {
|
|
244
244
|
value: e,
|
|
245
245
|
className: "mt-4",
|
|
246
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ d(h, { children: /* @__PURE__ */ d(g, {
|
|
247
247
|
className: "p-0",
|
|
248
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ f("div", {
|
|
249
249
|
className: "overflow-x-auto",
|
|
250
250
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ f("table", {
|
|
252
252
|
className: "w-full text-sm",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ f("tr", {
|
|
254
254
|
className: "border-b bg-bg-sunken/50",
|
|
255
255
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ d("th", {
|
|
257
257
|
className: "text-left p-3 font-medium",
|
|
258
258
|
children: "Asset"
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ d("th", {
|
|
261
261
|
className: "text-left p-3 font-medium",
|
|
262
262
|
children: "Assigned To"
|
|
263
263
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ d("th", {
|
|
265
265
|
className: "text-left p-3 font-medium",
|
|
266
266
|
children: "Checked Out"
|
|
267
267
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ d("th", {
|
|
269
269
|
className: "text-left p-3 font-medium",
|
|
270
270
|
children: "Due"
|
|
271
271
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ d("th", {
|
|
273
273
|
className: "text-left p-3 font-medium",
|
|
274
274
|
children: "Returned"
|
|
275
275
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ d("th", {
|
|
277
277
|
className: "text-left p-3 font-medium",
|
|
278
278
|
children: "Status"
|
|
279
279
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ d("th", {
|
|
281
281
|
className: "text-right p-3 font-medium",
|
|
282
282
|
children: "Action"
|
|
283
283
|
})
|
|
284
284
|
]
|
|
285
|
-
}) }), /* @__PURE__ */
|
|
285
|
+
}) }), /* @__PURE__ */ d("tbody", { children: n.map((e) => /* @__PURE__ */ f("tr", {
|
|
286
286
|
className: "border-b hover:bg-bg-sunken/50",
|
|
287
287
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ f("td", {
|
|
289
289
|
className: "p-3",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ d("p", {
|
|
291
291
|
className: "font-medium",
|
|
292
292
|
children: e.assetName
|
|
293
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ d("p", {
|
|
294
294
|
className: "text-xs text-text-secondary",
|
|
295
295
|
children: e.assetId
|
|
296
296
|
})]
|
|
297
297
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ f("td", {
|
|
299
299
|
className: "p-3",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ d("p", {
|
|
301
301
|
className: "text-sm",
|
|
302
302
|
children: e.assignedTo
|
|
303
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ f("p", {
|
|
304
304
|
className: "text-xs text-text-secondary",
|
|
305
305
|
children: ["by ", e.assignedBy]
|
|
306
306
|
})]
|
|
307
307
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ d("td", {
|
|
309
309
|
className: "p-3 text-xs",
|
|
310
310
|
children: new Date(e.checkedOutAt).toLocaleDateString()
|
|
311
311
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ d("td", {
|
|
313
313
|
className: "p-3 text-xs",
|
|
314
314
|
children: e.dueAt ? new Date(e.dueAt).toLocaleDateString() : "—"
|
|
315
315
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ d("td", {
|
|
317
317
|
className: "p-3 text-xs",
|
|
318
318
|
children: e.checkedInAt ? new Date(e.checkedInAt).toLocaleDateString() : "—"
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ d("td", {
|
|
321
321
|
className: "p-3",
|
|
322
|
-
children: /* @__PURE__ */
|
|
322
|
+
children: /* @__PURE__ */ d(p, {
|
|
323
323
|
variant: k[e.status],
|
|
324
324
|
children: A[e.status]
|
|
325
325
|
})
|
|
326
326
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ d("td", {
|
|
328
328
|
className: "p-3 text-right",
|
|
329
|
-
children: e.status === "RETURNED" ? null : /* @__PURE__ */
|
|
329
|
+
children: e.status === "RETURNED" ? null : /* @__PURE__ */ f(m, {
|
|
330
330
|
size: "sm",
|
|
331
331
|
variant: "outline",
|
|
332
332
|
disabled: J,
|
|
333
333
|
onClick: () => void q({ variables: { input: { assignmentId: e.id } } }),
|
|
334
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ d(a, { className: "mr-1.5 h-3.5 w-3.5" }), "Check In"]
|
|
335
335
|
})
|
|
336
336
|
})
|
|
337
337
|
]
|
|
338
338
|
}, e.id)) })]
|
|
339
339
|
}),
|
|
340
|
-
n.length === 0 && !U && /* @__PURE__ */
|
|
340
|
+
n.length === 0 && !U && /* @__PURE__ */ d(y, {
|
|
341
341
|
illustration: j ? "empty-search" : "empty-people",
|
|
342
342
|
title: j ? "No matching records" : "No check-in / out records",
|
|
343
343
|
description: j ? "No records match your search — try a different name." : "Check an asset out to someone and the activity will appear here."
|
|
344
344
|
}),
|
|
345
|
-
U && n.length === 0 ? /* @__PURE__ */
|
|
345
|
+
U && n.length === 0 ? /* @__PURE__ */ d("div", {
|
|
346
346
|
className: "space-y-2 p-4",
|
|
347
|
-
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */
|
|
347
|
+
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ d("div", { className: "h-8 rounded-md bg-bg-sunken motion-safe:animate-vc-shimmer" }, t))
|
|
348
348
|
}) : null
|
|
349
349
|
]
|
|
350
350
|
})
|