fix
This commit is contained in:
@@ -24,7 +24,9 @@ function fmtSize(bytes) {
|
||||
|
||||
function initials(name) {
|
||||
if (!name) return '?';
|
||||
return name.split(' ').map(w => w[0]).join('').toUpperCase().slice(0, 2);
|
||||
// Si c'est un email, prendre les 2 premières lettres avant le @
|
||||
if (name.includes('@')) return name.split('@')[0].slice(0, 2).toUpperCase();
|
||||
return name.split(' ').filter(Boolean).map(w => w[0]).join('').toUpperCase().slice(0, 2);
|
||||
}
|
||||
|
||||
// ── Avatar lettres ─────────────────────────────────────────────────────────
|
||||
@@ -927,7 +929,7 @@ export default function Communication() {
|
||||
className={`comm-list-row${selectedTicket === t.id ? ' selected' : ''}`}
|
||||
onClick={() => openTicket(t.id)}
|
||||
>
|
||||
<UserAvatar name={t.user_name ?? user?.name} size={38} />
|
||||
<UserAvatar name={t.user_name ?? t.user_email ?? user?.displayName ?? user?.email} size={38} />
|
||||
<div className="comm-list-row-body">
|
||||
<div className="comm-list-row-top">
|
||||
<span className="comm-list-row-name">{t.user_name ?? 'Moi'}</span>
|
||||
|
||||
Reference in New Issue
Block a user