@propriety/court-calendar 1.0.97 → 1.0.98
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/index.mjs
CHANGED
|
@@ -14452,16 +14452,22 @@ function ay({
|
|
|
14452
14452
|
}) {
|
|
14453
14453
|
const [e, n] = be(null), [r, f] = be(!1), { apiKey: u, allUsers: d, allHearingOfficers: l } = Yt();
|
|
14454
14454
|
function v(a, X) {
|
|
14455
|
-
if (X === null) return "—";
|
|
14456
|
-
const y = Number(X);
|
|
14457
|
-
if (!Number.isInteger(y) || isNaN(y)) return X;
|
|
14455
|
+
if (X === null || X.trim() === "") return "—";
|
|
14458
14456
|
if (a === "FirstChair" || a === "SecondChair") {
|
|
14459
|
-
const
|
|
14460
|
-
|
|
14457
|
+
const y = Number(X);
|
|
14458
|
+
if (Number.isInteger(y) && y > 0) {
|
|
14459
|
+
const z = d[y];
|
|
14460
|
+
return z ? `${z.UserFirstName} ${z.UserLastName}` : X;
|
|
14461
|
+
}
|
|
14462
|
+
return "—";
|
|
14461
14463
|
}
|
|
14462
14464
|
if (a === "HearingOfficer") {
|
|
14463
|
-
const
|
|
14464
|
-
|
|
14465
|
+
const y = Number(X);
|
|
14466
|
+
if (Number.isInteger(y) && y > 0) {
|
|
14467
|
+
const z = l[y];
|
|
14468
|
+
return z ? z.OfficerName : X;
|
|
14469
|
+
}
|
|
14470
|
+
return "—";
|
|
14465
14471
|
}
|
|
14466
14472
|
return X;
|
|
14467
14473
|
}
|
package/package.json
CHANGED
|
@@ -66,16 +66,22 @@ export default function LogViewer({
|
|
|
66
66
|
const { apiKey, allUsers, allHearingOfficers } = useReferenceData();
|
|
67
67
|
|
|
68
68
|
function resolveValue(field: string, value: string | null): string {
|
|
69
|
-
if (value === null) return "—";
|
|
70
|
-
const id = Number(value);
|
|
71
|
-
if (!Number.isInteger(id) || isNaN(id)) return value;
|
|
69
|
+
if (value === null || value.trim() === "") return "—";
|
|
72
70
|
if (field === "FirstChair" || field === "SecondChair") {
|
|
73
|
-
const
|
|
74
|
-
|
|
71
|
+
const id = Number(value);
|
|
72
|
+
if (Number.isInteger(id) && id > 0) {
|
|
73
|
+
const u = allUsers[id];
|
|
74
|
+
return u ? `${u.UserFirstName} ${u.UserLastName}` : value;
|
|
75
|
+
}
|
|
76
|
+
return "—";
|
|
75
77
|
}
|
|
76
78
|
if (field === "HearingOfficer") {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
+
const id = Number(value);
|
|
80
|
+
if (Number.isInteger(id) && id > 0) {
|
|
81
|
+
const ho = allHearingOfficers[id];
|
|
82
|
+
return ho ? ho.OfficerName : value;
|
|
83
|
+
}
|
|
84
|
+
return "—";
|
|
79
85
|
}
|
|
80
86
|
return value;
|
|
81
87
|
}
|