mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
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>
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import React from "react";
|
|
|
|
// components
|
|
import { IssuePropertyAssignee } from "../../properties";
|
|
// hooks
|
|
import useSubIssue from "hooks/use-sub-issue";
|
|
// types
|
|
import { IIssue, IUserLite } from "types";
|
|
|
|
type Props = {
|
|
issue: IIssue;
|
|
members: IUserLite[] | undefined;
|
|
onChange: (data: Partial<IIssue>) => void;
|
|
expandedIssues: string[];
|
|
disabled: boolean;
|
|
};
|
|
|
|
export const SpreadsheetAssigneeColumn: React.FC<Props> = ({ issue, members, onChange, expandedIssues, disabled }) => {
|
|
const isExpanded = expandedIssues.indexOf(issue.id) > -1;
|
|
|
|
const { subIssues, isLoading } = useSubIssue(issue.project_detail?.id, issue.id, isExpanded);
|
|
|
|
return (
|
|
<>
|
|
<IssuePropertyAssignee
|
|
projectId={issue.project_detail?.id ?? null}
|
|
value={issue.assignees}
|
|
onChange={(data) => onChange({ assignees: data })}
|
|
className="h-full w-full"
|
|
buttonClassName="!shadow-none !border-0 h-full w-full px-2.5 py-1 "
|
|
noLabelBorder
|
|
hideDropdownArrow
|
|
disabled={disabled}
|
|
multiple
|
|
/>
|
|
|
|
{isExpanded &&
|
|
!isLoading &&
|
|
subIssues &&
|
|
subIssues.length > 0 &&
|
|
subIssues.map((subIssue) => (
|
|
<SpreadsheetAssigneeColumn
|
|
key={subIssue.id}
|
|
issue={subIssue}
|
|
onChange={onChange}
|
|
expandedIssues={expandedIssues}
|
|
members={members}
|
|
disabled={disabled}
|
|
/>
|
|
))}
|
|
</>
|
|
);
|
|
};
|