import { observer } from "mobx-react"; import { useRouter } from "next/router"; // ui import { IIssueDisplayFilterOptions, IIssueDisplayProperties } from "@plane/types"; // components import { MultipleSelectGroupAction } from "@/components/core"; import { SpreadsheetHeaderColumn } from "@/components/issues/issue-layouts"; // constants import { SPREADSHEET_SELECT_GROUP } from "@/constants/spreadsheet"; // helpers import { cn } from "@/helpers/common.helper"; // hooks import { TSelectionHelper } from "@/hooks/use-multiple-select"; interface Props { displayProperties: IIssueDisplayProperties; displayFilters: IIssueDisplayFilterOptions; handleDisplayFilterUpdate: (data: Partial) => void; canEditProperties: (projectId: string | undefined) => boolean; isEstimateEnabled: boolean; spreadsheetColumnsList: (keyof IIssueDisplayProperties)[]; selectionHelpers: TSelectionHelper; } export const SpreadsheetHeader = observer((props: Props) => { const { displayProperties, displayFilters, handleDisplayFilterUpdate, canEditProperties, isEstimateEnabled, spreadsheetColumnsList, selectionHelpers, } = props; // router const router = useRouter(); const { projectId } = router.query; // derived values const isGroupSelectionEmpty = selectionHelpers.isGroupSelected(SPREADSHEET_SELECT_GROUP) === "empty"; // auth const canSelectIssues = canEditProperties(projectId?.toString()); return ( {canSelectIssues && (
)}
Issues {spreadsheetColumnsList.map((property) => ( ))} ); });