'use client'; import { TestCaseStatusBadge } from './TestCaseStatusBadge'; import { calcActualHoursByDates } from '@/lib/dev-task'; 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', }; export function TestCaseRow({ testCase, bugCount, onClick }: Props) { return (
{testCase.caseNo} {testCase.title} {testCase.startedAt && ( {calcActualHoursByDates(testCase.startedAt, testCase.completedAt)}h )} {bugCount > 0 && ( {bugCount} Bug )} {testCase.assigneeId || '-'}
); }