fix: handled drag and drop issue, gantt hover issue for issue peek overview (#2660)

This commit is contained in:
guru_sainath 2023-11-06 13:52:33 +05:30 committed by GitHub
parent 3a07bb6060
commit 0c8a867565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 28 deletions

View File

@ -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>
); );
}); });

View File

@ -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}

View File

@ -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" &&

View File

@ -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" &&

View File

@ -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" &&