call table update
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user