132 lines
3.2 KiB
TypeScript
132 lines
3.2 KiB
TypeScript
/**
|
|
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
* See the LICENSE file for details.
|
|
*/
|
|
|
|
// plane imports
|
|
import type { TProjectAppliedDisplayFilterKeys, TProjectOrderByOptions } from "@plane/types";
|
|
// local imports
|
|
|
|
export type TNetworkChoiceIconKey = "Lock" | "Globe2";
|
|
|
|
export type TNetworkChoice = {
|
|
key: 0 | 2;
|
|
labelKey: string;
|
|
i18n_label: string;
|
|
description: string;
|
|
iconKey: TNetworkChoiceIconKey;
|
|
};
|
|
|
|
export const NETWORK_CHOICES: TNetworkChoice[] = [
|
|
{
|
|
key: 0,
|
|
labelKey: "Private",
|
|
i18n_label: "workspace_projects.network.private.title",
|
|
description: "workspace_projects.network.private.description", //"Accessible only by invite",
|
|
iconKey: "Lock",
|
|
},
|
|
{
|
|
key: 2,
|
|
labelKey: "Public",
|
|
i18n_label: "workspace_projects.network.public.title",
|
|
description: "workspace_projects.network.public.description", //"Anyone in the workspace except Guests can join",
|
|
iconKey: "Globe2",
|
|
},
|
|
];
|
|
|
|
export const GROUP_CHOICES = {
|
|
backlog: {
|
|
key: "backlog",
|
|
i18n_label: "workspace_projects.state.backlog",
|
|
},
|
|
unstarted: {
|
|
key: "unstarted",
|
|
i18n_label: "workspace_projects.state.unstarted",
|
|
},
|
|
started: {
|
|
key: "started",
|
|
i18n_label: "workspace_projects.state.started",
|
|
},
|
|
completed: {
|
|
key: "completed",
|
|
i18n_label: "workspace_projects.state.completed",
|
|
},
|
|
cancelled: {
|
|
key: "cancelled",
|
|
i18n_label: "workspace_projects.state.cancelled",
|
|
},
|
|
};
|
|
|
|
export const PROJECT_AUTOMATION_MONTHS = [
|
|
{ i18n_label: "workspace_projects.common.months_count", value: 1 },
|
|
{ i18n_label: "workspace_projects.common.months_count", value: 3 },
|
|
{ i18n_label: "workspace_projects.common.months_count", value: 6 },
|
|
{ i18n_label: "workspace_projects.common.months_count", value: 9 },
|
|
{ i18n_label: "workspace_projects.common.months_count", value: 12 },
|
|
];
|
|
|
|
export const PROJECT_ORDER_BY_OPTIONS: {
|
|
key: TProjectOrderByOptions;
|
|
i18n_label: string;
|
|
}[] = [
|
|
{
|
|
key: "sort_order",
|
|
i18n_label: "workspace_projects.sort.manual",
|
|
},
|
|
{
|
|
key: "name",
|
|
i18n_label: "workspace_projects.sort.name",
|
|
},
|
|
{
|
|
key: "created_at",
|
|
i18n_label: "workspace_projects.sort.created_at",
|
|
},
|
|
{
|
|
key: "members_length",
|
|
i18n_label: "workspace_projects.sort.members_length",
|
|
},
|
|
];
|
|
|
|
export const PROJECT_DISPLAY_FILTER_OPTIONS: {
|
|
key: TProjectAppliedDisplayFilterKeys;
|
|
i18n_label: string;
|
|
}[] = [
|
|
{
|
|
key: "my_projects",
|
|
i18n_label: "workspace_projects.scope.my_projects",
|
|
},
|
|
{
|
|
key: "archived_projects",
|
|
i18n_label: "workspace_projects.scope.archived_projects",
|
|
},
|
|
];
|
|
|
|
export const PROJECT_ERROR_MESSAGES = {
|
|
permissionError: {
|
|
i18n_title: "workspace_projects.error.permission",
|
|
i18n_message: undefined,
|
|
},
|
|
cycleDeleteError: {
|
|
i18n_title: "error",
|
|
i18n_message: "workspace_projects.error.cycle_delete",
|
|
},
|
|
moduleDeleteError: {
|
|
i18n_title: "error",
|
|
i18n_message: "workspace_projects.error.module_delete",
|
|
},
|
|
issueDeleteError: {
|
|
i18n_title: "error",
|
|
i18n_message: "workspace_projects.error.issue_delete",
|
|
},
|
|
};
|
|
|
|
export enum EProjectFeatureKey {
|
|
WORK_ITEMS = "work_items",
|
|
CYCLES = "cycles",
|
|
MODULES = "modules",
|
|
VIEWS = "views",
|
|
PAGES = "pages",
|
|
INTAKE = "intake",
|
|
}
|