mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 14:01:45 +02:00
* dev: setup basic store structure for issue types and custom properties. * dev: create issue types and add back migration for existing issues * dev: fix save * dev: fix migration for issue types * dev: create page version * dev: add page versioning migrations * dev: create page version endpoints * WIP: issue types. * chore: update issue types & properties store structure. * dev: add is_default value in issue type * dev: implement create, update, list and delete for issue-types. (#584) * dev: implement create, update, list and delete for issue-types. * dev: issue properties root. * dev: rename model * dev: create issue property and related models * dev: create issue property and issue types api * dev: issue type endpoint * dev: add issue type feature flagging * dev: issue property options * dev: issue properties creation and updation. * dev: add fields to project and issue types * dev: issue property and issue types api * dev: update issue type migrations * dev: issue types enabled * dev: update folder structure and move default issue type validation * dev: update values endpoint to return arrays * dev: rename value to values * chore: API integration for issue types and properties settings. * dev: rename urls * dev: issue type values endpoint * dev: remove print logs * dev: create issue property activity task * dev: return dictionary on issue values list endpoint * fix: boolean types * dev: add issue type validation * fix: issue create with different type * dev: issue types settings and user side flow. * chore: add option to enable/ disable issue property. * chore: fix property attribute popover position * chore: add validation to remove default value for mandatory properties. * chore: add validation to disable editing property core attributes. * allow editing if no issue is attached to the issue type. * chore: update issue type loader logic. * chore:minor UI & UX improvements. * chore: add option to enable/ disable issue types. * chore: add property title dropdown to allow adding description while creating property. * chore: minor code restructuring. * chore: add `scrollIntoView` when adding new properties. * chore: update enable/ disable issue type logic. * chore: add property type icon. * chore: improve property values loader. * chore: add validation to only show issue types in projects where it's enabled. * fix: quick add. * chore: create/ update issue modal components restructuring. * fix: global issue update through modal on inital load. * chore: add validations to remove `default_value` when `is_required` is set to True. * fix: build errors. * chore: create/ update draft issue with custom properties. * chore: add logic to get issue property values while creating issue copy. * dev: remove default issue type creation * dev: issue property activity endpoint * chore: set property `is_active` to false by default. * chore: minor improvements * chore: refactor logic to render display name in member picker. * chore:minor improvement to issue types loader and data fetching. * fix: type declarations. * chore: add property options for dropdown property type. (#737) * chore: add property options for dropdown property type. * chore: components restructuring. * improvement: issue types and properties (#742) * chore: add property options for dropdown property type. * chore: components restructuring. * chore: UI improvements and minor fixes. * chore: issue types and properties store refactor. * chore: improve UX copy of properties and attributes. * chore: improve enable/ disable issue type flow. * chore: rename `Issue Extra Property` to `Issue Additional Property` * chore: update `handleCreateDataUpdate` to `updateCreateListData`. --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
121 lines
4.7 KiB
TypeScript
121 lines
4.7 KiB
TypeScript
// icons
|
|
import { Globe2, Lock, LucideIcon } from "lucide-react";
|
|
import { TProjectAppliedDisplayFilterKeys, TProjectOrderByOptions } from "@plane/types";
|
|
|
|
export enum EUserProjectRoles {
|
|
GUEST = 5,
|
|
VIEWER = 10,
|
|
MEMBER = 15,
|
|
ADMIN = 20,
|
|
}
|
|
|
|
export const NETWORK_CHOICES: {
|
|
key: 0 | 2;
|
|
label: string;
|
|
description: string;
|
|
icon: LucideIcon;
|
|
}[] = [
|
|
{
|
|
key: 0,
|
|
label: "Private",
|
|
description: "Accessible only by invite",
|
|
icon: Lock,
|
|
},
|
|
{
|
|
key: 2,
|
|
label: "Public",
|
|
description: "Anyone in the workspace can join",
|
|
icon: Globe2,
|
|
},
|
|
];
|
|
|
|
export const GROUP_CHOICES = {
|
|
backlog: "Backlog",
|
|
unstarted: "Unstarted",
|
|
started: "Started",
|
|
completed: "Completed",
|
|
cancelled: "Cancelled",
|
|
};
|
|
|
|
export const PROJECT_AUTOMATION_MONTHS = [
|
|
{ label: "1 month", value: 1 },
|
|
{ label: "3 months", value: 3 },
|
|
{ label: "6 months", value: 6 },
|
|
{ label: "9 months", value: 9 },
|
|
{ label: "12 months", value: 12 },
|
|
];
|
|
|
|
export const PROJECT_UNSPLASH_COVERS = [
|
|
"https://images.unsplash.com/photo-1531045535792-b515d59c3d1f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1693027407934-e3aa8a54c7ae?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1518837695005-2083093ee35b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1464925257126-6450e871c667?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1606768666853-403c90a981ad?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1627556592933-ffe99c1cd9eb?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1643330683233-ff2ac89b002c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1542202229-7d93c33f5d07?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1511497584788-876760111969?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1475738972911-5b44ce984c42?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1418065460487-3e41a6c84dc5?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1673393058808-50e9baaf4d2c?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1696643830146-44a8755f1905?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1693868769698-6c7440636a09?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1691230995681-480d86cbc135?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
"https://images.unsplash.com/photo-1675351066828-6fc770b90dd2?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
|
];
|
|
|
|
export const PROJECT_ORDER_BY_OPTIONS: {
|
|
key: TProjectOrderByOptions;
|
|
label: string;
|
|
}[] = [
|
|
{
|
|
key: "sort_order",
|
|
label: "Manual",
|
|
},
|
|
{
|
|
key: "name",
|
|
label: "Name",
|
|
},
|
|
{
|
|
key: "created_at",
|
|
label: "Created date",
|
|
},
|
|
{
|
|
key: "members_length",
|
|
label: "Number of members",
|
|
},
|
|
];
|
|
|
|
export const PROJECT_DISPLAY_FILTER_OPTIONS: {
|
|
key: TProjectAppliedDisplayFilterKeys;
|
|
label: string;
|
|
}[] = [
|
|
{
|
|
key: "my_projects",
|
|
label: "My projects",
|
|
},
|
|
{
|
|
key: "archived_projects",
|
|
label: "Archived",
|
|
},
|
|
];
|
|
|
|
export const PROJECT_ERROR_MESSAGES = {
|
|
permissionError: {
|
|
title: "You don't have permission to perform this action.",
|
|
message: undefined,
|
|
},
|
|
cycleDeleteError: {
|
|
title: "Error",
|
|
message: "Failed to delete project",
|
|
},
|
|
moduleDeleteError: {
|
|
title: "Error",
|
|
message: "Failed to delete module",
|
|
},
|
|
issueDeleteError: {
|
|
title: "Error",
|
|
message: "Failed to delete issue",
|
|
},
|
|
};
|