2024-01-11 12:49:19 +00:00
|
|
|
// ui
|
2024-03-19 14:38:35 +00:00
|
|
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties } from "@plane/types";
|
2024-05-10 09:54:18 +00:00
|
|
|
// types
|
2024-01-11 12:49:19 +00:00
|
|
|
import { LayersIcon } from "@plane/ui";
|
|
|
|
// components
|
2024-05-10 09:54:18 +00:00
|
|
|
import { SpreadsheetHeaderColumn } from "@/components/issues/issue-layouts";
|
2024-01-11 12:49:19 +00:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
displayProperties: IIssueDisplayProperties;
|
|
|
|
displayFilters: IIssueDisplayFilterOptions;
|
|
|
|
handleDisplayFilterUpdate: (data: Partial<IIssueDisplayFilterOptions>) => void;
|
|
|
|
isEstimateEnabled: boolean;
|
2024-04-04 10:19:25 +00:00
|
|
|
spreadsheetColumnsList: (keyof IIssueDisplayProperties)[];
|
2024-01-11 12:49:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const SpreadsheetHeader = (props: Props) => {
|
2024-04-04 10:19:25 +00:00
|
|
|
const { displayProperties, displayFilters, handleDisplayFilterUpdate, isEstimateEnabled, spreadsheetColumnsList } =
|
|
|
|
props;
|
2024-01-11 12:49:19 +00:00
|
|
|
|
|
|
|
return (
|
2024-02-28 13:45:03 +00:00
|
|
|
<thead className="sticky top-0 left-0 z-[12] border-b-[0.5px] border-custom-border-100">
|
2024-01-11 12:49:19 +00:00
|
|
|
<tr>
|
2024-02-08 06:19:00 +00:00
|
|
|
<th
|
2024-02-28 13:45:03 +00:00
|
|
|
className="sticky left-0 z-[15] h-11 w-[28rem] flex items-center bg-custom-background-90 text-sm font-medium before:absolute before:h-full before:right-0 before:border-[0.5px] before:border-custom-border-100"
|
2024-02-08 06:19:00 +00:00
|
|
|
tabIndex={-1}
|
|
|
|
>
|
2024-05-10 09:54:18 +00:00
|
|
|
<span className="flex h-full w-full flex-grow items-center pl-5 px-4 py-2.5">
|
|
|
|
<LayersIcon className="mr-1 h-4 w-4 text-custom-text-400" />
|
2024-01-11 12:49:19 +00:00
|
|
|
Issue
|
|
|
|
</span>
|
|
|
|
</th>
|
|
|
|
|
2024-04-04 10:19:25 +00:00
|
|
|
{spreadsheetColumnsList.map((property) => (
|
2024-02-08 06:19:00 +00:00
|
|
|
<SpreadsheetHeaderColumn
|
2024-03-06 13:09:14 +00:00
|
|
|
key={property}
|
2024-02-08 06:19:00 +00:00
|
|
|
property={property}
|
|
|
|
displayProperties={displayProperties}
|
|
|
|
displayFilters={displayFilters}
|
|
|
|
handleDisplayFilterUpdate={handleDisplayFilterUpdate}
|
|
|
|
isEstimateEnabled={isEstimateEnabled}
|
|
|
|
/>
|
|
|
|
))}
|
2024-01-11 12:49:19 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
);
|
|
|
|
};
|