import { Draggable } from "@hello-pangea/dnd"; // components import { KanBanProperties } from "./properties"; import { Tooltip } from "@plane/ui"; import { IssuePeekOverview } from "components/issues/issue-peek-overview"; // types import { IIssueDisplayProperties, IIssue } from "types"; interface IssueBlockProps { sub_group_id: string; columnId: string; index: number; issue: IIssue; isDragDisabled: boolean; showEmptyGroup: boolean; handleIssues: ( sub_group_by: string | null, group_by: string | null, issue: IIssue, action: "update" | "delete" ) => void; quickActions: (sub_group_by: string | null, group_by: string | null, issue: IIssue) => React.ReactNode; displayProperties: IIssueDisplayProperties; } export const KanbanIssueBlock: React.FC = (props) => { const { sub_group_id, columnId, index, issue, isDragDisabled, showEmptyGroup, handleIssues, quickActions, displayProperties, } = props; const updateIssue = (sub_group_by: string | null, group_by: string | null, issueToUpdate: IIssue) => { if (issueToUpdate) handleIssues(sub_group_by, group_by, issueToUpdate, "update"); }; return ( <> {(provided, snapshot) => (
{issue.tempId !== undefined && (
)}
{quickActions( !sub_group_id && sub_group_id === "null" ? null : sub_group_id, !columnId && columnId === "null" ? null : columnId, issue )}
{displayProperties && displayProperties?.key && (
{issue.project_detail.identifier}-{issue.sequence_id}
)} { handleIssues( !sub_group_id && sub_group_id === "null" ? null : sub_group_id, !columnId && columnId === "null" ? null : columnId, { ...issue, ...issueToUpdate }, "update" ); }} >
{issue.name}
)} ); };