forked from github/plane
f79bd9df60
* dev: draft and archived issue store * connect draft and archived issues * kanban for draft issues * fix filter store for calendar and kanban * dev: profile issues store and draft issues filters in header * disble issue creation for draft issues * dev: profile issues store filters * disable kanban properties in draft issues * dev: profile issues store filters * dev: seperated adding issues to the cycle and module as seperate methds in cycle and module store * dev: workspace profile issues store * dev: sub group issues in the swimlanes * profile issues and create issue connection * fix profile issues * fix spreadsheet issues * fix dissapearing project from create issue modal * page level modifications * fix additional bugs * dev: issues profile and global iisues and filters update * fix issue related bugs * fix project views for list and kanban * fix build errors --------- Co-authored-by: rahulramesha <rahulramesham@gmail.com>
70 lines
2.0 KiB
TypeScript
70 lines
2.0 KiB
TypeScript
// components
|
|
import { KanbanIssueBlock } from "components/issues";
|
|
import { IIssueDisplayProperties, IIssue } from "types";
|
|
import { EIssueActions } from "../types";
|
|
import { IIssueResponse } from "store/issues/types";
|
|
|
|
interface IssueBlocksListProps {
|
|
sub_group_id: string;
|
|
columnId: string;
|
|
issues: IIssueResponse;
|
|
issueIds: string[];
|
|
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 KanbanIssueBlocksList: React.FC<IssueBlocksListProps> = (props) => {
|
|
const {
|
|
sub_group_id,
|
|
columnId,
|
|
issues,
|
|
issueIds,
|
|
showEmptyGroup,
|
|
isDragDisabled,
|
|
handleIssues,
|
|
quickActions,
|
|
displayProperties,
|
|
isReadOnly,
|
|
} = props;
|
|
|
|
return (
|
|
<>
|
|
{issueIds && issueIds.length > 0 ? (
|
|
<>
|
|
{issueIds.map((issueId, index) => {
|
|
if (!issues[issueId]) return null;
|
|
|
|
const issue = issues[issueId];
|
|
|
|
return (
|
|
<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}
|
|
isReadOnly={isReadOnly}
|
|
/>
|
|
);
|
|
})}
|
|
</>
|
|
) : (
|
|
!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>
|
|
)
|
|
)}
|
|
</>
|
|
);
|
|
};
|