Update AgentDashboard.tsx
This commit is contained in:
@@ -1412,7 +1412,7 @@ export const AgentDashboard: React.FC<AgentDashboardProps> = ({
|
||||
{ticket.attachments.length}
|
||||
</div>
|
||||
)}
|
||||
<span className="text-[10px] bg-gray-100 text-gray-500 px-1 rounded">{ticket.createdAt.split('T')[0]}</span>
|
||||
<span className="text-[10px] bg-gray-100 text-gray-500 px-1 rounded">{(ticket.createdAt || '').split('T')[0]}</span>
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
@@ -1483,7 +1483,7 @@ export const AgentDashboard: React.FC<AgentDashboardProps> = ({
|
||||
) : (
|
||||
selectedTicket.messages.map(m => (
|
||||
<div key={m.id} className={`p-3 rounded-lg max-w-[80%] ${m.role === 'assistant' ? 'ml-auto bg-brand-50 border border-brand-100' : 'bg-white border border-gray-200'}`}>
|
||||
<p className="text-xs text-gray-500 mb-1 font-semibold">{m.role === 'assistant' ? 'Agente' : 'Cliente'} <span className="font-normal opacity-70 ml-2">{m.timestamp.split('T')[1].substring(0,5)}</span></p>
|
||||
<p className="text-xs text-gray-500 mb-1 font-semibold">{m.role === 'assistant' ? 'Agente' : 'Cliente'} <span className="font-normal opacity-70 ml-2">{(m.timestamp || '').split(/[T ]/)[1]?.substring(0, 5) || ''}</span></p>
|
||||
<p className="text-sm text-gray-800">{m.content}</p>
|
||||
</div>
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user