'use client'; import { memo } from 'react'; import { TestCaseStatusBadge } from './TestCaseStatusBadge'; import { getTestCaseActualHours } from '@/lib/test-case'; import { formatWorkHours } from '@/lib/work-hours'; import type { TestCase } from '@/lib/test-case'; interface Props { testCase: TestCase; bugCount: number; onClick?: () => void; } const PRIORITY_DOT: Record = { P0: 'bg-red-500', P1: 'bg-orange-400', P2: 'bg-blue-400', P3: 'bg-zinc-300', }; function TestCaseRowImpl({ testCase, bugCount, onClick }: Props) { const actualHours = getTestCaseActualHours(testCase); return (
{testCase.caseNo} {testCase.title} {actualHours > 0 && ( {formatWorkHours(actualHours)} )} {bugCount > 0 && ( {bugCount} Bug )} {testCase.assigneeId || '-'}
); } export const TestCaseRow = memo(TestCaseRowImpl);