mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
63b6150b9c
* fix: Labels reordering inconsistency * fix: Delete child labels * feat: multi-select while grouping labels * refactor: label sorting in mobx computed function * feat: drag & drop label grouping, un-grouping * chore: removed label select modal * fix: moving labels from project store to project label store * fix: typo changes and build tree function added * labels feature * disable dropping group into a group * fix build errors * fix more issues * chore: added combining state UI, fixed scroll issue for label groups * chore: group icon for label groups * fix: group cannot be dropped in another group --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: rahulramesha <rahulramesham@gmail.com> Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
174 lines
5.7 KiB
TypeScript
174 lines
5.7 KiB
TypeScript
import { observer } from "mobx-react-lite";
|
|
// components
|
|
import { SpreadsheetColumn } from "components/issues";
|
|
// types
|
|
import { IIssue, IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueLabel, IState, IUserLite } from "types";
|
|
|
|
type Props = {
|
|
displayFilters: IIssueDisplayFilterOptions;
|
|
displayProperties: IIssueDisplayProperties;
|
|
disableUserActions: boolean;
|
|
expandedIssues: string[];
|
|
handleDisplayFilterUpdate: (data: Partial<IIssueDisplayFilterOptions>) => void;
|
|
handleUpdateIssue: (issue: IIssue, data: Partial<IIssue>) => void;
|
|
issues: IIssue[] | undefined;
|
|
members?: IUserLite[] | undefined;
|
|
labels?: IIssueLabel[] | undefined;
|
|
states?: IState[] | undefined;
|
|
};
|
|
|
|
export const SpreadsheetColumnsList: React.FC<Props> = observer((props) => {
|
|
const {
|
|
disableUserActions,
|
|
displayFilters,
|
|
displayProperties,
|
|
expandedIssues,
|
|
handleDisplayFilterUpdate,
|
|
handleUpdateIssue,
|
|
issues,
|
|
members,
|
|
labels,
|
|
states,
|
|
} = props;
|
|
|
|
return (
|
|
<>
|
|
{displayProperties.state && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
states={states}
|
|
property="state"
|
|
/>
|
|
)}
|
|
{displayProperties.priority && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="priority"
|
|
/>
|
|
)}
|
|
{displayProperties.assignee && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
members={members}
|
|
property="assignee"
|
|
/>
|
|
)}
|
|
{displayProperties.labels && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
labels={labels}
|
|
property="labels"
|
|
/>
|
|
)}{" "}
|
|
{displayProperties.start_date && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="start_date"
|
|
/>
|
|
)}
|
|
{displayProperties.due_date && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="due_date"
|
|
/>
|
|
)}
|
|
{displayProperties.estimate && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="estimate"
|
|
/>
|
|
)}
|
|
{displayProperties.created_on && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="created_on"
|
|
/>
|
|
)}
|
|
{displayProperties.updated_on && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="updated_on"
|
|
/>
|
|
)}
|
|
{displayProperties.link && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="link"
|
|
/>
|
|
)}
|
|
{displayProperties.attachment_count && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="attachment_count"
|
|
/>
|
|
)}
|
|
{displayProperties.sub_issue_count && (
|
|
<SpreadsheetColumn
|
|
displayFilters={displayFilters}
|
|
disableUserActions={disableUserActions}
|
|
expandedIssues={expandedIssues}
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
handleUpdateIssue={handleUpdateIssue}
|
|
issues={issues}
|
|
property="sub_issue_count"
|
|
/>
|
|
)}
|
|
</>
|
|
);
|
|
});
|