import { observer } from "mobx-react-lite"; import { useMobxStore } from "lib/mobx/store-provider"; // components import { SpreadsheetColumn } from "components/issues"; // types import { IIssue, IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueLabel, IState, IUserLite } from "types"; type Props = { displayFilters: IIssueDisplayFilterOptions; displayProperties: IIssueDisplayProperties; canEditProperties: (projectId: string | undefined) => boolean; expandedIssues: string[]; handleDisplayFilterUpdate: (data: Partial) => void; handleUpdateIssue: (issue: IIssue, data: Partial) => void; issues: IIssue[] | undefined; members?: IUserLite[] | undefined; labels?: IIssueLabel[] | undefined; states?: IState[] | undefined; }; export const SpreadsheetColumnsList: React.FC = observer((props) => { const { canEditProperties, displayFilters, displayProperties, expandedIssues, handleDisplayFilterUpdate, handleUpdateIssue, issues, members, labels, states, } = props; const { project: { currentProjectDetails }, } = useMobxStore(); const isEstimateEnabled: boolean = currentProjectDetails?.estimate !== null; return ( <> {displayProperties.state && ( )} {displayProperties.priority && ( )} {displayProperties.assignee && ( )} {displayProperties.labels && ( )}{" "} {displayProperties.start_date && ( )} {displayProperties.due_date && ( )} {displayProperties.estimate && isEstimateEnabled && ( )} {displayProperties.created_on && ( )} {displayProperties.updated_on && ( )} {displayProperties.link && ( )} {displayProperties.attachment_count && ( )} {displayProperties.sub_issue_count && ( )} ); });