UI Updates

This commit is contained in:
Logan
2026-04-19 15:22:29 -04:00
parent 03212fca51
commit 0df53df92e
7 changed files with 181 additions and 13 deletions
+4 -2
View File
@@ -4,11 +4,13 @@ import { useState } from "react";
import { useCalls } from "@/lib/useCalls";
import { useSystems } from "@/lib/useSystems";
import { CallRow } from "@/components/CallRow";
import { useAuth } from "@/components/AuthProvider";
export default function CallsPage() {
const [limitCount, setLimitCount] = useState(100);
const { calls, loading } = useCalls(limitCount);
const { systems } = useSystems();
const { isAdmin } = useAuth();
const systemMap = Object.fromEntries(systems.map((s) => [s.system_id, s]));
const active = calls.filter((c) => c.status === "active");
@@ -41,7 +43,7 @@ export default function CallsPage() {
</thead>
<tbody>
{active.map((c) => (
<CallRow key={c.call_id} call={c} systemName={systemMap[c.system_id ?? ""]?.name} />
<CallRow key={c.call_id} call={c} systemName={systemMap[c.system_id ?? ""]?.name} isAdmin={isAdmin} />
))}
</tbody>
</table>
@@ -73,7 +75,7 @@ export default function CallsPage() {
</thead>
<tbody>
{ended.map((c) => (
<CallRow key={c.call_id} call={c} systemName={systemMap[c.system_id ?? ""]?.name} />
<CallRow key={c.call_id} call={c} systemName={systemMap[c.system_id ?? ""]?.name} isAdmin={isAdmin} />
))}
</tbody>
</table>