refactor: remove Subject field from Conversation model and related logic, replace with CustomerName

This commit is contained in:
mlogclub
2026-04-27 19:22:40 +08:00
parent 2d2d2d2051
commit 3a9bc4914a
24 changed files with 49 additions and 64 deletions
@@ -480,7 +480,7 @@ export function ChatPanel() {
<DialogTitle></DialogTitle>
<DialogDescription>
{conversation
? `确认认领“${conversation.subject}”吗?认领后会话会进入我的列表。`
? `确认认领“${conversation.customerName || `客户 #${conversation.customerId || conversation.id}`}”吗?认领后会话会进入我的列表。`
: "确认认领当前会话吗?"}
</DialogDescription>
</DialogHeader>
@@ -73,7 +73,7 @@ export function ConversationList({ onAfterSelect }: ConversationListProps) {
<div className="min-w-0 flex-1">
<div className="flex items-center gap-1.5">
<span className="min-w-0 flex-1 truncate font-medium text-sm leading-4">
{conversation.subject}
{conversation.customerName || `客户 #${conversation.customerId || conversation.id}`}
</span>
{conversation.agentUnreadCount > 0 ? (
<div className="flex size-4.5 shrink-0 items-center justify-center rounded-full bg-primary text-[10px] text-primary-foreground">