mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: handled drag and drop issue, gantt hover issue for issue peek overview (#2660)
This commit is contained in:
parent
3a07bb6060
commit
0c8a867565
@ -1,4 +1,4 @@
|
|||||||
import { FC, ReactNode } from "react";
|
import { FC, Fragment, ReactNode } from "react";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
@ -112,6 +112,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
|||||||
else await issueStore.deleteIssue(workspaceSlug, projectId, issue!);
|
else await issueStore.deleteIssue(workspaceSlug, projectId, issue!);
|
||||||
const { query } = router;
|
const { query } = router;
|
||||||
if (query.peekIssueId) {
|
if (query.peekIssueId) {
|
||||||
|
issueDetailStore.setPeekId(null);
|
||||||
delete query.peekIssueId;
|
delete query.peekIssueId;
|
||||||
router.push({
|
router.push({
|
||||||
pathname: router.pathname,
|
pathname: router.pathname,
|
||||||
@ -123,6 +124,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
|||||||
const userRole = userStore.currentProjectRole ?? 5;
|
const userRole = userStore.currentProjectRole ?? 5;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<Fragment>
|
||||||
<IssueView
|
<IssueView
|
||||||
workspaceSlug={workspaceSlug}
|
workspaceSlug={workspaceSlug}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
@ -148,5 +150,6 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
|||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</IssueView>
|
</IssueView>
|
||||||
|
</Fragment>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -97,6 +97,7 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||||||
|
|
||||||
const updateRoutePeekId = () => {
|
const updateRoutePeekId = () => {
|
||||||
if (issueId != peekIssueId) {
|
if (issueId != peekIssueId) {
|
||||||
|
issueDetailStore.setPeekId(issueId);
|
||||||
const { query } = router;
|
const { query } = router;
|
||||||
router.push({
|
router.push({
|
||||||
pathname: router.pathname,
|
pathname: router.pathname,
|
||||||
@ -107,6 +108,7 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||||||
const removeRoutePeekId = () => {
|
const removeRoutePeekId = () => {
|
||||||
const { query } = router;
|
const { query } = router;
|
||||||
if (query.peekIssueId) {
|
if (query.peekIssueId) {
|
||||||
|
issueDetailStore.setPeekId(null);
|
||||||
delete query.peekIssueId;
|
delete query.peekIssueId;
|
||||||
router.push({
|
router.push({
|
||||||
pathname: router.pathname,
|
pathname: router.pathname,
|
||||||
@ -292,8 +294,6 @@ export const IssueView: FC<IIssueView> = observer((props) => {
|
|||||||
issueReactionRemove={issueReactionRemove}
|
issueReactionRemove={issueReactionRemove}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="border-t border-custom-border-400" />
|
|
||||||
|
|
||||||
<IssueComment
|
<IssueComment
|
||||||
workspaceSlug={workspaceSlug}
|
workspaceSlug={workspaceSlug}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
|
@ -44,6 +44,7 @@ export class CycleIssueKanBanViewStore implements ICycleIssueKanBanViewStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get canUserDragDrop() {
|
get canUserDragDrop() {
|
||||||
|
if (this.rootStore.issueDetail.peekId) return false;
|
||||||
if (
|
if (
|
||||||
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
|
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
|
||||||
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
|
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
|
||||||
|
@ -44,6 +44,7 @@ export class IssueKanBanViewStore implements IIssueKanBanViewStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get canUserDragDrop() {
|
get canUserDragDrop() {
|
||||||
|
if (this.rootStore.issueDetail.peekId) return false;
|
||||||
if (
|
if (
|
||||||
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
|
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
|
||||||
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
|
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
|
||||||
|
@ -44,6 +44,7 @@ export class ModuleIssueKanBanViewStore implements IModuleIssueKanBanViewStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get canUserDragDrop() {
|
get canUserDragDrop() {
|
||||||
|
if (this.rootStore.issueDetail.peekId) return false;
|
||||||
if (
|
if (
|
||||||
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
|
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
|
||||||
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
|
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
|
||||||
|
Loading…
Reference in New Issue
Block a user