chore: workspace view display filters and properties , code refactor (#2295)

* chore: spreadsheet view context

* chore: spreadsheet context provider

* chore: spreadsheet view context

* chore: display filters and properties added in workspace view and code refactor

* fix: build error fix

* chore: set sub-issue display option to false for global views

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
Anmol Singh Bhatia
2023-09-28 20:34:57 +05:30
committed by GitHub
parent 4503810aeb
commit a048e513b7
48 changed files with 3119 additions and 2369 deletions

View File

@@ -1,3 +1,5 @@
import { Properties } from "./workspace";
export type TIssueViewOptions = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt_chart";
export type TIssueGroupByOptions =
@@ -12,19 +14,22 @@ export type TIssueGroupByOptions =
export type TIssueOrderByOptions =
| "-created_at"
| "created_at"
| "updated_at"
| "-updated_at"
| "priority"
| "-priority"
| "sort_order"
| "state__name"
| "-state__name"
| "assignees__name"
| "-assignees__name"
| "assignees__first_name"
| "-assignees__first_name"
| "labels__name"
| "-labels__name"
| "target_date"
| "-target_date"
| "estimate__point"
| "-estimate__point"
| "estimate_point"
| "-estimate_point"
| "start_date"
| "-start_date";
@@ -33,12 +38,11 @@ export interface IIssueFilterOptions {
created_by?: string[] | null;
labels?: string[] | null;
priority?: string[] | null;
start_date?: string[] | null;
start_date?: TStateGroups[] | null;
state?: string[] | null;
state_group?: string[] | null;
state_group?: TStateGroups[] | null;
subscriber?: string[] | null;
target_date?: string[] | null;
project?: string[] | null;
}
export interface IIssueDisplayFilterOptions {
@@ -51,13 +55,53 @@ export interface IIssueDisplayFilterOptions {
type?: "active" | "backlog" | null;
}
export interface IWorkspaceIssueFilterOptions {
assignees?: string[] | null;
created_by?: string[] | null;
labels?: string[] | null;
priority?: string[] | null;
state_group?: string[] | null;
subscriber?: string[] | null;
start_date?: string[] | null;
target_date?: string[] | null;
project?: string[] | null;
}
export interface IWorkspaceGlobalViewDisplayFilterOptions {
order_by?: string | undefined;
type?: "active" | "backlog" | null;
sub_issue?: boolean;
layout?: TIssueViewOptions;
}
export interface IWorkspaceViewIssuesParams {
assignees?: string | undefined;
created_by?: string | undefined;
labels?: string | undefined;
priority?: string | undefined;
start_date?: string | undefined;
state?: string | undefined;
state_group?: string | undefined;
subscriber?: string | undefined;
target_date?: string | undefined;
project?: string | undefined;
order_by?: string | undefined;
type?: "active" | "backlog" | undefined;
sub_issue?: boolean;
}
export interface IProjectViewProps {
display_filters: IIssueDisplayFilterOptions | undefined;
filters: IIssueFilterOptions;
}
export interface IWorkspaceViewProps {
display_filters: IIssueDisplayFilterOptions | undefined;
display_properties: Properties | undefined;
filters: IIssueFilterOptions;
display_filters: IIssueDisplayFilterOptions | undefined;
display_properties: Properties;
}
export interface IWorkspaceGlobalViewProps {
filters: IWorkspaceIssueFilterOptions;
display_filters: IWorkspaceIssueDisplayFilterOptions | undefined;
display_properties: Properties | undefined;
}

12
web/types/views.d.ts vendored
View File

@@ -1,5 +1,3 @@
import { IIssueFilterOptions } from "./view-props";
export interface IView {
id: string;
access: string;
@@ -10,15 +8,10 @@ export interface IView {
updated_by: string;
name: string;
description: string;
query: IIssueFilterOptions;
query_data: IIssueFilterOptions;
query: IQuery;
query_data: IQuery;
project: string;
workspace: string;
workspace_detail: {
id: string;
name: string;
slug: string;
};
}
export interface IQuery {
@@ -30,5 +23,4 @@ export interface IQuery {
start_date: string[] | null;
target_date: string[] | null;
type: "active" | "backlog" | null;
project: string[] | null;
}

22
web/types/workspace-views.d.ts vendored Normal file
View File

@@ -0,0 +1,22 @@
import { IWorkspaceGlobalViewProps } from "./view-props";
export interface IWorkspaceView {
id: string;
access: string;
created_at: Date;
updated_at: Date;
is_favorite: boolean;
created_by: string;
updated_by: string;
name: string;
description: string;
query: IWorkspaceGlobalViewProps;
query_data: IWorkspaceGlobalViewProps;
project: string;
workspace: string;
workspace_detail?: {
id: string;
name: string;
slug: string;
};
}