Improve user search, DB nulls, and chat UI

Change username filter to use icontains for partial/case-insensitive matching. In CustomUser.save, introduce _NULLABLE_CHAR_FIELDS and convert empty string char fields to None to ensure nullable fields are stored consistently. Update CreateChatModal to always show a subtitle combining the user's full name and account creation date (joined with " · "), improving UI information.
This commit is contained in:
David Bruno Vontor
2026-06-05 16:48:53 +02:00
parent c0af4c2349
commit fbaf914c8b
3 changed files with 17 additions and 8 deletions

View File

@@ -292,13 +292,16 @@ export default function CreateChatModal({ open, onClose }: Props) {
<div className="text-sm font-medium text-brand-text">
{user.username}
</div>
{(user.first_name || user.last_name) && (
<div className="truncate text-xs text-brand-text/50">
{[user.first_name, user.last_name]
.filter(Boolean)
.join(" ")}
</div>
)}
<div className="truncate text-xs text-brand-text/50">
{[
[user.first_name, user.last_name].filter(Boolean).join(" "),
user.create_time
? new Date(user.create_time).toLocaleDateString()
: null,
]
.filter(Boolean)
.join(" · ")}
</div>
</div>
{selectedUsers.some((s) => s.id === user.id) && (
<FiCheck size={14} className="shrink-0 text-brand-accent" />