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