mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
479c145b02
* refactor: filters and display filters to accept handlers as props * refactor: filters and display filters folder structure * refactor: change issue layout options constant structure * chore: display filters validations * chore: view less filters functionality * fix: display filters validation * refactor: wrap functions around useCallback * chore: start and target date filter options added * refactor: query params generator function * fix: query params generator function
107 lines
2.4 KiB
TypeScript
107 lines
2.4 KiB
TypeScript
export type TIssueLayouts = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt_chart";
|
|
|
|
export type TIssueGroupByOptions =
|
|
| "state"
|
|
| "priority"
|
|
| "labels"
|
|
| "created_by"
|
|
| "state_detail.group"
|
|
| "project"
|
|
| "assignees"
|
|
| null;
|
|
|
|
export type TIssueOrderByOptions =
|
|
| "-created_at"
|
|
| "-updated_at"
|
|
| "priority"
|
|
| "sort_order"
|
|
| "state__name"
|
|
| "-state__name"
|
|
| "assignees__name"
|
|
| "-assignees__name"
|
|
| "labels__name"
|
|
| "-labels__name"
|
|
| "target_date"
|
|
| "-target_date"
|
|
| "estimate__point"
|
|
| "-estimate__point"
|
|
| "start_date"
|
|
| "-start_date";
|
|
|
|
export type TIssueTypeFilters = "active" | "backlog" | null;
|
|
|
|
export type TIssueExtraOptions = "show_empty_groups" | "sub_issue";
|
|
|
|
export type TIssueParams =
|
|
| "priority"
|
|
| "state_group"
|
|
| "state"
|
|
| "assignees"
|
|
| "created_by"
|
|
| "subscriber"
|
|
| "labels"
|
|
| "start_date"
|
|
| "target_date"
|
|
| "group_by"
|
|
| "sub_group_by"
|
|
| "order_by"
|
|
| "type"
|
|
| "sub_issue"
|
|
| "show_empty_groups"
|
|
| "start_target_date";
|
|
|
|
export type TCalendarLayouts = "month" | "week";
|
|
|
|
export interface IIssueFilterOptions {
|
|
assignees?: string[] | null;
|
|
created_by?: string[] | null;
|
|
labels?: string[] | null;
|
|
priority?: string[] | null;
|
|
start_date?: string[] | null;
|
|
state?: string[] | null;
|
|
state_group?: TStateGroups[] | null;
|
|
subscriber?: string[] | null;
|
|
target_date?: string[] | null;
|
|
}
|
|
|
|
export interface IIssueDisplayFilterOptions {
|
|
calendar?: {
|
|
show_weekends?: boolean;
|
|
layout?: TCalendarLayouts;
|
|
};
|
|
group_by?: TIssueGroupByOptions;
|
|
sub_group_by?: TIssueGroupByOptions;
|
|
layout?: TIssueLayouts;
|
|
order_by?: TIssueOrderByOptions;
|
|
show_empty_groups?: boolean;
|
|
start_target_date?: boolean;
|
|
sub_issue?: boolean;
|
|
type?: TIssueTypeFilters;
|
|
}
|
|
export interface IIssueDisplayProperties {
|
|
assignee: boolean;
|
|
start_date: boolean;
|
|
due_date: boolean;
|
|
labels: boolean;
|
|
key: boolean;
|
|
priority: boolean;
|
|
state: boolean;
|
|
sub_issue_count: boolean;
|
|
link: boolean;
|
|
attachment_count: boolean;
|
|
estimate: boolean;
|
|
created_on: boolean;
|
|
updated_on: boolean;
|
|
}
|
|
|
|
export interface IProjectViewProps {
|
|
display_filters: IIssueDisplayFilterOptions | undefined;
|
|
filters: IIssueFilterOptions;
|
|
}
|
|
|
|
export interface IWorkspaceViewProps {
|
|
display_filters: IIssueDisplayFilterOptions | undefined;
|
|
display_properties: Properties | undefined;
|
|
filters: IIssueFilterOptions;
|
|
}
|