import { Draggable } from "@hello-pangea/dnd"; // components import { KanBanProperties } from "./properties"; // types import { IEstimatePoint, IIssue, IIssueLabels, IState, IUserLite } from "types"; interface IssueBlockProps { sub_group_id: string; columnId: string; index: number; issue: IIssue; isDragDisabled: 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: any; states: IState[] | null; labels: IIssueLabels[] | null; members: IUserLite[] | null; estimates: IEstimatePoint[] | null; } export const KanbanIssueBlock: React.FC = (props) => { const { sub_group_id, columnId, index, issue, isDragDisabled, handleIssues, quickActions, displayProperties, states, labels, members, estimates, } = 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) => (
{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}
)}
{issue.name}
)}
); };