Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 182 additions & 0 deletions packages/constants/src/workspace.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { TStaticViewTypes } from "@plane/types";
import { EUserWorkspaceRoles } from "./user";

export const ORGANIZATION_SIZE = [
"Just myself", // TODO: translate
"2-10",
Expand Down Expand Up @@ -74,3 +77,182 @@ export const RESTRICTED_URLS = [
"instances",
"instance",
];

export const WORKSPACE_SETTINGS = {
general: {
key: "general",
i18n_label: "workspace_settings.settings.general.title",
href: `/settings`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) =>
pathname === `${baseUrl}/settings/`,
},
members: {
key: "members",
i18n_label: "workspace_settings.settings.members.title",
href: `/settings/members`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) =>
pathname === `${baseUrl}/settings/members/`,
},
"billing-and-plans": {
key: "billing-and-plans",
i18n_label: "workspace_settings.settings.billing_and_plans.title",
href: `/settings/billing`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) =>
pathname === `${baseUrl}/settings/billing/`,
},
export: {
key: "export",
i18n_label: "workspace_settings.settings.exports.title",
href: `/settings/exports`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) =>
pathname === `${baseUrl}/settings/exports/`,
},
webhooks: {
key: "webhooks",
i18n_label: "workspace_settings.settings.webhooks.title",
href: `/settings/webhooks`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) =>
pathname === `${baseUrl}/settings/webhooks/`,
},
"api-tokens": {
key: "api-tokens",
i18n_label: "workspace_settings.settings.webhooks.title",
href: `/settings/api-tokens`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) =>
pathname === `${baseUrl}/settings/api-tokens/`,
},
};

export const WORKSPACE_SETTINGS_LINKS: {
key: string;
i18n_label: string;
href: string;
access: EUserWorkspaceRoles[];
highlight: (pathname: string, baseUrl: string) => boolean;
}[] = [
WORKSPACE_SETTINGS["general"],
WORKSPACE_SETTINGS["members"],
WORKSPACE_SETTINGS["billing-and-plans"],
WORKSPACE_SETTINGS["export"],
WORKSPACE_SETTINGS["webhooks"],
WORKSPACE_SETTINGS["api-tokens"],
];

export const ROLE = {
[EUserWorkspaceRoles.GUEST]: "Guest",
[EUserWorkspaceRoles.MEMBER]: "Member",
[EUserWorkspaceRoles.ADMIN]: "Admin",
};

export const ROLE_DETAILS = {
[EUserWorkspaceRoles.GUEST]: {
i18n_title: "role_details.guest.title",
i18n_description: "role_details.guest.description",
},
[EUserWorkspaceRoles.MEMBER]: {
i18n_title: "role_details.member.title",
i18n_description: "role_details.member.description",
},
[EUserWorkspaceRoles.ADMIN]: {
i18n_title: "role_details.admin.title",
i18n_description: "role_details.admin.description",
},
};

export const USER_ROLES = [
{
value: "Product / Project Manager",
i18n_label: "user_roles.product_or_project_manager",
},
{
value: "Development / Engineering",
i18n_label: "user_roles.development_or_engineering",
},
{
value: "Founder / Executive",
i18n_label: "user_roles.founder_or_executive",
},
{
value: "Freelancer / Consultant",
i18n_label: "user_roles.freelancer_or_consultant",
},
{ value: "Marketing / Growth", i18n_label: "user_roles.marketing_or_growth" },
{
value: "Sales / Business Development",
i18n_label: "user_roles.sales_or_business_development",
},
{
value: "Support / Operations",
i18n_label: "user_roles.support_or_operations",
},
{
value: "Student / Professor",
i18n_label: "user_roles.student_or_professor",
},
{ value: "Human Resources", i18n_label: "user_roles.human_resources" },
{ value: "Other", i18n_label: "user_roles.other" },
];

export const IMPORTERS_LIST = [
{
provider: "github",
type: "import",
i18n_title: "importer.github.title",
i18n_description: "importer.github.description",
},
{
provider: "jira",
type: "import",
i18n_title: "importer.jira.title",
i18n_description: "importer.jira.description",
},
];

export const EXPORTERS_LIST = [
{
provider: "csv",
type: "export",
i18n_title: "exporter.csv.title",
i18n_description: "exporter.csv.description",
},
{
provider: "xlsx",
type: "export",
i18n_title: "exporter.excel.title",
i18n_description: "exporter.csv.description",
},
{
provider: "json",
type: "export",
i18n_title: "exporter.json.title",
i18n_description: "exporter.csv.description",
},
];

