mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
74ca187659
* chore: workspace project roles for the current user * dev: workspace and project member * chore: store implementation for workspace user projects role * view changes for the project roles * connect workspace member's project roles to assigned --------- Co-authored-by: gurusainath <gurusainath007@gmail.com> Co-authored-by: rahulramesha <rahulramesham@gmail.com> Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
75 lines
2.1 KiB
TypeScript
75 lines
2.1 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,
|
|
customActionButton?: React.ReactElement
|
|
) => React.ReactNode;
|
|
displayProperties: IIssueDisplayProperties | null;
|
|
canEditProperties: (projectId: string | undefined) => boolean;
|
|
}
|
|
|
|
export const KanbanIssueBlocksList: React.FC<IssueBlocksListProps> = (props) => {
|
|
const {
|
|
sub_group_id,
|
|
columnId,
|
|
issues,
|
|
issueIds,
|
|
showEmptyGroup,
|
|
isDragDisabled,
|
|
handleIssues,
|
|
quickActions,
|
|
displayProperties,
|
|
canEditProperties,
|
|
} = 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}
|
|
canEditProperties={canEditProperties}
|
|
/>
|
|
);
|
|
})}
|
|
</>
|
|
) : (
|
|
!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>
|
|
)
|
|
)}
|
|
</>
|
|
);
|
|
};
|