call row fix
This commit is contained in:
@@ -67,20 +67,9 @@ export function CallRow({ call, systemName, isAdmin }: Props) {
|
|||||||
className={`border-b border-gray-800 font-mono text-sm ${hasDetails ? "cursor-pointer hover:bg-gray-900/50" : "hover:bg-gray-900/30"}`}
|
className={`border-b border-gray-800 font-mono text-sm ${hasDetails ? "cursor-pointer hover:bg-gray-900/50" : "hover:bg-gray-900/30"}`}
|
||||||
onClick={() => hasDetails && setExpanded((v) => !v)}
|
onClick={() => hasDetails && setExpanded((v) => !v)}
|
||||||
>
|
>
|
||||||
<td className="px-4 py-2 text-gray-400 text-xs">
|
<td className="px-4 py-2 text-gray-400 text-xs whitespace-nowrap">
|
||||||
{(() => {
|
<span className="text-gray-600">{new Date(call.started_at).toLocaleDateString([], { month: "short", day: "numeric" })} </span>
|
||||||
const d = new Date(call.started_at);
|
{new Date(call.started_at).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}
|
||||||
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>
|
||||||
<td className="px-4 py-2 text-gray-300">
|
<td className="px-4 py-2 text-gray-300">
|
||||||
<span>{call.talkgroup_name || call.talkgroup_id || "—"}</span>
|
<span>{call.talkgroup_name || call.talkgroup_id || "—"}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user