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"; import { EIssueActions } 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: EIssueActions) => void; quickActions: (sub_group_by: string | null, group_by: string | null, issue: IIssue) => React.ReactNode; displayProperties: IIssueDisplayProperties | null; isReadOnly: boolean; } export const KanbanIssueBlock: React.FC = (props) => { const { sub_group_id, columnId, index, issue, isDragDisabled, showEmptyGroup, handleIssues, quickActions, displayProperties, isReadOnly, } = props; const updateIssue = (sub_group_by: string | null, group_by: string | null, issueToUpdate: IIssue) => { if (issueToUpdate) handleIssues(sub_group_by, group_by, issueToUpdate, EIssueActions.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 }, EIssueActions.UPDATE ); }} >
{issue.name}
)} ); };