2024-07-15 19:48:27 +05:30
|
|
|
import { ReactNode } from "react";
|
2024-07-18 15:46:16 +05:30
|
|
|
import { FileText, Layers, Timer } from "lucide-react";
|
2024-10-22 12:09:03 +05:30
|
|
|
import { IProject } from "@plane/types";
|
2024-07-18 15:46:16 +05:30
|
|
|
import { ContrastIcon, DiceIcon, Intake } from "@plane/ui";
|
2024-07-15 19:48:27 +05:30
|
|
|
|
2024-10-22 12:09:03 +05:30
|
|
|
export type TProperties = {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: string;
|
2024-10-22 12:09:03 +05:30
|
|
|
property: string;
|
|
|
|
|
title: string;
|
|
|
|
|
description: string;
|
|
|
|
|
icon: ReactNode;
|
|
|
|
|
isPro: boolean;
|
|
|
|
|
isEnabled: boolean;
|
|
|
|
|
renderChildren?: (
|
|
|
|
|
currentProjectDetails: IProject,
|
|
|
|
|
isAdmin: boolean,
|
2024-11-05 16:07:27 +05:30
|
|
|
handleSubmit: (featureKey: string, featureProperty: string) => Promise<void>,
|
|
|
|
|
workspaceSlug: string
|
2024-10-22 12:09:03 +05:30
|
|
|
) => ReactNode;
|
|
|
|
|
};
|
2024-07-15 19:48:27 +05:30
|
|
|
export type TFeatureList = {
|
2024-10-22 12:09:03 +05:30
|
|
|
[key: string]: TProperties;
|
2024-07-15 19:48:27 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type TProjectFeatures = {
|
|
|
|
|
[key: string]: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: string;
|
2024-07-15 19:48:27 +05:30
|
|
|
title: string;
|
2024-08-27 17:27:59 +05:30
|
|
|
description: string;
|
2024-07-15 19:48:27 +05:30
|
|
|
featureList: TFeatureList;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const PROJECT_FEATURES_LIST: TProjectFeatures = {
|
|
|
|
|
project_features: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "projects_and_issues",
|
2025-02-06 20:41:31 +05:30
|
|
|
title: "Projects and work items",
|
2024-08-27 17:27:59 +05:30
|
|
|
description: "Toggle these on or off this project.",
|
2024-07-15 19:48:27 +05:30
|
|
|
featureList: {
|
|
|
|
|
cycles: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "cycles",
|
2024-07-15 19:48:27 +05:30
|
|
|
property: "cycle_view",
|
|
|
|
|
title: "Cycles",
|
2024-08-27 17:27:59 +05:30
|
|
|
description: "Timebox work as you see fit per project and change frequency from one period to the next.",
|
2024-07-15 19:48:27 +05:30
|
|
|
icon: <ContrastIcon className="h-5 w-5 flex-shrink-0 rotate-180 text-custom-text-300" />,
|
|
|
|
|
isPro: false,
|
|
|
|
|
isEnabled: true,
|
|
|
|
|
},
|
|
|
|
|
modules: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "modules",
|
2024-07-15 19:48:27 +05:30
|
|
|
property: "module_view",
|
|
|
|
|
title: "Modules",
|
2024-08-27 17:27:59 +05:30
|
|
|
description: "Group work into sub-project-like set-ups with their own leads and assignees.",
|
2024-07-15 19:48:27 +05:30
|
|
|
icon: <DiceIcon width={20} height={20} className="flex-shrink-0 text-custom-text-300" />,
|
|
|
|
|
isPro: false,
|
|
|
|
|
isEnabled: true,
|
|
|
|
|
},
|
|
|
|
|
views: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "views",
|
2024-07-15 19:48:27 +05:30
|
|
|
property: "issue_views_view",
|
|
|
|
|
title: "Views",
|
2024-08-27 17:27:59 +05:30
|
|
|
description: "Save sorts, filters, and display options for later or share them.",
|
2024-07-18 15:46:16 +05:30
|
|
|
icon: <Layers className="h-5 w-5 flex-shrink-0 text-custom-text-300" />,
|
2024-07-15 19:48:27 +05:30
|
|
|
isPro: false,
|
|
|
|
|
isEnabled: true,
|
|
|
|
|
},
|
|
|
|
|
pages: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "pages",
|
2024-07-15 19:48:27 +05:30
|
|
|
property: "page_view",
|
|
|
|
|
title: "Pages",
|
2024-08-27 17:27:59 +05:30
|
|
|
description: "Write anything like you write anything.",
|
2024-07-15 19:48:27 +05:30
|
|
|
icon: <FileText className="h-5 w-5 flex-shrink-0 text-custom-text-300" />,
|
|
|
|
|
isPro: false,
|
|
|
|
|
isEnabled: true,
|
|
|
|
|
},
|
|
|
|
|
inbox: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "intake",
|
2024-07-15 19:48:27 +05:30
|
|
|
property: "inbox_view",
|
2024-07-16 15:21:03 +05:30
|
|
|
title: "Intake",
|
2025-02-06 20:41:31 +05:30
|
|
|
description: "Consider and discuss work items before you add them to your project.",
|
2024-07-16 15:21:03 +05:30
|
|
|
icon: <Intake className="h-5 w-5 flex-shrink-0 text-custom-text-300" />,
|
2024-07-15 19:48:27 +05:30
|
|
|
isPro: false,
|
|
|
|
|
isEnabled: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
project_others: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "work_management",
|
2024-08-27 17:27:59 +05:30
|
|
|
title: "Work management",
|
|
|
|
|
description: "Available only on some plans as indicated by the label next to the feature below.",
|
2024-07-15 19:48:27 +05:30
|
|
|
featureList: {
|
|
|
|
|
is_time_tracking_enabled: {
|
2025-01-03 14:16:26 +05:30
|
|
|
key: "time_tracking",
|
2024-07-15 19:48:27 +05:30
|
|
|
property: "is_time_tracking_enabled",
|
|
|
|
|
title: "Time Tracking",
|
2024-08-27 17:27:59 +05:30
|
|
|
description: "Log time, see timesheets, and download full CSVs for your entire workspace.",
|
2024-07-15 19:48:27 +05:30
|
|
|
icon: <Timer className="h-5 w-5 flex-shrink-0 text-custom-text-300" />,
|
|
|
|
|
isPro: true,
|
|
|
|
|
isEnabled: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|