@burdenoff/microfe-assethandler 2026.826.18 → 2026.828.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assethandler/AssetHandlerRoot.d.ts.map +1 -1
- package/dist/assethandler/AssetHandlerRoot.js +57 -50
- package/dist/assethandler/AssetHandlerRoot.js.map +1 -1
- package/dist/assethandler/components/RelatedRunbooksPanel.d.ts +27 -0
- package/dist/assethandler/components/RelatedRunbooksPanel.d.ts.map +1 -0
- package/dist/assethandler/components/RelatedRunbooksPanel.js +153 -0
- package/dist/assethandler/components/RelatedRunbooksPanel.js.map +1 -0
- package/dist/assethandler/components/index.d.ts +2 -0
- package/dist/assethandler/components/index.d.ts.map +1 -1
- package/dist/assethandler/components/index.js +1 -0
- package/dist/assethandler/pages/AssetsAssetCheckInOutPage.d.ts.map +1 -1
- package/dist/assethandler/pages/AssetsAssetCheckInOutPage.js +237 -211
- package/dist/assethandler/pages/AssetsAssetCheckInOutPage.js.map +1 -1
- package/dist/assethandler/pages/AssetsAssetDetailPage.d.ts.map +1 -1
- package/dist/assethandler/pages/AssetsAssetDetailPage.js +372 -367
- package/dist/assethandler/pages/AssetsAssetDetailPage.js.map +1 -1
- package/dist/assethandler/pages/ItilIncidentDetailPage.d.ts.map +1 -1
- package/dist/assethandler/pages/ItilIncidentDetailPage.js +104 -99
- package/dist/assethandler/pages/ItilIncidentDetailPage.js.map +1 -1
- package/dist/assethandler/pages/OperationsWorkOrderDetailPage.d.ts.map +1 -1
- package/dist/assethandler/pages/OperationsWorkOrderDetailPage.js +139 -134
- package/dist/assethandler/pages/OperationsWorkOrderDetailPage.js.map +1 -1
- package/dist/assethandler/pages/SamLicensesPage.d.ts.map +1 -1
- package/dist/assethandler/pages/SamLicensesPage.js +811 -227
- package/dist/assethandler/pages/SamLicensesPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,17 +4,17 @@ import { notify as n } from "../utils/toast.js";
|
|
|
4
4
|
import { TrendChart as r } from "../components/charts/TrendChart.js";
|
|
5
5
|
import { DonutChart as i } from "../components/charts/DonutChart.js";
|
|
6
6
|
import { StatTile as a } from "../components/StatTile.js";
|
|
7
|
-
import { ChartCard as
|
|
8
|
-
import { SectionHeader as
|
|
7
|
+
import { ChartCard as ee } from "../components/ChartCard.js";
|
|
8
|
+
import { SectionHeader as te } from "../components/SectionHeader.js";
|
|
9
9
|
import "../components/index.js";
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { AlertTriangle as
|
|
12
|
-
import { gql as
|
|
13
|
-
import { useMutation as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { Button as
|
|
10
|
+
import { useEffect as ne, useMemo as re, useRef as ie, useState as o } from "react";
|
|
11
|
+
import { AlertTriangle as ae, ArrowDownToLine as s, ArrowUpFromLine as c, Clock as oe, PackageCheck as l, ScanLine as u, Search as se } from "lucide-react";
|
|
12
|
+
import { gql as d } from "@apollo/client";
|
|
13
|
+
import { useApolloClient as ce, useMutation as f, useQuery as le } from "@apollo/client/react";
|
|
14
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
15
|
+
import { Button as h, GlassCard as g, IllustratedEmptyState as ue, Input as _, Label as v, PagePurpose as de, Select as fe, SelectContent as pe, SelectItem as me, SelectTrigger as he, SelectValue as ge, Tabs as _e, TabsContent as ve, TabsList as ye, TabsTrigger as y, Textarea as be } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
//#region src/assethandler/pages/AssetsAssetCheckInOutPage.tsx
|
|
17
|
-
var
|
|
17
|
+
var xe = d`
|
|
18
18
|
query AssetHandlerAssetAssignments {
|
|
19
19
|
assetAssignments {
|
|
20
20
|
id
|
|
@@ -29,137 +29,147 @@ var ye = f`
|
|
|
29
29
|
notes
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`, Se = d`
|
|
33
33
|
mutation AssetHandlerCheckOutAsset($input: CheckOutAssetInput!) {
|
|
34
34
|
checkOutAsset(input: $input) {
|
|
35
35
|
id
|
|
36
36
|
status
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`, Ce = d`
|
|
40
40
|
mutation AssetHandlerCheckInAsset($input: CheckInAssetInput!) {
|
|
41
41
|
checkInAsset(input: $input) {
|
|
42
42
|
id
|
|
43
43
|
status
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,
|
|
46
|
+
`, we = d`
|
|
47
47
|
mutation AssetHandlerCheckOutAssetByTag($input: CheckOutAssetByTagInput!) {
|
|
48
48
|
checkOutAssetByTag(input: $input) {
|
|
49
49
|
id
|
|
50
50
|
status
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
`,
|
|
53
|
+
`, Te = d`
|
|
54
54
|
mutation AssetHandlerCheckInAssetByTag($input: CheckInAssetByTagInput!) {
|
|
55
55
|
checkInAssetByTag(input: $input) {
|
|
56
56
|
id
|
|
57
57
|
status
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
`,
|
|
60
|
+
`, Ee = d`
|
|
61
|
+
query AssetHandlerAssetByTag($tagId: String!) {
|
|
62
|
+
assetByTag(tagId: $tagId) {
|
|
63
|
+
id
|
|
64
|
+
name
|
|
65
|
+
tagId
|
|
66
|
+
assetNumber
|
|
67
|
+
status
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`, b = {
|
|
61
71
|
CHECKED_OUT: "bg-status-warning-subtle text-status-warning-text",
|
|
62
72
|
RETURNED: "bg-status-success-subtle text-status-success-text",
|
|
63
73
|
OVERDUE: "bg-status-error-subtle text-status-error-text"
|
|
64
|
-
},
|
|
74
|
+
}, x = {
|
|
65
75
|
CHECKED_OUT: "Checked out",
|
|
66
76
|
RETURNED: "Returned",
|
|
67
77
|
OVERDUE: "Overdue"
|
|
68
|
-
},
|
|
78
|
+
}, S = {
|
|
69
79
|
CHECKED_OUT: "var(--color-status-warning-bg)",
|
|
70
80
|
OVERDUE: "var(--color-status-error-bg)",
|
|
71
81
|
RETURNED: "var(--color-status-success-bg)"
|
|
72
82
|
};
|
|
73
|
-
function
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",
|
|
76
|
-
children:
|
|
83
|
+
function C({ status: e }) {
|
|
84
|
+
return /* @__PURE__ */ p("span", {
|
|
85
|
+
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", b[e]),
|
|
86
|
+
children: x[e]
|
|
77
87
|
});
|
|
78
88
|
}
|
|
79
|
-
function
|
|
89
|
+
function w(e) {
|
|
80
90
|
let t = e.trim();
|
|
81
91
|
if (!t) return "?";
|
|
82
92
|
let n = t.split(/[\s@._-]+/).filter(Boolean);
|
|
83
93
|
return ((n[0]?.[0] ?? t[0]) + (n.length > 1 ? n[1][0] : "")).toUpperCase();
|
|
84
94
|
}
|
|
85
|
-
function
|
|
86
|
-
return /* @__PURE__ */
|
|
95
|
+
function T({ name: e, by: t }) {
|
|
96
|
+
return /* @__PURE__ */ m("div", {
|
|
87
97
|
className: "flex items-center gap-2.5",
|
|
88
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ p("span", {
|
|
89
99
|
"aria-hidden": "true",
|
|
90
100
|
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-xs font-semibold text-action-primary-text",
|
|
91
|
-
children:
|
|
92
|
-
}), /* @__PURE__ */
|
|
101
|
+
children: w(e)
|
|
102
|
+
}), /* @__PURE__ */ m("div", {
|
|
93
103
|
className: "min-w-0",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ p("p", {
|
|
95
105
|
className: "truncate text-sm text-text-primary",
|
|
96
106
|
children: e || "—"
|
|
97
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ m("p", {
|
|
98
108
|
className: "truncate text-xs text-text-secondary",
|
|
99
109
|
children: ["by ", t]
|
|
100
110
|
})]
|
|
101
111
|
})]
|
|
102
112
|
});
|
|
103
113
|
}
|
|
104
|
-
function
|
|
114
|
+
function E(e) {
|
|
105
115
|
let t = new Date(e);
|
|
106
116
|
if (Number.isNaN(t.getTime())) return null;
|
|
107
117
|
let n = /* @__PURE__ */ new Date(), r = new Date(n.getFullYear(), n.getMonth(), n.getDate()), i = new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
108
118
|
return Math.round((i.getTime() - r.getTime()) / 864e5);
|
|
109
119
|
}
|
|
110
|
-
function
|
|
120
|
+
function D({ dueAt: e, status: n }) {
|
|
111
121
|
if (n === "RETURNED" || !e) return null;
|
|
112
|
-
let r =
|
|
122
|
+
let r = E(e);
|
|
113
123
|
if (r === null) return null;
|
|
114
124
|
let i, a;
|
|
115
|
-
return r < 0 ? (i = `${-r}d overdue`, a = "bg-status-error-subtle text-status-error-text") : r === 0 ? (i = "Due today", a = "bg-status-warning-subtle text-status-warning-text") : r <= 3 ? (i = `Due in ${r}d`, a = "bg-status-warning-subtle text-status-warning-text") : (i = `Due in ${r}d`, a = "bg-bg-sunken text-text-secondary"), /* @__PURE__ */
|
|
125
|
+
return r < 0 ? (i = `${-r}d overdue`, a = "bg-status-error-subtle text-status-error-text") : r === 0 ? (i = "Due today", a = "bg-status-warning-subtle text-status-warning-text") : r <= 3 ? (i = `Due in ${r}d`, a = "bg-status-warning-subtle text-status-warning-text") : (i = `Due in ${r}d`, a = "bg-bg-sunken text-text-secondary"), /* @__PURE__ */ p("span", {
|
|
116
126
|
className: t("inline-flex rounded-full px-2 py-0.5 text-[11px] font-medium", a),
|
|
117
127
|
children: i
|
|
118
128
|
});
|
|
119
129
|
}
|
|
120
|
-
var
|
|
130
|
+
var O = (e) => e ? new Date(e).toLocaleDateString(void 0, {
|
|
121
131
|
month: "short",
|
|
122
132
|
day: "numeric",
|
|
123
133
|
year: "numeric"
|
|
124
134
|
}) : "—";
|
|
125
|
-
function
|
|
126
|
-
let { assets:
|
|
135
|
+
function k() {
|
|
136
|
+
let { assets: d } = e(), b = ce(), [x, w] = o(""), [E, k] = o(""), [A, j] = o(""), [M, N] = o(""), [P, F] = o(""), I = ie(null), [L, R] = o(""), [z, B] = o(!1), [V, H] = o(""), [U, De] = o(""), [W, Oe] = o(""), [ke, Ae] = o(!1), { data: je, loading: Me, refetch: G } = le(xe, { fetchPolicy: "cache-and-network" }), [Ne, { loading: Pe }] = f(Se, {
|
|
127
137
|
onCompleted: () => {
|
|
128
|
-
n.success("Asset checked out", "The assignment has been recorded."),
|
|
138
|
+
n.success("Asset checked out", "The assignment has been recorded."), k(""), j(""), N(""), F(""), G();
|
|
129
139
|
},
|
|
130
140
|
onError: (e) => n.error("Check-out failed", e.message)
|
|
131
|
-
}), [
|
|
141
|
+
}), [Fe, { loading: Ie }] = f(Ce, {
|
|
132
142
|
onCompleted: () => {
|
|
133
143
|
n.success("Asset checked in", "The asset has been returned."), G();
|
|
134
144
|
},
|
|
135
145
|
onError: (e) => n.error("Check-in failed", e.message)
|
|
136
|
-
}), [
|
|
146
|
+
}), [Le, { loading: Re }] = f(we, {
|
|
137
147
|
onCompleted: () => {
|
|
138
148
|
n.success("Asset checked out", "The assignment has been recorded."), Q(), G();
|
|
139
149
|
},
|
|
140
150
|
onError: (e) => n.error("Scan check-out failed", e.message)
|
|
141
|
-
}), [
|
|
151
|
+
}), [ze, { loading: Be }] = f(Te, {
|
|
142
152
|
onCompleted: () => {
|
|
143
153
|
n.success("Asset checked in", "The asset has been returned."), Q(), G();
|
|
144
154
|
},
|
|
145
155
|
onError: (e) => n.error("Scan check-in failed", e.message)
|
|
146
|
-
}), K =
|
|
156
|
+
}), K = re(() => je?.assetAssignments ?? [], [je]), q = K.filter((e) => e.status === "CHECKED_OUT"), J = K.filter((e) => e.status === "OVERDUE"), Y = K.filter((e) => e.status === "RETURNED"), X = K.filter((e) => x === "" || e.assetName.toLowerCase().includes(x.toLowerCase()) || e.assignedTo.toLowerCase().includes(x.toLowerCase())), Ve = [
|
|
147
157
|
{
|
|
148
158
|
name: "Checked out",
|
|
149
159
|
value: q.length,
|
|
150
|
-
color:
|
|
160
|
+
color: S.CHECKED_OUT
|
|
151
161
|
},
|
|
152
162
|
{
|
|
153
163
|
name: "Overdue",
|
|
154
164
|
value: J.length,
|
|
155
|
-
color:
|
|
165
|
+
color: S.OVERDUE
|
|
156
166
|
},
|
|
157
167
|
{
|
|
158
168
|
name: "Returned",
|
|
159
169
|
value: Y.length,
|
|
160
|
-
color:
|
|
170
|
+
color: S.RETURNED
|
|
161
171
|
}
|
|
162
|
-
], Z =
|
|
172
|
+
], Z = re(() => {
|
|
163
173
|
let e = /* @__PURE__ */ new Date(), t = Array.from({ length: 6 }, (t, n) => {
|
|
164
174
|
let r = new Date(e.getFullYear(), e.getMonth() - (5 - n), 1);
|
|
165
175
|
return {
|
|
@@ -175,155 +185,171 @@ function A() {
|
|
|
175
185
|
i !== void 0 && (t[i].checkouts += 1);
|
|
176
186
|
}
|
|
177
187
|
return t;
|
|
178
|
-
}, [K]),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
return
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
}, [K]), He = Z.some((e) => e.checkouts > 0), Ue = K.length > 0, We = (e) => K.find((t) => t.assetId === e && t.status !== "RETURNED"), Q = () => {
|
|
189
|
+
R(""), B(!1), H(""), De(""), Oe(""), I.current?.focus();
|
|
190
|
+
}, Ge = async (e) => {
|
|
191
|
+
let t = d.find((t) => t.tagId === e || t.assetTag === e || t.id === e);
|
|
192
|
+
if (t) return {
|
|
193
|
+
id: t.id,
|
|
194
|
+
name: t.name,
|
|
195
|
+
tagId: t.tagId
|
|
196
|
+
};
|
|
197
|
+
try {
|
|
198
|
+
return (await b.query({
|
|
199
|
+
query: Ee,
|
|
200
|
+
variables: { tagId: e },
|
|
201
|
+
fetchPolicy: "network-only"
|
|
202
|
+
})).data?.assetByTag ?? null;
|
|
203
|
+
} catch {
|
|
204
|
+
return null;
|
|
194
205
|
}
|
|
195
|
-
|
|
206
|
+
}, Ke = (e) => {
|
|
207
|
+
let t = We(e.id);
|
|
196
208
|
if (z) {
|
|
197
209
|
if (!V.trim()) {
|
|
198
210
|
n.warning("Assignee required", "Enter who is receiving the asset.");
|
|
199
211
|
return;
|
|
200
212
|
}
|
|
201
|
-
|
|
202
|
-
tagId:
|
|
213
|
+
Le({ variables: { input: {
|
|
214
|
+
tagId: e.tagId,
|
|
203
215
|
assignedTo: V.trim(),
|
|
204
216
|
dueAt: U ? new Date(U).toISOString() : null,
|
|
205
217
|
notes: W.trim() || null
|
|
206
218
|
} } });
|
|
207
219
|
return;
|
|
208
220
|
}
|
|
209
|
-
if (
|
|
210
|
-
|
|
211
|
-
tagId:
|
|
221
|
+
if (t) {
|
|
222
|
+
ze({ variables: { input: {
|
|
223
|
+
tagId: e.tagId,
|
|
212
224
|
notes: W.trim() || null
|
|
213
225
|
} } });
|
|
214
226
|
return;
|
|
215
227
|
}
|
|
216
|
-
B(!0), n.info("Ready to check out", `${
|
|
228
|
+
B(!0), n.info("Ready to check out", `${e.name} is available. Add assignee details and scan again.`);
|
|
229
|
+
}, qe = async (e) => {
|
|
230
|
+
e.preventDefault();
|
|
231
|
+
let t = L.trim();
|
|
232
|
+
if (!t) {
|
|
233
|
+
n.warning("Enter a tag", "Scan or type the asset tag to continue.");
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
Ae(!0);
|
|
237
|
+
let r = await Ge(t);
|
|
238
|
+
if (Ae(!1), !r) {
|
|
239
|
+
n.error("Unknown tag", `No asset matched "${t}".`);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
Ke(r);
|
|
217
243
|
};
|
|
218
|
-
|
|
244
|
+
ne(() => {
|
|
219
245
|
let e = (e) => {
|
|
220
246
|
e.key === "/" && !["INPUT", "TEXTAREA"].includes(e.target?.tagName) && (e.preventDefault(), I.current?.focus());
|
|
221
247
|
};
|
|
222
248
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
223
249
|
}, []);
|
|
224
|
-
let
|
|
225
|
-
if (e.preventDefault(), !
|
|
250
|
+
let Je = (e) => {
|
|
251
|
+
if (e.preventDefault(), !E || !A.trim()) {
|
|
226
252
|
n.warning("Missing details", "Choose an asset and who is receiving it.");
|
|
227
253
|
return;
|
|
228
254
|
}
|
|
229
|
-
|
|
230
|
-
assetId:
|
|
255
|
+
Ne({ variables: { input: {
|
|
256
|
+
assetId: E,
|
|
231
257
|
assignedTo: A.trim(),
|
|
232
258
|
dueAt: M ? new Date(M).toISOString() : null,
|
|
233
259
|
notes: P.trim() || null
|
|
234
260
|
} } });
|
|
235
|
-
}, $ = (e) => e.status === "RETURNED" ? null : /* @__PURE__ */ h
|
|
261
|
+
}, $ = (e) => e.status === "RETURNED" ? null : /* @__PURE__ */ m(h, {
|
|
236
262
|
size: "sm",
|
|
237
263
|
variant: "outline",
|
|
238
|
-
disabled:
|
|
239
|
-
onClick: () => void
|
|
240
|
-
children: [/* @__PURE__ */
|
|
241
|
-
}),
|
|
264
|
+
disabled: Ie,
|
|
265
|
+
onClick: () => void Fe({ variables: { input: { assignmentId: e.id } } }),
|
|
266
|
+
children: [/* @__PURE__ */ p(s, { className: "mr-1.5 h-3.5 w-3.5" }), "Check In"]
|
|
267
|
+
}), Ye = (e) => /* @__PURE__ */ m(g, {
|
|
242
268
|
treatment: "glass",
|
|
243
269
|
className: "overflow-hidden border-border-seam",
|
|
244
270
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ p("div", {
|
|
246
272
|
className: "hidden overflow-x-auto md:block",
|
|
247
|
-
children: /* @__PURE__ */
|
|
273
|
+
children: /* @__PURE__ */ m("table", {
|
|
248
274
|
className: "w-full text-sm",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", {
|
|
250
276
|
className: "border-b border-border-seam bg-bg-sunken/40",
|
|
251
277
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ p("th", {
|
|
253
279
|
className: "p-3 text-left font-medium text-text-secondary",
|
|
254
280
|
children: "Asset"
|
|
255
281
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ p("th", {
|
|
257
283
|
className: "p-3 text-left font-medium text-text-secondary",
|
|
258
284
|
children: "Assigned to"
|
|
259
285
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ p("th", {
|
|
261
287
|
className: "p-3 text-left font-medium text-text-secondary",
|
|
262
288
|
children: "Checked out"
|
|
263
289
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ p("th", {
|
|
265
291
|
className: "p-3 text-left font-medium text-text-secondary",
|
|
266
292
|
children: "Due"
|
|
267
293
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ p("th", {
|
|
269
295
|
className: "p-3 text-left font-medium text-text-secondary",
|
|
270
296
|
children: "Returned"
|
|
271
297
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ p("th", {
|
|
273
299
|
className: "p-3 text-left font-medium text-text-secondary",
|
|
274
300
|
children: "Status"
|
|
275
301
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ p("th", {
|
|
277
303
|
className: "p-3 text-right font-medium text-text-secondary",
|
|
278
304
|
children: "Action"
|
|
279
305
|
})
|
|
280
306
|
]
|
|
281
|
-
}) }), /* @__PURE__ */
|
|
307
|
+
}) }), /* @__PURE__ */ p("tbody", { children: e.map((e) => /* @__PURE__ */ m("tr", {
|
|
282
308
|
className: t("border-b border-border-seam/70 transition-colors", e.status === "OVERDUE" ? "border-l-2 border-l-status-error-text bg-status-error-subtle/50 hover:bg-status-error-subtle" : "hover:bg-bg-sunken/50"),
|
|
283
309
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ m("td", {
|
|
285
311
|
className: "p-3",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ p("p", {
|
|
287
313
|
className: "font-medium text-text-primary",
|
|
288
314
|
children: e.assetName
|
|
289
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ p("p", {
|
|
290
316
|
className: "font-mono text-xs text-text-secondary",
|
|
291
317
|
children: e.assetId
|
|
292
318
|
})]
|
|
293
319
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ p("td", {
|
|
295
321
|
className: "p-3",
|
|
296
|
-
children: /* @__PURE__ */
|
|
322
|
+
children: /* @__PURE__ */ p(T, {
|
|
297
323
|
name: e.assignedTo,
|
|
298
324
|
by: e.assignedBy
|
|
299
325
|
})
|
|
300
326
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ p("td", {
|
|
302
328
|
className: "p-3 text-xs text-text-secondary",
|
|
303
|
-
children:
|
|
329
|
+
children: O(e.checkedOutAt)
|
|
304
330
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ p("td", {
|
|
306
332
|
className: "p-3",
|
|
307
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ m("div", {
|
|
308
334
|
className: "flex flex-col items-start gap-1",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ p("span", {
|
|
310
336
|
className: "text-xs text-text-secondary",
|
|
311
|
-
children:
|
|
312
|
-
}), /* @__PURE__ */
|
|
337
|
+
children: O(e.dueAt)
|
|
338
|
+
}), /* @__PURE__ */ p(D, {
|
|
313
339
|
dueAt: e.dueAt,
|
|
314
340
|
status: e.status
|
|
315
341
|
})]
|
|
316
342
|
})
|
|
317
343
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ p("td", {
|
|
319
345
|
className: "p-3 text-xs text-text-secondary",
|
|
320
|
-
children:
|
|
346
|
+
children: O(e.checkedInAt)
|
|
321
347
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ p("td", {
|
|
323
349
|
className: "p-3",
|
|
324
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ p(C, { status: e.status })
|
|
325
351
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ p("td", {
|
|
327
353
|
className: "p-3 text-right",
|
|
328
354
|
children: $(e)
|
|
329
355
|
})
|
|
@@ -331,118 +357,118 @@ function A() {
|
|
|
331
357
|
}, e.id)) })]
|
|
332
358
|
})
|
|
333
359
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ p("div", {
|
|
335
361
|
className: "divide-y divide-border-seam md:hidden",
|
|
336
362
|
children: e.map((e) => {
|
|
337
363
|
let n = e.status === "OVERDUE", r = $(e);
|
|
338
|
-
return /* @__PURE__ */
|
|
364
|
+
return /* @__PURE__ */ m("div", {
|
|
339
365
|
className: t("space-y-3 p-4", n && "border-l-2 border-l-status-error-text bg-status-error-subtle/40"),
|
|
340
366
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ m("div", {
|
|
342
368
|
className: "flex items-start justify-between gap-3",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ m("div", {
|
|
344
370
|
className: "min-w-0",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ p("p", {
|
|
346
372
|
className: "truncate font-medium text-text-primary",
|
|
347
373
|
children: e.assetName
|
|
348
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ p("p", {
|
|
349
375
|
className: "font-mono text-xs text-text-secondary",
|
|
350
376
|
children: e.assetId
|
|
351
377
|
})]
|
|
352
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ p(C, { status: e.status })]
|
|
353
379
|
}),
|
|
354
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ p(T, {
|
|
355
381
|
name: e.assignedTo,
|
|
356
382
|
by: e.assignedBy
|
|
357
383
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ m("div", {
|
|
359
385
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
|
|
360
386
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ m("span", { children: ["Out ", O(e.checkedOutAt)] }),
|
|
388
|
+
/* @__PURE__ */ m("span", { children: ["Due ", O(e.dueAt)] }),
|
|
389
|
+
/* @__PURE__ */ p(D, {
|
|
364
390
|
dueAt: e.dueAt,
|
|
365
391
|
status: e.status
|
|
366
392
|
})
|
|
367
393
|
]
|
|
368
394
|
}),
|
|
369
|
-
r ? /* @__PURE__ */
|
|
395
|
+
r ? /* @__PURE__ */ p("div", { children: r }) : null
|
|
370
396
|
]
|
|
371
397
|
}, e.id);
|
|
372
398
|
})
|
|
373
399
|
}),
|
|
374
|
-
e.length === 0 && !
|
|
400
|
+
e.length === 0 && !Me && /* @__PURE__ */ p(ue, {
|
|
375
401
|
illustration: x ? "empty-search" : "empty-people",
|
|
376
402
|
title: x ? "No matching records" : "No check-in / out records",
|
|
377
403
|
description: x ? "No records match your search — try a different name." : "Check an asset out to someone and the activity will appear here."
|
|
378
404
|
}),
|
|
379
|
-
|
|
405
|
+
Me && e.length === 0 ? /* @__PURE__ */ p("div", {
|
|
380
406
|
className: "space-y-2 p-4",
|
|
381
|
-
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */
|
|
407
|
+
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ p("div", { className: "h-10 rounded-md bg-bg-sunken motion-safe:animate-vc-shimmer" }, t))
|
|
382
408
|
}) : null
|
|
383
409
|
]
|
|
384
410
|
});
|
|
385
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ m("div", {
|
|
386
412
|
className: "space-y-6 p-4 sm:p-6",
|
|
387
413
|
children: [
|
|
388
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ p(te, {
|
|
389
415
|
hero: !0,
|
|
390
|
-
icon:
|
|
416
|
+
icon: l,
|
|
391
417
|
title: "Asset Check-In / Check-Out",
|
|
392
418
|
description: "Manage asset assignments and returns"
|
|
393
419
|
}),
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ p(de, { 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." }),
|
|
421
|
+
/* @__PURE__ */ m("div", {
|
|
396
422
|
className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
397
423
|
children: [
|
|
398
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ p(a, {
|
|
399
425
|
label: "Active checkouts",
|
|
400
426
|
value: q.length,
|
|
401
|
-
icon:
|
|
427
|
+
icon: c,
|
|
402
428
|
hero: !0
|
|
403
429
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ p(a, {
|
|
405
431
|
label: "Overdue",
|
|
406
432
|
value: J.length,
|
|
407
|
-
icon:
|
|
433
|
+
icon: ae,
|
|
408
434
|
delta: J.length > 0 ? "chase now" : void 0,
|
|
409
435
|
deltaTone: "negative",
|
|
410
436
|
deltaDirection: "up"
|
|
411
437
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ p(a, {
|
|
413
439
|
label: "Returned",
|
|
414
440
|
value: Y.length,
|
|
415
|
-
icon:
|
|
441
|
+
icon: s
|
|
416
442
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ p(a, {
|
|
418
444
|
label: "Total records",
|
|
419
445
|
value: K.length,
|
|
420
|
-
icon:
|
|
446
|
+
icon: oe
|
|
421
447
|
})
|
|
422
448
|
]
|
|
423
449
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ m("div", {
|
|
425
451
|
className: "grid gap-6 xl:grid-cols-[minmax(0,1fr)_340px]",
|
|
426
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ m("div", {
|
|
427
453
|
className: "min-w-0 space-y-6",
|
|
428
454
|
children: [
|
|
429
|
-
|
|
455
|
+
Ue && /* @__PURE__ */ m("div", {
|
|
430
456
|
className: "grid gap-4 lg:grid-cols-2",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ p(ee, {
|
|
432
458
|
title: "Custody mix",
|
|
433
459
|
subtitle: "Where every record stands right now",
|
|
434
|
-
icon:
|
|
435
|
-
children: /* @__PURE__ */
|
|
436
|
-
data:
|
|
460
|
+
icon: l,
|
|
461
|
+
children: /* @__PURE__ */ p(i, {
|
|
462
|
+
data: Ve,
|
|
437
463
|
centerLabel: "Records",
|
|
438
464
|
centerValue: K.length,
|
|
439
465
|
ariaLabel: "Custody status mix"
|
|
440
466
|
})
|
|
441
|
-
}), /* @__PURE__ */
|
|
467
|
+
}), /* @__PURE__ */ p(ee, {
|
|
442
468
|
title: "Checkouts over time",
|
|
443
469
|
subtitle: "Custody activity, last 6 months",
|
|
444
|
-
icon:
|
|
445
|
-
children:
|
|
470
|
+
icon: c,
|
|
471
|
+
children: He ? /* @__PURE__ */ p(r, {
|
|
446
472
|
data: Z,
|
|
447
473
|
xKey: "label",
|
|
448
474
|
series: [{
|
|
@@ -451,38 +477,38 @@ function A() {
|
|
|
451
477
|
}],
|
|
452
478
|
height: 220,
|
|
453
479
|
ariaLabel: "Checkouts per month"
|
|
454
|
-
}) : /* @__PURE__ */
|
|
480
|
+
}) : /* @__PURE__ */ p("div", {
|
|
455
481
|
className: "flex h-[220px] items-center justify-center text-sm text-text-secondary",
|
|
456
482
|
children: "Not enough dated history yet."
|
|
457
483
|
})
|
|
458
484
|
})]
|
|
459
485
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ p(g, {
|
|
461
487
|
treatment: "glass",
|
|
462
488
|
className: "border-border-seam",
|
|
463
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ m("form", {
|
|
464
490
|
className: "space-y-4 p-5",
|
|
465
|
-
onSubmit:
|
|
491
|
+
onSubmit: qe,
|
|
466
492
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ m("div", {
|
|
468
494
|
className: "flex items-center gap-2",
|
|
469
495
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ p(u, { className: "h-4 w-4 text-action-primary-text" }),
|
|
497
|
+
/* @__PURE__ */ p("h2", {
|
|
472
498
|
className: "text-base font-semibold text-text-primary",
|
|
473
499
|
children: "Scan asset tag"
|
|
474
500
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ p("span", {
|
|
476
502
|
className: "ml-auto text-xs text-text-secondary",
|
|
477
503
|
children: "Press / to focus"
|
|
478
504
|
})
|
|
479
505
|
]
|
|
480
506
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ m("div", {
|
|
482
508
|
className: "flex flex-col gap-4 sm:flex-row sm:items-end",
|
|
483
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ m("div", {
|
|
484
510
|
className: "relative min-w-0 flex-1",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ p(u, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ p(_, {
|
|
486
512
|
ref: I,
|
|
487
513
|
placeholder: "Scan or type asset tag…",
|
|
488
514
|
value: L,
|
|
@@ -490,81 +516,81 @@ function A() {
|
|
|
490
516
|
className: "pl-9",
|
|
491
517
|
autoFocus: !0
|
|
492
518
|
})]
|
|
493
|
-
}), /* @__PURE__ */ h
|
|
519
|
+
}), /* @__PURE__ */ m(h, {
|
|
494
520
|
type: "submit",
|
|
495
|
-
disabled:
|
|
521
|
+
disabled: Re || Be || ke,
|
|
496
522
|
className: "w-full sm:w-auto",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ p(u, { className: "mr-2 h-4 w-4" }), Re || Be || ke ? "Processing…" : z ? "Check Out" : "Scan"]
|
|
498
524
|
})]
|
|
499
525
|
}),
|
|
500
|
-
z && /* @__PURE__ */
|
|
526
|
+
z && /* @__PURE__ */ m("div", {
|
|
501
527
|
className: "grid gap-4 sm:grid-cols-3",
|
|
502
528
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ m("div", {
|
|
504
530
|
className: "space-y-1.5",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ p(v, {
|
|
506
532
|
htmlFor: "scan-assignee",
|
|
507
533
|
children: "Assign to"
|
|
508
|
-
}), /* @__PURE__ */
|
|
534
|
+
}), /* @__PURE__ */ p(_, {
|
|
509
535
|
id: "scan-assignee",
|
|
510
536
|
placeholder: "Name or email",
|
|
511
537
|
value: V,
|
|
512
538
|
onChange: (e) => H(e.target.value)
|
|
513
539
|
})]
|
|
514
540
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ m("div", {
|
|
516
542
|
className: "space-y-1.5",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ p(v, {
|
|
518
544
|
htmlFor: "scan-due",
|
|
519
545
|
children: "Due date"
|
|
520
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ p(_, {
|
|
521
547
|
id: "scan-due",
|
|
522
548
|
type: "date",
|
|
523
549
|
value: U,
|
|
524
|
-
onChange: (e) =>
|
|
550
|
+
onChange: (e) => De(e.target.value)
|
|
525
551
|
})]
|
|
526
552
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ m("div", {
|
|
528
554
|
className: "space-y-1.5",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
555
|
+
children: [/* @__PURE__ */ p(v, {
|
|
530
556
|
htmlFor: "scan-notes",
|
|
531
557
|
children: "Notes"
|
|
532
|
-
}), /* @__PURE__ */
|
|
558
|
+
}), /* @__PURE__ */ p(_, {
|
|
533
559
|
id: "scan-notes",
|
|
534
560
|
placeholder: "Optional notes",
|
|
535
561
|
value: W,
|
|
536
|
-
onChange: (e) =>
|
|
562
|
+
onChange: (e) => Oe(e.target.value)
|
|
537
563
|
})]
|
|
538
564
|
})
|
|
539
565
|
]
|
|
540
566
|
}),
|
|
541
|
-
z && /* @__PURE__ */
|
|
567
|
+
z && /* @__PURE__ */ m("div", {
|
|
542
568
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
569
|
+
children: [/* @__PURE__ */ p("button", {
|
|
544
570
|
type: "button",
|
|
545
571
|
className: "text-action-primary-text hover:underline",
|
|
546
572
|
onClick: Q,
|
|
547
573
|
children: "Cancel"
|
|
548
|
-
}), /* @__PURE__ */
|
|
574
|
+
}), /* @__PURE__ */ p("span", { children: "to start over." })]
|
|
549
575
|
})
|
|
550
576
|
]
|
|
551
577
|
})
|
|
552
578
|
}),
|
|
553
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ m("div", {
|
|
554
580
|
className: "relative max-w-md",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
581
|
+
children: [/* @__PURE__ */ p(se, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ p(_, {
|
|
556
582
|
placeholder: "Search by asset or person…",
|
|
557
583
|
value: x,
|
|
558
|
-
onChange: (e) =>
|
|
584
|
+
onChange: (e) => w(e.target.value),
|
|
559
585
|
className: "pl-9"
|
|
560
586
|
})]
|
|
561
587
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ m(_e, {
|
|
563
589
|
defaultValue: "all",
|
|
564
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ m(ye, {
|
|
565
591
|
className: "max-w-full justify-start overflow-x-auto",
|
|
566
592
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ m(y, {
|
|
568
594
|
value: "all",
|
|
569
595
|
children: [
|
|
570
596
|
"All (",
|
|
@@ -572,7 +598,7 @@ function A() {
|
|
|
572
598
|
")"
|
|
573
599
|
]
|
|
574
600
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ m(y, {
|
|
576
602
|
value: "active",
|
|
577
603
|
children: [
|
|
578
604
|
"Active (",
|
|
@@ -580,7 +606,7 @@ function A() {
|
|
|
580
606
|
")"
|
|
581
607
|
]
|
|
582
608
|
}),
|
|
583
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ m(y, {
|
|
584
610
|
value: "overdue",
|
|
585
611
|
children: [
|
|
586
612
|
"Overdue (",
|
|
@@ -588,7 +614,7 @@ function A() {
|
|
|
588
614
|
")"
|
|
589
615
|
]
|
|
590
616
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ m(y, {
|
|
592
618
|
value: "returned",
|
|
593
619
|
children: [
|
|
594
620
|
"Returned (",
|
|
@@ -602,42 +628,42 @@ function A() {
|
|
|
602
628
|
["active", "CHECKED_OUT"],
|
|
603
629
|
["overdue", "OVERDUE"],
|
|
604
630
|
["returned", "RETURNED"]
|
|
605
|
-
].map(([e, t]) => /* @__PURE__ */
|
|
631
|
+
].map(([e, t]) => /* @__PURE__ */ p(ve, {
|
|
606
632
|
value: e,
|
|
607
633
|
className: "mt-4",
|
|
608
|
-
children:
|
|
634
|
+
children: Ye(t === null ? X : X.filter((e) => e.status === t))
|
|
609
635
|
}, e))]
|
|
610
636
|
})
|
|
611
637
|
]
|
|
612
|
-
}), /* @__PURE__ */
|
|
638
|
+
}), /* @__PURE__ */ p("aside", {
|
|
613
639
|
className: "xl:sticky xl:top-4 xl:h-fit",
|
|
614
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ p(g, {
|
|
615
641
|
treatment: "glass",
|
|
616
642
|
className: "border-border-seam",
|
|
617
|
-
children: /* @__PURE__ */
|
|
643
|
+
children: /* @__PURE__ */ m("form", {
|
|
618
644
|
className: "space-y-4 p-5",
|
|
619
|
-
onSubmit:
|
|
645
|
+
onSubmit: Je,
|
|
620
646
|
children: [
|
|
621
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ m("div", {
|
|
622
648
|
className: "flex items-center gap-2",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ p(c, { className: "h-4 w-4 text-action-primary-text" }), /* @__PURE__ */ p("h2", {
|
|
624
650
|
className: "text-base font-semibold text-text-primary",
|
|
625
651
|
children: "Check out an asset"
|
|
626
652
|
})]
|
|
627
653
|
}),
|
|
628
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ m("div", {
|
|
629
655
|
className: "space-y-1.5",
|
|
630
|
-
children: [/* @__PURE__ */
|
|
656
|
+
children: [/* @__PURE__ */ p(v, {
|
|
631
657
|
htmlFor: "checkout-asset",
|
|
632
658
|
children: "Asset"
|
|
633
|
-
}), /* @__PURE__ */
|
|
634
|
-
value:
|
|
635
|
-
onValueChange:
|
|
636
|
-
children: [/* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ m(fe, {
|
|
660
|
+
value: E,
|
|
661
|
+
onValueChange: k,
|
|
662
|
+
children: [/* @__PURE__ */ p(he, {
|
|
637
663
|
id: "checkout-asset",
|
|
638
664
|
className: "w-full",
|
|
639
|
-
children: /* @__PURE__ */
|
|
640
|
-
}), /* @__PURE__ */
|
|
665
|
+
children: /* @__PURE__ */ p(ge, { placeholder: "Select an asset…" })
|
|
666
|
+
}), /* @__PURE__ */ p(pe, { children: d.map((e) => /* @__PURE__ */ m(me, {
|
|
641
667
|
value: e.id,
|
|
642
668
|
children: [
|
|
643
669
|
e.name,
|
|
@@ -648,36 +674,36 @@ function A() {
|
|
|
648
674
|
}, e.id)) })]
|
|
649
675
|
})]
|
|
650
676
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ m("div", {
|
|
652
678
|
className: "space-y-1.5",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
679
|
+
children: [/* @__PURE__ */ p(v, {
|
|
654
680
|
htmlFor: "checkout-assignee",
|
|
655
681
|
children: "Assign to"
|
|
656
|
-
}), /* @__PURE__ */
|
|
682
|
+
}), /* @__PURE__ */ p(_, {
|
|
657
683
|
id: "checkout-assignee",
|
|
658
684
|
placeholder: "Name or email",
|
|
659
685
|
value: A,
|
|
660
686
|
onChange: (e) => j(e.target.value)
|
|
661
687
|
})]
|
|
662
688
|
}),
|
|
663
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ m("div", {
|
|
664
690
|
className: "space-y-1.5",
|
|
665
|
-
children: [/* @__PURE__ */
|
|
691
|
+
children: [/* @__PURE__ */ p(v, {
|
|
666
692
|
htmlFor: "checkout-due",
|
|
667
693
|
children: "Due date"
|
|
668
|
-
}), /* @__PURE__ */
|
|
694
|
+
}), /* @__PURE__ */ p(_, {
|
|
669
695
|
id: "checkout-due",
|
|
670
696
|
type: "date",
|
|
671
697
|
value: M,
|
|
672
698
|
onChange: (e) => N(e.target.value)
|
|
673
699
|
})]
|
|
674
700
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ m("div", {
|
|
676
702
|
className: "space-y-1.5",
|
|
677
|
-
children: [/* @__PURE__ */
|
|
703
|
+
children: [/* @__PURE__ */ p(v, {
|
|
678
704
|
htmlFor: "checkout-notes",
|
|
679
705
|
children: "Notes"
|
|
680
|
-
}), /* @__PURE__ */
|
|
706
|
+
}), /* @__PURE__ */ p(be, {
|
|
681
707
|
id: "checkout-notes",
|
|
682
708
|
placeholder: "Optional context for this checkout…",
|
|
683
709
|
rows: 3,
|
|
@@ -685,11 +711,11 @@ function A() {
|
|
|
685
711
|
onChange: (e) => F(e.target.value)
|
|
686
712
|
})]
|
|
687
713
|
}),
|
|
688
|
-
/* @__PURE__ */ h
|
|
714
|
+
/* @__PURE__ */ m(h, {
|
|
689
715
|
type: "submit",
|
|
690
716
|
className: "w-full",
|
|
691
|
-
disabled:
|
|
692
|
-
children: [/* @__PURE__ */
|
|
717
|
+
disabled: Pe,
|
|
718
|
+
children: [/* @__PURE__ */ p(c, { className: "mr-2 h-4 w-4" }), Pe ? "Checking out…" : "Check Out Asset"]
|
|
693
719
|
})
|
|
694
720
|
]
|
|
695
721
|
})
|
|
@@ -700,6 +726,6 @@ function A() {
|
|
|
700
726
|
});
|
|
701
727
|
}
|
|
702
728
|
//#endregion
|
|
703
|
-
export {
|
|
729
|
+
export { k as AssetsAssetCheckInOutPage };
|
|
704
730
|
|
|
705
731
|
//# sourceMappingURL=AssetsAssetCheckInOutPage.js.map
|