mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: renamed gantt key to gantt_chart
This commit is contained in:
parent
66022ea478
commit
28ce96aaca
@ -36,7 +36,7 @@ export const LayoutSelection = observer(() => {
|
|||||||
icon: Columns,
|
icon: Columns,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "gantt",
|
key: "gantt_chart",
|
||||||
title: "Gantt",
|
title: "Gantt",
|
||||||
icon: GanttChart,
|
icon: GanttChart,
|
||||||
},
|
},
|
||||||
|
@ -1,14 +1,36 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
// mobx react lite
|
// components
|
||||||
import { observer } from "mobx-react-lite";
|
import { IssueKanBanViewRoot } from "./kanban";
|
||||||
// mobx store
|
import { LayoutSelection } from "./layout-selection";
|
||||||
import { RootStore } from "store/root";
|
import { IssueDropdown } from "./helpers/dropdown";
|
||||||
import { TIssueLayouts } from "store/issue-views/issue_filters";
|
import { FilterSelection } from "./filters";
|
||||||
import { useMobxStore } from "lib/mobx/store-provider";
|
import { DisplayFiltersSelection } from "./display-filters";
|
||||||
|
|
||||||
export const IssuesRoot = observer(() => {
|
export const IssuesRoot = () => {
|
||||||
const store: RootStore = useMobxStore();
|
console.log("issue root");
|
||||||
const { issueFilters: issueFilterStore, issueView: issueStore } = store;
|
|
||||||
|
|
||||||
return <div>issue root</div>;
|
return (
|
||||||
});
|
<div className="w-full h-full relative flex flex-col overflow-hidden">
|
||||||
|
<div className="flex-shrink-0 h-[60px] border-b border-gray-200">
|
||||||
|
<div className="w-full h-full p-2 px-5 relative flex justify-between items-center gap-2">
|
||||||
|
<div>
|
||||||
|
<div>Filter Header</div>
|
||||||
|
</div>
|
||||||
|
<div className="relative flex items-center gap-2">
|
||||||
|
<IssueDropdown title={"Filters"}>
|
||||||
|
<FilterSelection />
|
||||||
|
</IssueDropdown>
|
||||||
|
<IssueDropdown title={"View"}>
|
||||||
|
<DisplayFiltersSelection />
|
||||||
|
</IssueDropdown>
|
||||||
|
<LayoutSelection />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="flex-shrink-0 border-b border-gray-200">Hello</div>
|
||||||
|
<div className="w-full h-full relative overflow-hidden">
|
||||||
|
<IssueKanBanViewRoot />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
// components
|
|
||||||
import { IssueKanBanViewRoot } from "components/issue-layouts/kanban";
|
|
||||||
import { LayoutSelection } from "components/issue-layouts/layout-selection";
|
|
||||||
// issue dropdowns
|
|
||||||
import { IssueDropdown } from "components/issue-layouts/helpers/dropdown";
|
|
||||||
// filter components
|
|
||||||
import { FilterSelection } from "components/issue-layouts/filters";
|
|
||||||
import { DisplayFiltersSelection } from "components/issue-layouts/display-filters";
|
|
||||||
// mobx store
|
|
||||||
import { useMobxStore } from "lib/mobx/store-provider";
|
|
||||||
import { RootStore } from "store/root";
|
|
||||||
|
|
||||||
const KanBanViewRoot = () => {
|
|
||||||
const workspaceSlug: string = "plane-demo";
|
|
||||||
const projectSlug: string = "08d59d96-9dfb-40e5-aa30-ecc66319450f";
|
|
||||||
const moduleSlug: string = "05613afc-29ea-4fd8-a025-a3cdfed209d1";
|
|
||||||
const cycleSlug: string = "1f66a767-00d1-422c-8f8f-6925282b7249";
|
|
||||||
const viewSlug: string = "64e6ecca-80ca-4f7c-8476-d650fca9d5b9";
|
|
||||||
|
|
||||||
const store: RootStore = useMobxStore();
|
|
||||||
const { issueFilters: issueFilterStore, issueView: issueViewStore } = store;
|
|
||||||
|
|
||||||
React.useEffect(() => {
|
|
||||||
const init = async () => {
|
|
||||||
console.log("started--->");
|
|
||||||
// my issues under a workspace
|
|
||||||
// await issueViewStore.getMyIssuesAsync(workspaceSlug);
|
|
||||||
|
|
||||||
// project issues under and workspace and project
|
|
||||||
await issueViewStore.getProjectIssuesAsync(workspaceSlug, projectSlug);
|
|
||||||
|
|
||||||
// module issues under and workspace and project
|
|
||||||
// await issueViewStore.getIssuesForModulesAsync(workspaceSlug, projectSlug, moduleSlug);
|
|
||||||
|
|
||||||
// cycle issues under and workspace and project
|
|
||||||
// await issueViewStore.getIssuesForCyclesAsync(workspaceSlug, projectSlug, cycleSlug);
|
|
||||||
|
|
||||||
// cycle issues under and workspace and project
|
|
||||||
// await issueViewStore.getIssuesForViewsAsync(workspaceSlug, projectSlug, viewSlug);
|
|
||||||
console.log("ended--->");
|
|
||||||
};
|
|
||||||
|
|
||||||
init();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="w-screen min-h-[600px] h-screen">
|
|
||||||
<div className="w-full h-full relative flex flex-col overflow-hidden">
|
|
||||||
<div className="flex-shrink-0 h-[60px] border-b border-gray-200">
|
|
||||||
<div className="w-full h-full p-2 px-5 relative flex justify-between items-center gap-2">
|
|
||||||
<div>
|
|
||||||
<div>Filter Header</div>
|
|
||||||
</div>
|
|
||||||
<div className="relative flex items-center gap-2">
|
|
||||||
<IssueDropdown title={"Filters"}>
|
|
||||||
<FilterSelection />
|
|
||||||
</IssueDropdown>
|
|
||||||
<IssueDropdown title={"View"}>
|
|
||||||
<DisplayFiltersSelection />
|
|
||||||
</IssueDropdown>
|
|
||||||
<LayoutSelection />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 border-b border-gray-200">Hello</div>
|
|
||||||
<div className="w-full h-full relative overflow-hidden">
|
|
||||||
<IssueKanBanViewRoot />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default KanBanViewRoot;
|
|
@ -0,0 +1,36 @@
|
|||||||
|
import React from "react";
|
||||||
|
// next imports
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
// components
|
||||||
|
import { IssuesRoot } from "components/issue-layouts/root";
|
||||||
|
// mobx store
|
||||||
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
|
import { RootStore } from "store/root";
|
||||||
|
|
||||||
|
const KanBanViewRoot = () => {
|
||||||
|
const router = useRouter();
|
||||||
|
const { workspace_slug, project_slug, cycle_slug } = router.query as {
|
||||||
|
workspace_slug: string;
|
||||||
|
project_slug: string;
|
||||||
|
cycle_slug: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const store: RootStore = useMobxStore();
|
||||||
|
const { issueView: issueViewStore } = store;
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
console.log("request init--->");
|
||||||
|
const init = async () =>
|
||||||
|
await issueViewStore.getIssuesForCyclesAsync(workspace_slug, project_slug, cycle_slug);
|
||||||
|
if (workspace_slug && project_slug && cycle_slug) init();
|
||||||
|
console.log("request completed--->");
|
||||||
|
}, [workspace_slug, project_slug, cycle_slug, issueViewStore]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="w-screen min-h-[600px] h-screen">
|
||||||
|
<IssuesRoot />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default KanBanViewRoot;
|
35
web/pages/m-store/[workspace_slug]/[project_slug]/issues.tsx
Normal file
35
web/pages/m-store/[workspace_slug]/[project_slug]/issues.tsx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import React from "react";
|
||||||
|
// next imports
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
// components
|
||||||
|
import { IssuesRoot } from "components/issue-layouts/root";
|
||||||
|
// mobx store
|
||||||
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
|
import { RootStore } from "store/root";
|
||||||
|
|
||||||
|
const KanBanViewRoot = () => {
|
||||||
|
const router = useRouter();
|
||||||
|
const { workspace_slug, project_slug } = router.query as {
|
||||||
|
workspace_slug: string;
|
||||||
|
project_slug: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const store: RootStore = useMobxStore();
|
||||||
|
const { issueView: issueViewStore } = store;
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
console.log("request init--->");
|
||||||
|
const init = async () =>
|
||||||
|
await issueViewStore.getProjectIssuesAsync(workspace_slug, project_slug);
|
||||||
|
if (workspace_slug && project_slug) init();
|
||||||
|
console.log("request completed--->");
|
||||||
|
}, [workspace_slug, project_slug, issueViewStore]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="w-screen min-h-[600px] h-screen">
|
||||||
|
<IssuesRoot />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default KanBanViewRoot;
|
@ -0,0 +1,36 @@
|
|||||||
|
import React from "react";
|
||||||
|
// next imports
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
// components
|
||||||
|
import { IssuesRoot } from "components/issue-layouts/root";
|
||||||
|
// mobx store
|
||||||
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
|
import { RootStore } from "store/root";
|
||||||
|
|
||||||
|
const KanBanViewRoot = () => {
|
||||||
|
const router = useRouter();
|
||||||
|
const { workspace_slug, project_slug, module_slug } = router.query as {
|
||||||
|
workspace_slug: string;
|
||||||
|
project_slug: string;
|
||||||
|
module_slug: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const store: RootStore = useMobxStore();
|
||||||
|
const { issueView: issueViewStore } = store;
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
console.log("request init--->");
|
||||||
|
const init = async () =>
|
||||||
|
await issueViewStore.getIssuesForModulesAsync(workspace_slug, project_slug, module_slug);
|
||||||
|
if (workspace_slug && project_slug && module_slug) init();
|
||||||
|
console.log("request completed--->");
|
||||||
|
}, [workspace_slug, project_slug, module_slug, issueViewStore]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="w-screen min-h-[600px] h-screen">
|
||||||
|
<IssuesRoot />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default KanBanViewRoot;
|
@ -0,0 +1,36 @@
|
|||||||
|
import React from "react";
|
||||||
|
// next imports
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
// components
|
||||||
|
import { IssuesRoot } from "components/issue-layouts/root";
|
||||||
|
// mobx store
|
||||||
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
|
import { RootStore } from "store/root";
|
||||||
|
|
||||||
|
const KanBanViewRoot = () => {
|
||||||
|
const router = useRouter();
|
||||||
|
const { workspace_slug, project_slug, view_slug } = router.query as {
|
||||||
|
workspace_slug: string;
|
||||||
|
project_slug: string;
|
||||||
|
view_slug: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const store: RootStore = useMobxStore();
|
||||||
|
const { issueView: issueViewStore } = store;
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
console.log("request init--->");
|
||||||
|
const init = async () =>
|
||||||
|
await issueViewStore.getIssuesForViewsAsync(workspace_slug, project_slug, view_slug);
|
||||||
|
if (workspace_slug && project_slug && view_slug) init();
|
||||||
|
console.log("request completed--->");
|
||||||
|
}, [workspace_slug, project_slug, view_slug, issueViewStore]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="w-screen min-h-[600px] h-screen">
|
||||||
|
<IssuesRoot />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default KanBanViewRoot;
|
31
web/pages/m-store/[workspace_slug]/my-issues.tsx
Normal file
31
web/pages/m-store/[workspace_slug]/my-issues.tsx
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import React from "react";
|
||||||
|
// next imports
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
// components
|
||||||
|
import { IssuesRoot } from "components/issue-layouts/root";
|
||||||
|
// mobx store
|
||||||
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
|
import { RootStore } from "store/root";
|
||||||
|
|
||||||
|
const KanBanViewRoot = () => {
|
||||||
|
const router = useRouter();
|
||||||
|
const { workspace_slug } = router.query as { workspace_slug: string };
|
||||||
|
|
||||||
|
const store: RootStore = useMobxStore();
|
||||||
|
const { issueView: issueViewStore } = store;
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
console.log("request init--->");
|
||||||
|
const init = async () => await issueViewStore.getMyIssuesAsync(workspace_slug);
|
||||||
|
if (workspace_slug) init();
|
||||||
|
console.log("request completed--->");
|
||||||
|
}, [workspace_slug, issueViewStore]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="w-screen min-h-[600px] h-screen">
|
||||||
|
<IssuesRoot />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default KanBanViewRoot;
|
@ -18,7 +18,7 @@ export interface IIssuesLayout {
|
|||||||
kanban: IIssues;
|
kanban: IIssues;
|
||||||
calendar: IIssues;
|
calendar: IIssues;
|
||||||
spreadsheet: IIssues;
|
spreadsheet: IIssues;
|
||||||
gantt: IIssues;
|
gantt_chart: IIssues;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IIssueState {
|
export interface IIssueState {
|
||||||
|
@ -108,21 +108,21 @@ export const issueFilterVisibilityData: any = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
others: {
|
others: {
|
||||||
layout: ["list", "kanban", "calendar", "spreadsheet", "gantt"],
|
layout: ["list", "kanban", "calendar", "spreadsheet", "gantt_chart"],
|
||||||
filters: ["priority", "state", "assignees", "created_by", "labels", "start_date", "due_date"],
|
filters: ["priority", "state", "assignees", "created_by", "labels", "start_date", "due_date"],
|
||||||
display_properties: {
|
display_properties: {
|
||||||
list: true,
|
list: true,
|
||||||
kanban: true,
|
kanban: true,
|
||||||
calendar: true,
|
calendar: true,
|
||||||
spreadsheet: true,
|
spreadsheet: true,
|
||||||
gantt: false,
|
gantt_chart: false,
|
||||||
},
|
},
|
||||||
display_filters: {
|
display_filters: {
|
||||||
list: ["group_by", "order_by", "issue_type", "sub_issue", "show_empty_groups"],
|
list: ["group_by", "order_by", "issue_type", "sub_issue", "show_empty_groups"],
|
||||||
kanban: ["group_by", "order_by", "issue_type", "sub_issue", "show_empty_groups"],
|
kanban: ["group_by", "order_by", "issue_type", "sub_issue", "show_empty_groups"],
|
||||||
calendar: ["issue_type"],
|
calendar: ["issue_type"],
|
||||||
spreadsheet: ["issue_type"],
|
spreadsheet: ["issue_type"],
|
||||||
gantt: ["order_by", "issue_type", "sub_issue"],
|
gantt_chart: ["order_by", "issue_type", "sub_issue"],
|
||||||
},
|
},
|
||||||
extra_options: {
|
extra_options: {
|
||||||
list: {
|
list: {
|
||||||
@ -141,7 +141,7 @@ export const issueFilterVisibilityData: any = {
|
|||||||
access: false,
|
access: false,
|
||||||
values: [],
|
values: [],
|
||||||
},
|
},
|
||||||
gantt: {
|
gantt_chart: {
|
||||||
access: true,
|
access: true,
|
||||||
values: ["sub_issue"],
|
values: ["sub_issue"],
|
||||||
},
|
},
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
} from "./issue_data";
|
} from "./issue_data";
|
||||||
|
|
||||||
export type TIssueViews = "my_issues" | "issues" | "modules" | "views" | "cycles";
|
export type TIssueViews = "my_issues" | "issues" | "modules" | "views" | "cycles";
|
||||||
export type TIssueLayouts = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt";
|
export type TIssueLayouts = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt_chart";
|
||||||
|
|
||||||
export interface IIssueFilter {
|
export interface IIssueFilter {
|
||||||
priority: string[] | undefined;
|
priority: string[] | undefined;
|
||||||
@ -758,7 +758,7 @@ class IssueFilterStore implements IIssueFilterStore {
|
|||||||
"type",
|
"type",
|
||||||
"sub_issues",
|
"sub_issues",
|
||||||
];
|
];
|
||||||
if (_layout === "gantt")
|
if (_layout === "gantt_chart")
|
||||||
filteredParams = [
|
filteredParams = [
|
||||||
"priority",
|
"priority",
|
||||||
"state",
|
"state",
|
||||||
|
Loading…
Reference in New Issue
Block a user