call table update

This commit is contained in:
Logan
2026-05-23 13:05:53 -04:00
parent 9d73fc52fa
commit fc993fdfe6
2 changed files with 15 additions and 3 deletions
+13 -1
View File
@@ -68,7 +68,19 @@ export function CallRow({ call, systemName, isAdmin }: Props) {
onClick={() => hasDetails && setExpanded((v) => !v)}
>
<td className="px-4 py-2 text-gray-400 text-xs">
{new Date(call.started_at).toLocaleTimeString()}
{(() => {
const d = new Date(call.started_at);
const today = new Date();
const isToday = d.toDateString() === today.toDateString();
return isToday ? (
d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
) : (
<span>
<span className="text-gray-600">{d.toLocaleDateString([], { month: "short", day: "numeric" })} </span>
{d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}
</span>
);
})()}
</td>
<td className="px-4 py-2 text-gray-300">
<span>{call.talkgroup_name || call.talkgroup_id || "—"}</span>