export const DEFAULT_GLOBAL_VIEWS_LIST: {
key: TStaticViewTypes;
i18n_label: string;
}[] = [
{
key: "all-issues",
i18n_label: "default_global_view.all_issues",
},
{
key: "assigned",
i18n_label: "default_global_view.assigned",
},
{
key: "created",
i18n_label: "default_global_view.created",
},
{
key: "subscribed",
i18n_label: "default_global_view.subscribed",
},
];
80 changes: 80 additions & 0 deletions packages/i18n/src/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,26 @@

"workspace_settings": {
"label": "Workspace settings",
"settings": {
"general": {
"title": "General"
},
"members": {
"title": "Members"
},
"billing-and-plans": {
"title": "Billing & Plans"
},
"exports": {
"title": "Exports"
},
"webhooks": {
"title": "Webhooks"
},
"api-tokens": {
"title": "API Tokens"
}
},
"empty_state": {
"api_tokens": {
"title": "No API tokens created",
Expand Down Expand Up @@ -1111,5 +1131,65 @@
"message": "The sticky could not be removed"
}
}
},

"role_details": {
"guest": {
"title": "Guest",
"description": "External members of organizations can be invited as guests."
},
"member": {
"title": "Member",
"description": "Ability to read, write, edit, and delete entities inside projects, cycles, and modules"
},
"admin": {
"title": "Admin",
"description": "All permissions set to true within the workspace."
}
},

"user_roles": {
"product_or_project_manager": "Product / Project Manager",
"development_or_engineering": "Development / Engineering",
"founder_or_executive": "Founder / Executive",
"freelancer_or_consultant": "Freelancer / Consultant",
"marketing_or_growth": "Marketing / Growth",
"sales_or_business_development": "Sales / Business Development",
"support_or_operations": "Support / Operations",
"student_or_professor": "Student / Professor",
"human_or_resources": "Human / Resources",
"other": "Other"
},

"importer": {
"github": {
"title": "Github",
"description": "Import issues from GitHub repositories and sync them."
},
"jira": {
"title": "Jira",
"description": "Import issues and epics from Jira projects and epics."
}
},

"exporter": {
"csv": {
"title": "CSV",
"description": "Export issues to a CSV file."
},
"xlsx": {
"title": "Excel",
"description": "Export issues to a Excel file."
},
"json": {
"title": "JSON",
"description": "Export issues to a JSON file."
}
},
"default_global_view": {
"all_issues": "All issues",
"assigned": "Assigned",
"created": "Created",
"subscribed": "Subscribed"
}
}
81 changes: 81 additions & 0 deletions packages/i18n/src/locales/es/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,26 @@

"workspace_settings": {
"label": "Configuración del espacio de trabajo",
"settings": {
"general": {
"title": "General"
},
"members": {
"title": "Miembros"
},
"billing-and-plans": {
"title": "Facturación y planes"
},
"exports": {
"title": "Exportaciones"
},
"webhooks": {
"title": "Webhooks"
},
"api-tokens": {
"title": "Tokens API"
}
},
"empty_state": {
"api_tokens": {
"title": "No se han creado tokens API",
Expand Down Expand Up @@ -1115,5 +1135,66 @@
"message": "No se pudo eliminar la nota"
}
}
},

"role_details": {
"guest": {
"title": "Invitado",
"description": "Los miembros externos de las organizaciones pueden ser invitados como invitados."
},
"member": {
"title": "Miembro",
"description": "Capacidad para leer, escribir, editar y eliminar entidades dentro de proyectos, ciclos y módulos"
},
"admin": {
"title": "Administrador",
"description": "Todos los permisos establecidos como verdaderos dentro del espacio de trabajo."
}
},

"user_roles": {
"product_or_project_manager": "Gerente de Producto / Proyecto",
"development_or_engineering": "Desarrollo / Ingeniería",
"founder_or_executive": "Fundador / Ejecutivo",
"freelancer_or_consultant": "Freelancer / Consultor",
"marketing_or_growth": "Marketing / Crecimiento",
"sales_or_business_development": "Ventas / Desarrollo de Negocios",
"support_or_operations": "Soporte / Operaciones",
"student_or_professor": "Estudiante / Profesor",
"human_or_resources": "Recursos Humanos",
"other": "Otro"
},

"importer": {
"github": {
"title": "Github",
"description": "Importar problemas desde repositorios de GitHub y sincronizarlos."
},
"jira": {
"title": "Jira",
"description": "Importar problemas y épicas desde proyectos de Jira."
}
},

"exporter": {
"csv": {
"title": "CSV",
"description": "Exportar problemas a un archivo CSV."
},
"xlsx": {
"title": "Excel",
"description": "Exportar problemas a un archivo Excel."
},
"json": {
"title": "JSON",
"description": "Exportar problemas a un archivo JSON."
}
},

"default_global_view": {
"all_issues": "Todos los problemas",
"assigned": "Asignados",
"created": "Creados",
"subscribed": "Suscritos"
}
}
Loading
Loading