import type { MouseEvent } from "react"; import { Badge, Panel } from "../../../ui/index.ts"; import type { IssueRow } from "../../../api/types.ts"; import { isOverdue, todayISO } from "./card.ts"; import { IssueLink } from "./IssueLink.tsx"; import { dueOf } from "./options.ts"; // щелчок по строке открывает карточку, если это не ссылка/кнопка и не выделение текста function rowClick(e: MouseEvent, key: string, onOpen: (key: string) => void) { if ((e.target as HTMLElement).closest("a, button")) return; if (window.getSelection()?.toString()) return; onOpen(key); } export function IssueTable({ rows, epicNames, closed, onOpen }: { rows: IssueRow[]; epicNames: Record; closed: Set; onOpen(key: string): void; }) { const today = todayISO(); return ( {rows.map((i) => { const due = dueOf(i); return ( rowClick(e, i.key, onOpen)}> ); })}
КлючТемаСтатус JiraИсполнительСрокСпринтЭпикВид работыТип
{i.neighbor && сосед} {i.summary} {i.status && {i.status}} {i.assignee} {due} {i.sprint} {i.epic_key ? epicNames[i.epic_key] ?? i.epic_key : ""} {i.work_kind} {i.issue_type}
); }