mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
5e2d93df52
* chore: remove debounce logic to fix create/ update view modal bugs. * fix: bug in delete views not mutating the store. * chore: replace `Project Empty State` with `Project Views Empty State`. * chore: add issue peek overview. * refactor: issue update, delete actions for project views layout. fix: issue update and delete action throwing error bug. fix: issue quick add throwing error bug.
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { useRouter } from "next/router";
|
|
import { observer } from "mobx-react-lite";
|
|
// hooks
|
|
import { useIssues } from "hooks/store";
|
|
// components
|
|
import { BaseGanttRoot } from "./base-gantt-root";
|
|
// constants
|
|
import { EIssuesStoreType } from "constants/issue";
|
|
// types
|
|
import { EIssueActions } from "../types";
|
|
import { TIssue } from "@plane/types";
|
|
|
|
export interface IViewGanttLayout {
|
|
issueActions: {
|
|
[EIssueActions.DELETE]: (issue: TIssue) => Promise<void>;
|
|
[EIssueActions.UPDATE]?: (issue: TIssue) => Promise<void>;
|
|
[EIssueActions.REMOVE]?: (issue: TIssue) => Promise<void>;
|
|
};
|
|
}
|
|
|
|
export const ProjectViewGanttLayout: React.FC<IViewGanttLayout> = observer((props) => {
|
|
const { issueActions } = props;
|
|
// store
|
|
const { issues, issuesFilter } = useIssues(EIssuesStoreType.PROJECT_VIEW);
|
|
// router
|
|
const router = useRouter();
|
|
const { viewId } = router.query;
|
|
|
|
return (
|
|
<BaseGanttRoot
|
|
issueFiltersStore={issuesFilter}
|
|
issueStore={issues}
|
|
issueActions={issueActions}
|
|
viewId={viewId?.toString()}
|
|
/>
|
|
);
|
|
});
|