forked from github/plane
02d4d32f7a
* fix: show empty group * chore: handled None values for lables and assignees in list and kanban layouts --------- Co-authored-by: dakshesh14 <dakshesh.jain14@gmail.com>
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
// components
|
|
import { KanbanIssueBlock } from "components/issues";
|
|
import { IIssueDisplayProperties, IIssue } from "types";
|
|
|
|
interface IssueBlocksListProps {
|
|
sub_group_id: string;
|
|
columnId: string;
|
|
issues: 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 KanbanIssueBlocksList: React.FC<IssueBlocksListProps> = (props) => {
|
|
const {
|
|
sub_group_id,
|
|
columnId,
|
|
issues,
|
|
showEmptyGroup,
|
|
isDragDisabled,
|
|
handleIssues,
|
|
quickActions,
|
|
displayProperties,
|
|
} = props;
|
|
|
|
return (
|
|
<>
|
|
{issues && issues.length > 0 ? (
|
|
<>
|
|
{issues.map((issue, index) => (
|
|
<KanbanIssueBlock
|
|
key={`kanban-issue-block-${issue.id}`}
|
|
index={index}
|
|
issue={issue}
|
|
showEmptyGroup={showEmptyGroup}
|
|
handleIssues={handleIssues}
|
|
quickActions={quickActions}
|
|
displayProperties={displayProperties}
|
|
columnId={columnId}
|
|
sub_group_id={sub_group_id}
|
|
isDragDisabled={isDragDisabled}
|
|
/>
|
|
))}
|
|
</>
|
|
) : (
|
|
!isDragDisabled && (
|
|
<div className="absolute top-0 left-0 w-full h-full flex items-center justify-center">
|
|
{/* <div className="text-custom-text-300 text-sm">Drop here</div> */}
|
|
</div>
|
|
)
|
|
)}
|
|
</>
|
|
);
|
|
};
|