Files
plane/web/ee/constants/project/spreadsheet.ts
guru_sainath 3e4fa21ee2 [WEB-1986] Feat: Project Grouping (#715)
* feat: project grouping migrations

* chore: implemented workspace features

* chore: updated worksapce feature import in types

* chore: project states endpoint

* chore: updated migration file

* chore: migration file changes

* chore: workspace project states

* feat: project states

* fix: project states

* chore: replaced base modal with project base modal in project attribute

* chore: removed 002 migration

* chore: project attribute migration

* chore: project states feature flagged

* chore: project state marking as default

* chore: code cleanup

* chore: updated the project attributes operations in the project crud endpoints

* fix: wip

* chore: feature flag validation on project create and update.

* fix: sync develope

* dev: project state feature flag and removed read only fields from serializer

* wip

* chore: updated project id and project validation when we toggle the workspace project_grouping feature is true

* wip: layouts

* chore: updated project filter store

* wip: default screens

* chore: filters update

* chore: filters updates

* chore: display filter updates

* wip: state dropdown

* chore: seperated project components for CE

* chore: splitted the code for project creation form

* fix: code structure optimization

* chore: handled project filters

* wip: gallery layout for projects

* wip: spreadsheet filters

* chore: added state and priority filters

* fix: project page root moved

* fix: synced with preview

* dev: updated sorting

* wip: role based permissions

* fix: header sorting fixed

* fix: project types + state filter

* fix: optimizations

* fix: optimizations

* fix: partial feature flagging

* fix: project states

* fix: css

* fix: css foxes

* fix:

* chore: handled board layout in project grouping

* fix: post ce sync changes

* fix: gantt permissions + member bugs

* fix: mobile header + layout fixes

* fix: workspace sidebar + archives

* fix: build errors

* fix: dark theme handling

* fix: archive fix + miscellaneous

* Fix: build errors

* fix: kandban drag and drop + miscellaneous

* fix: kanban drag and drop

* fix: imports

* fix: drag & drop + project dropdown

* fix: merge changes

---------

Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2024-08-12 21:08:16 +05:30

104 lines
2.5 KiB
TypeScript

"use client";
import { FC } from "react";
// icons
import { CalendarDays, Link2, Signal, Paperclip } from "lucide-react";
// ui
import { LayersIcon, DoubleCircleIcon } from "@plane/ui";
import { ISvgIcons } from "@plane/ui/src/icons/type";
import {
SpreadsheetLeadColumn,
SpreadsheetUpdatedOnColumn,
SpreadsheetPriorityColumn,
SpreadsheetStateColumn,
SpreadsheetIssueColumn,
SpreadsheetMembersColumn,
} from "@/plane-web/components/projects/layouts/spreadsheet/columns";
import { TProject } from "@/plane-web/types/projects";
export interface IProjectDisplayProperties {
priority?: boolean;
state?: boolean;
duration: string;
lead: string;
members_count: number;
issue_count: number;
}
export const SPREADSHEET_PROPERTY_DETAILS: {
[key: string]: {
title: string;
ascendingOrderTitle: string;
descendingOrderTitle: string;
icon: FC<ISvgIcons>;
isSortingAllowed?: boolean;
Column: React.FC<{
project: TProject;
onClose?: () => void;
onChange: (project: TProject, data: Partial<TProject>) => void;
disabled: boolean;
}>;
};
} = {
priority: {
title: "Priority",
ascendingOrderTitle: "None",
descendingOrderTitle: "Urgent",
icon: Signal,
Column: SpreadsheetPriorityColumn,
isSortingAllowed: true,
},
state: {
title: "State",
ascendingOrderTitle: "A",
descendingOrderTitle: "Z",
icon: DoubleCircleIcon,
Column: SpreadsheetStateColumn,
isSortingAllowed: true,
},
duration: {
title: "Start date -> End date",
ascendingOrderTitle: "New",
descendingOrderTitle: "Old",
icon: CalendarDays,
Column: SpreadsheetUpdatedOnColumn,
isSortingAllowed: true,
},
lead: {
title: "Lead",
ascendingOrderTitle: "Most",
descendingOrderTitle: "Least",
icon: Link2,
Column: SpreadsheetLeadColumn,
isSortingAllowed: false,
},
members_count: {
title: "No. of Members",
ascendingOrderTitle: "Least",
descendingOrderTitle: "Most",
icon: Paperclip,
Column: SpreadsheetMembersColumn,
isSortingAllowed: true,
},
issue_count: {
title: "No. of Issues",
ascendingOrderTitle: "Most",
descendingOrderTitle: "Least",
icon: LayersIcon,
Column: SpreadsheetIssueColumn,
isSortingAllowed: true,
},
};
export const SPREADSHEET_PROPERTY_LIST: (keyof IProjectDisplayProperties)[] = [
"state",
"priority",
"duration",
"lead",
"members_count",
"issue_count",
];
export const SPREADSHEET_SELECT_GROUP = "spreadsheet-issues";