mirror of
https://github.com/makeplane/plane.git
synced 2026-07-14 14:31:37 +02:00
* feat: teams flow * Feat team cycles (#1844) * feat: team cycles list * chore: improvements and fixes for team cycles * minor fixes * fix: build errors * chore: add missing changes * use description_html for teams description * chore: minor improvements to team upgrade page * chore: update teams empty state * chore: team space list on sidebar * chore: remove duplicate export * chore: minor improvements * fix: team update * chore: add project members * chore: workspace assets endpoint * feat: team issues (#1861) * improvement: refactored issue grouping logic to access MobX store directly * chore: update teams issues * chore: backend changes realted to team issues * feat: team issues layouts * chore: add filter for project according to roles * chore: fetch workspace level issue property details --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> * Improvements teams (#1869) * improvement: refactored issue grouping logic to access MobX store directly * chore: update teams issues * chore: backend changes realted to team issues * feat: team issues layouts * chore: improve update team projects buttons * fix: add members logic * chore: move team quick actions to header. * chore: add filter for project according to roles * chore: implement rich text editor and allow editing from team details page * chore: disable team navigation if no projects are available * chore: update team description mentions * chore: minor ui/ ux updates * chore: update add team members modal * chore: minor improvements * chore: sidebar improvements * chore: fetch workspace level issue property details * chore: save description_json for teams * chore: minor improvements and build fixes * fix: build errors * fix: minor export fixes --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> * feat: team views list (#1900) * improvement: refactored issue grouping logic to access MobX store directly * chore: update teams issues * chore: backend changes realted to team issues * feat: team issues layouts * chore: improve update team projects buttons * fix: add members logic * chore: move team quick actions to header. * chore: add filter for project according to roles * chore: implement rich text editor and allow editing from team details page * chore: disable team navigation if no projects are available * chore: update team description mentions * chore: minor ui/ ux updates * chore: update add team members modal * chore: minor improvements * chore: sidebar improvements * chore: fetch workspace level issue property details * chore: save description_json for teams * chore: minor improvements and build fixes * fix: build errors * fix: minor export fixes * feat: team views list * feat: team view issues * chore: remove redundant annotations --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> * chore: teams command palette modals * remove unused componenets * chore: seperate issue display filter by layout constant * chore: enhance use issue actions modularity * chore: team view issue store context update * fix: build errors * chore: temporarly remove teams list header * chore: remove unused imports * revert: empty state changes * chore: remove redundant import * fix: build errors --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
130 lines
3.9 KiB
TypeScript
130 lines
3.9 KiB
TypeScript
import { GalleryVertical, GanttChartSquare, Kanban, List, LucideIcon } from "lucide-react";
|
|
// plane web types
|
|
import {
|
|
EProjectLayouts,
|
|
EProjectScope,
|
|
TProjectGroupBy,
|
|
TProjectSortBy,
|
|
TProjectSortOrder,
|
|
} from "@/plane-web/types/workspace-project-filters";
|
|
import { EProjectAccess, EProjectPriority } from "@/plane-web/types/workspace-project-states";
|
|
|
|
// scope constants
|
|
type TProjectScopeMapObject<T> = { key: T; label: string };
|
|
type TProjectScopeMap = {
|
|
[key in EProjectScope]: TProjectScopeMapObject<key>;
|
|
};
|
|
export const PROJECT_SCOPE_MAP: Partial<TProjectScopeMap> = {
|
|
[EProjectScope.MY_PROJECTS]: {
|
|
key: EProjectScope.MY_PROJECTS,
|
|
label: "Your projects",
|
|
},
|
|
[EProjectScope.ALL_PROJECTS]: {
|
|
key: EProjectScope.ALL_PROJECTS,
|
|
label: "Browse all projects",
|
|
},
|
|
};
|
|
export const PROJECT_SCOPES = Object.values(PROJECT_SCOPE_MAP);
|
|
|
|
// layout constants
|
|
type TProjectLayoutMapObject<T> = { key: T; title: string; label: string; icon: LucideIcon; selectivelyHide: boolean };
|
|
type TProjectLayoutMap = {
|
|
[key in EProjectLayouts]: TProjectLayoutMapObject<key>;
|
|
};
|
|
export const PROJECT_LAYOUT_MAP: TProjectLayoutMap = {
|
|
[EProjectLayouts.GALLERY]: {
|
|
key: EProjectLayouts.GALLERY,
|
|
title: "Gallery Layout",
|
|
label: "Gallery",
|
|
icon: GalleryVertical,
|
|
selectivelyHide: false,
|
|
},
|
|
[EProjectLayouts.BOARD]: {
|
|
key: EProjectLayouts.BOARD,
|
|
title: "Board Layout",
|
|
label: "Board",
|
|
icon: Kanban,
|
|
selectivelyHide: true,
|
|
},
|
|
[EProjectLayouts.TABLE]: {
|
|
key: EProjectLayouts.TABLE,
|
|
title: "List Layout",
|
|
label: "Table",
|
|
icon: List,
|
|
selectivelyHide: false,
|
|
},
|
|
[EProjectLayouts.TIMELINE]: {
|
|
key: EProjectLayouts.TIMELINE,
|
|
title: "Timeline Layout",
|
|
label: "Timeline",
|
|
icon: GanttChartSquare,
|
|
selectivelyHide: true,
|
|
},
|
|
};
|
|
export const PROJECT_LAYOUTS = Object.values(PROJECT_LAYOUT_MAP);
|
|
|
|
// attribute constants
|
|
type TProjectPriorityMapObject<T> = { key: T; label: string };
|
|
type TProjectPriorityMap = {
|
|
[key in EProjectPriority]: TProjectPriorityMapObject<key>;
|
|
};
|
|
type TProjectAccessMapObject<T> = { key: T; label: string };
|
|
type TProjectAccessMap = {
|
|
[key in EProjectAccess]: TProjectAccessMapObject<key>;
|
|
};
|
|
export const PROJECT_PRIORITY_MAP: TProjectPriorityMap = {
|
|
[EProjectPriority.NONE]: {
|
|
key: EProjectPriority.NONE,
|
|
label: "None",
|
|
},
|
|
[EProjectPriority.LOW]: { key: EProjectPriority.LOW, label: "Low" },
|
|
[EProjectPriority.MEDIUM]: { key: EProjectPriority.MEDIUM, label: "Medium" },
|
|
[EProjectPriority.HIGH]: { key: EProjectPriority.HIGH, label: "High" },
|
|
[EProjectPriority.URGENT]: {
|
|
key: EProjectPriority.URGENT,
|
|
label: "Urgent",
|
|
},
|
|
};
|
|
export const PROJECT_ACCESS_MAP: TProjectAccessMap = {
|
|
[EProjectAccess.PUBLIC]: {
|
|
key: EProjectAccess.PUBLIC,
|
|
label: "Public",
|
|
},
|
|
[EProjectAccess.PRIVATE]: { key: EProjectAccess.PRIVATE, label: "Private" },
|
|
};
|
|
export const PROJECT_PRIORITIES = Object.values(PROJECT_PRIORITY_MAP);
|
|
export const PROJECT_ACCESS = Object.values(PROJECT_ACCESS_MAP);
|
|
|
|
// display filter constants
|
|
export const PROJECT_GROUP_BY_OPTIONS: {
|
|
key: TProjectGroupBy;
|
|
title: string;
|
|
}[] = [
|
|
{ key: "states", title: "States" },
|
|
{ key: "state_groups", title: "State Groups" },
|
|
{ key: "priority", title: "Priority" },
|
|
{ key: "created_by", title: "Created By" },
|
|
];
|
|
|
|
export const PROJECT_SORT_BY_OPTIONS: {
|
|
key: TProjectSortBy;
|
|
title: string;
|
|
}[] = [
|
|
{ key: "manual", title: "Manual" },
|
|
{ key: "name", title: "Name" },
|
|
{ key: "state", title: "State" },
|
|
{ key: "priority", title: "Priority" },
|
|
{ key: "created_date", title: "Created date" },
|
|
{ key: "start_date", title: "Start Date" },
|
|
{ key: "end_date", title: "End Date" },
|
|
{ key: "members_count", title: "Member Count" },
|
|
];
|
|
|
|
export const PROJECT_SORT_ORDER_OPTIONS: {
|
|
key: TProjectSortOrder;
|
|
title: string;
|
|
}[] = [
|
|
{ key: "asc", title: "Ascending" },
|
|
{ key: "desc", title: "Descending" },
|
|
];
|