fix(账号): 固化超级管理员身份

This commit is contained in:
Script Generator
2026-06-26 11:18:00 +08:00
parent 56e0fe562d
commit 4cda624dc7
13 changed files with 419 additions and 80 deletions

View File

@@ -4,6 +4,8 @@ import { memo } from 'react';
import { BugStatusBadge } from './BugStatusBadge';
import { BUG_SEVERITY_LABEL, BUG_SEVERITY_COLOR, getBugActualHours } from '@/lib/bug';
import { formatWorkHours } from '@/lib/work-hours';
import { resolveMemberDisplayName } from '@/lib/member-system';
import { useMemberStore } from '@/stores/useMemberStore';
import type { Bug } from '@/lib/bug';
interface Props {
@@ -21,6 +23,8 @@ const PRIORITY_DOT: Record<string, string> = {
function BugRowImpl({ bug, testCaseNo, onClick }: Props) {
const actualHours = getBugActualHours(bug);
const members = useMemberStore((s) => s.members);
const assigneeName = resolveMemberDisplayName(bug.assigneeId, members);
return (
<div onClick={onClick} className="flex items-center gap-3 px-4 py-2.5 border-b border-[var(--line)] hover:bg-[var(--bg-subtle)] cursor-pointer transition-colors last:border-b-0">
<span className={`h-2 w-2 rounded-full shrink-0 ${PRIORITY_DOT[bug.priority] || 'bg-zinc-300'}`} />
@@ -32,7 +36,7 @@ function BugRowImpl({ bug, testCaseNo, onClick }: Props) {
<span className="text-[11px] text-[var(--ink-muted)] tabular-nums w-28 text-right shrink-0 whitespace-nowrap">{formatWorkHours(actualHours)}</span>
)}
{testCaseNo && <span className="text-[10px] font-mono text-[var(--ink-muted)] w-14 text-right shrink-0">{testCaseNo}</span>}
<span className="text-[11px] text-[var(--ink-soft)] w-14 text-right truncate shrink-0">{bug.assigneeId}</span>
<span className="text-[11px] text-[var(--ink-soft)] w-14 text-right truncate shrink-0">{assigneeName}</span>
</div>
);
}