Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 29 additions & 26 deletions web/components/issues/issue-peek-overview/root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC, ReactNode } from "react";
import { FC, Fragment, ReactNode } from "react";
import { useRouter } from "next/router";
import useSWR from "swr";
import { observer } from "mobx-react-lite";
Expand Down Expand Up @@ -112,6 +112,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
else await issueStore.deleteIssue(workspaceSlug, projectId, issue!);
const { query } = router;
if (query.peekIssueId) {
issueDetailStore.setPeekId(null);
delete query.peekIssueId;
router.push({
pathname: router.pathname,
Expand All @@ -123,30 +124,32 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
const userRole = userStore.currentProjectRole ?? 5;

return (
<IssueView
workspaceSlug={workspaceSlug}
projectId={projectId}
issueId={issueId}
issue={issue}
isLoading={isLoading}
isArchived={isArchived}
handleCopyText={handleCopyText}
redirectToIssueDetail={redirectToIssueDetail}
issueUpdate={issueUpdate}
issueReactionCreate={issueReactionCreate}
issueReactionRemove={issueReactionRemove}
issueCommentCreate={issueCommentCreate}
issueCommentUpdate={issueCommentUpdate}
issueCommentRemove={issueCommentRemove}
issueCommentReactionCreate={issueCommentReactionCreate}
issueCommentReactionRemove={issueCommentReactionRemove}
issueSubscriptionCreate={issueSubscriptionCreate}
issueSubscriptionRemove={issueSubscriptionRemove}
handleDeleteIssue={handleDeleteIssue}
disableUserActions={[5, 10].includes(userRole)}
showCommentAccessSpecifier={projectStore.currentProjectDetails?.is_deployed}
>
{children}
</IssueView>
<Fragment>
<IssueView
workspaceSlug={workspaceSlug}
projectId={projectId}
issueId={issueId}
issue={issue}
isLoading={isLoading}
isArchived={isArchived}
handleCopyText={handleCopyText}
redirectToIssueDetail={redirectToIssueDetail}
issueUpdate={issueUpdate}
issueReactionCreate={issueReactionCreate}
issueReactionRemove={issueReactionRemove}
issueCommentCreate={issueCommentCreate}
issueCommentUpdate={issueCommentUpdate}
issueCommentRemove={issueCommentRemove}
issueCommentReactionCreate={issueCommentReactionCreate}
issueCommentReactionRemove={issueCommentReactionRemove}
issueSubscriptionCreate={issueSubscriptionCreate}
issueSubscriptionRemove={issueSubscriptionRemove}
handleDeleteIssue={handleDeleteIssue}
disableUserActions={[5, 10].includes(userRole)}
showCommentAccessSpecifier={projectStore.currentProjectDetails?.is_deployed}
>
{children}
</IssueView>
</Fragment>
);
});
4 changes: 2 additions & 2 deletions web/components/issues/issue-peek-overview/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const IssueView: FC<IIssueView> = observer((props) => {

const updateRoutePeekId = () => {
if (issueId != peekIssueId) {
issueDetailStore.setPeekId(issueId);
const { query } = router;
router.push({
pathname: router.pathname,
Expand All @@ -107,6 +108,7 @@ export const IssueView: FC<IIssueView> = observer((props) => {
const removeRoutePeekId = () => {
const { query } = router;
if (query.peekIssueId) {
issueDetailStore.setPeekId(null);
delete query.peekIssueId;
router.push({
pathname: router.pathname,
Expand Down Expand Up @@ -292,8 +294,6 @@ export const IssueView: FC<IIssueView> = observer((props) => {
issueReactionRemove={issueReactionRemove}
/>

<div className="border-t border-custom-border-400" />

<IssueComment
workspaceSlug={workspaceSlug}
projectId={projectId}
Expand Down
1 change: 1 addition & 0 deletions web/store/cycle/cycle_issue_kanban_view.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class CycleIssueKanBanViewStore implements ICycleIssueKanBanViewStore {
}

get canUserDragDrop() {
if (this.rootStore.issueDetail.peekId) return false;
if (
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
Expand Down
1 change: 1 addition & 0 deletions web/store/issue/issue_kanban_view.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class IssueKanBanViewStore implements IIssueKanBanViewStore {
}

get canUserDragDrop() {
if (this.rootStore.issueDetail.peekId) return false;
if (
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
Expand Down
1 change: 1 addition & 0 deletions web/store/module/module_issue_kanban_view.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class ModuleIssueKanBanViewStore implements IModuleIssueKanBanViewStore {
}

get canUserDragDrop() {
if (this.rootStore.issueDetail.peekId) return false;
if (
this.rootStore?.issueFilter?.userDisplayFilters?.order_by &&
this.rootStore?.issueFilter?.userDisplayFilters?.order_by === "sort_order" &&
Expand Down