2024-01-10 14:39:45 +00:00
|
|
|
import { FC, useMemo } from "react";
|
2024-03-06 13:09:14 +00:00
|
|
|
import { observer } from "mobx-react";
|
2024-01-10 14:39:45 +00:00
|
|
|
import { useRouter } from "next/router";
|
|
|
|
// components
|
2024-03-06 13:09:14 +00:00
|
|
|
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui";
|
|
|
|
import { EmptyState } from "components/common";
|
2024-01-16 07:16:03 +00:00
|
|
|
import { IssuePeekOverview } from "components/issues";
|
2024-03-06 13:09:14 +00:00
|
|
|
import { ISSUE_UPDATED, ISSUE_DELETED, ISSUE_ARCHIVED } from "constants/event-tracker";
|
|
|
|
import { EIssuesStoreType } from "constants/issue";
|
|
|
|
import { EUserProjectRoles } from "constants/project";
|
|
|
|
import { useApplication, useEventTracker, useIssueDetail, useIssues, useUser } from "hooks/store";
|
|
|
|
import emptyIssue from "public/empty-state/issue.svg";
|
|
|
|
import { TIssue } from "@plane/types";
|
2024-01-10 14:39:45 +00:00
|
|
|
import { IssueMainContent } from "./main-content";
|
|
|
|
import { IssueDetailsSidebar } from "./sidebar";
|
|
|
|
// ui
|
|
|
|
// images
|
|
|
|
// hooks
|
|
|
|
// types
|
2024-03-06 08:48:41 +00:00
|
|
|
// ui
|
2024-01-11 12:56:58 +00:00
|
|
|
// constants
|
2024-01-10 14:39:45 +00:00
|
|
|
|
|
|
|
export type TIssueOperations = {
|
2024-01-11 12:56:58 +00:00
|
|
|
fetch: (workspaceSlug: string, projectId: string, issueId: string) => Promise<void>;
|
2024-03-06 08:48:41 +00:00
|
|
|
update: (workspaceSlug: string, projectId: string, issueId: string, data: Partial<TIssue>) => Promise<void>;
|
2024-01-10 14:39:45 +00:00
|
|
|
remove: (workspaceSlug: string, projectId: string, issueId: string) => Promise<void>;
|
2024-02-28 11:23:26 +00:00
|
|
|
archive?: (workspaceSlug: string, projectId: string, issueId: string) => Promise<void>;
|
|
|
|
restore?: (workspaceSlug: string, projectId: string, issueId: string) => Promise<void>;
|
2024-01-24 15:03:54 +00:00
|
|
|
addIssueToCycle?: (workspaceSlug: string, projectId: string, cycleId: string, issueIds: string[]) => Promise<void>;
|
|
|
|
removeIssueFromCycle?: (workspaceSlug: string, projectId: string, cycleId: string, issueId: string) => Promise<void>;
|
2024-01-30 09:53:20 +00:00
|
|
|
addModulesToIssue?: (workspaceSlug: string, projectId: string, issueId: string, moduleIds: string[]) => Promise<void>;
|
2024-01-24 15:03:54 +00:00
|
|
|
removeIssueFromModule?: (
|
|
|
|
workspaceSlug: string,
|
|
|
|
projectId: string,
|
|
|
|
moduleId: string,
|
|
|
|
issueId: string
|
|
|
|
) => Promise<void>;
|
2024-01-30 09:53:20 +00:00
|
|
|
removeModulesFromIssue?: (
|
|
|
|
workspaceSlug: string,
|
|
|
|
projectId: string,
|
|
|
|
issueId: string,
|
|
|
|
moduleIds: string[]
|
|
|
|
) => Promise<void>;
|
2024-01-10 14:39:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export type TIssueDetailRoot = {
|
|
|
|
workspaceSlug: string;
|
|
|
|
projectId: string;
|
|
|
|
issueId: string;
|
|
|
|
is_archived?: boolean;
|
|
|
|
};
|
|
|
|
|
2024-02-12 11:31:24 +00:00
|
|
|
export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
|
2024-01-11 12:56:58 +00:00
|
|
|
const { workspaceSlug, projectId, issueId, is_archived = false } = props;
|
2024-01-10 14:39:45 +00:00
|
|
|
// router
|
|
|
|
const router = useRouter();
|
|
|
|
// hooks
|
|
|
|
const {
|
|
|
|
issue: { getIssueById },
|
2024-01-11 12:56:58 +00:00
|
|
|
fetchIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
updateIssue,
|
|
|
|
removeIssue,
|
2024-02-28 11:23:26 +00:00
|
|
|
archiveIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
addIssueToCycle,
|
|
|
|
removeIssueFromCycle,
|
2024-01-30 09:53:20 +00:00
|
|
|
addModulesToIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
removeIssueFromModule,
|
2024-01-30 09:53:20 +00:00
|
|
|
removeModulesFromIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
} = useIssueDetail();
|
2024-01-16 07:16:03 +00:00
|
|
|
const {
|
|
|
|
issues: { removeIssue: removeArchivedIssue },
|
|
|
|
} = useIssues(EIssuesStoreType.ARCHIVED);
|
2024-02-05 07:49:07 +00:00
|
|
|
const { captureIssueEvent } = useEventTracker();
|
2024-01-11 12:56:58 +00:00
|
|
|
const {
|
|
|
|
membership: { currentProjectRole },
|
|
|
|
} = useUser();
|
2024-02-12 11:31:24 +00:00
|
|
|
const { theme: themeStore } = useApplication();
|
2024-01-10 14:39:45 +00:00
|
|
|
|
|
|
|
const issueOperations: TIssueOperations = useMemo(
|
|
|
|
() => ({
|
2024-01-11 12:56:58 +00:00
|
|
|
fetch: async (workspaceSlug: string, projectId: string, issueId: string) => {
|
|
|
|
try {
|
|
|
|
await fetchIssue(workspaceSlug, projectId, issueId);
|
|
|
|
} catch (error) {
|
|
|
|
console.error("Error fetching the parent issue");
|
|
|
|
}
|
|
|
|
},
|
2024-03-06 08:48:41 +00:00
|
|
|
update: async (workspaceSlug: string, projectId: string, issueId: string, data: Partial<TIssue>) => {
|
2024-01-10 14:39:45 +00:00
|
|
|
try {
|
2024-02-22 15:28:34 +00:00
|
|
|
await updateIssue(workspaceSlug, projectId, issueId, data);
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-22 15:28:34 +00:00
|
|
|
payload: { ...data, issueId, state: "SUCCESS", element: "Issue detail page" },
|
2024-02-05 07:49:07 +00:00
|
|
|
updates: {
|
|
|
|
changed_property: Object.keys(data).join(","),
|
|
|
|
change_details: Object.values(data).join(","),
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
} catch (error) {
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { state: "FAILED", element: "Issue detail page" },
|
|
|
|
updates: {
|
|
|
|
changed_property: Object.keys(data).join(","),
|
|
|
|
change_details: Object.values(data).join(","),
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-03-06 08:48:41 +00:00
|
|
|
setToast({
|
2024-01-10 14:39:45 +00:00
|
|
|
title: "Issue update failed",
|
2024-03-06 08:48:41 +00:00
|
|
|
type: TOAST_TYPE.ERROR,
|
2024-01-10 14:39:45 +00:00
|
|
|
message: "Issue update failed",
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
remove: async (workspaceSlug: string, projectId: string, issueId: string) => {
|
|
|
|
try {
|
2024-03-06 13:09:14 +00:00
|
|
|
if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId);
|
|
|
|
else await removeIssue(workspaceSlug, projectId, issueId);
|
2024-03-06 08:48:41 +00:00
|
|
|
setToast({
|
2024-01-10 14:39:45 +00:00
|
|
|
title: "Issue deleted successfully",
|
2024-03-06 08:48:41 +00:00
|
|
|
type: TOAST_TYPE.SUCCESS,
|
2024-01-10 14:39:45 +00:00
|
|
|
message: "Issue deleted successfully",
|
|
|
|
});
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_DELETED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { id: issueId, state: "SUCCESS", element: "Issue detail page" },
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
} catch (error) {
|
2024-03-06 08:48:41 +00:00
|
|
|
setToast({
|
2024-01-10 14:39:45 +00:00
|
|
|
title: "Issue delete failed",
|
2024-03-06 08:48:41 +00:00
|
|
|
type: TOAST_TYPE.ERROR,
|
2024-01-10 14:39:45 +00:00
|
|
|
message: "Issue delete failed",
|
|
|
|
});
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_DELETED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { id: issueId, state: "FAILED", element: "Issue detail page" },
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
}
|
|
|
|
},
|
2024-02-28 11:23:26 +00:00
|
|
|
archive: async (workspaceSlug: string, projectId: string, issueId: string) => {
|
|
|
|
try {
|
|
|
|
await archiveIssue(workspaceSlug, projectId, issueId);
|
2024-03-06 08:48:41 +00:00
|
|
|
setToast({
|
|
|
|
type: TOAST_TYPE.SUCCESS,
|
2024-02-28 11:23:26 +00:00
|
|
|
title: "Success!",
|
|
|
|
message: "Issue archived successfully.",
|
|
|
|
});
|
|
|
|
captureIssueEvent({
|
|
|
|
eventName: ISSUE_ARCHIVED,
|
|
|
|
payload: { id: issueId, state: "SUCCESS", element: "Issue details page" },
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
|
|
|
} catch (error) {
|
2024-03-06 08:48:41 +00:00
|
|
|
setToast({
|
|
|
|
type: TOAST_TYPE.ERROR,
|
2024-02-28 11:23:26 +00:00
|
|
|
title: "Error!",
|
|
|
|
message: "Issue could not be archived. Please try again.",
|
|
|
|
});
|
|
|
|
captureIssueEvent({
|
|
|
|
eventName: ISSUE_ARCHIVED,
|
|
|
|
payload: { id: issueId, state: "FAILED", element: "Issue details page" },
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
2024-01-10 14:39:45 +00:00
|
|
|
addIssueToCycle: async (workspaceSlug: string, projectId: string, cycleId: string, issueIds: string[]) => {
|
|
|
|
try {
|
2024-03-06 08:48:41 +00:00
|
|
|
const addToCyclePromise = addIssueToCycle(workspaceSlug, projectId, cycleId, issueIds);
|
|
|
|
setPromiseToast(addToCyclePromise, {
|
|
|
|
loading: "Adding cycle to issue...",
|
|
|
|
success: {
|
|
|
|
title: "Success!",
|
|
|
|
message: () => "Cycle added to issue successfully",
|
|
|
|
},
|
|
|
|
error: {
|
|
|
|
title: "Error!",
|
|
|
|
message: () => "Cycle add to issue failed",
|
|
|
|
},
|
2024-01-27 09:50:36 +00:00
|
|
|
});
|
2024-03-06 08:48:41 +00:00
|
|
|
await addToCyclePromise;
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-21 11:26:02 +00:00
|
|
|
payload: { ...issueIds, state: "SUCCESS", element: "Issue detail page" },
|
2024-02-05 07:49:07 +00:00
|
|
|
updates: {
|
|
|
|
changed_property: "cycle_id",
|
|
|
|
change_details: cycleId,
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
} catch (error) {
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { state: "FAILED", element: "Issue detail page" },
|
|
|
|
updates: {
|
|
|
|
changed_property: "cycle_id",
|
|
|
|
change_details: cycleId,
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
removeIssueFromCycle: async (workspaceSlug: string, projectId: string, cycleId: string, issueId: string) => {
|
|
|
|
try {
|
2024-03-06 08:48:41 +00:00
|
|
|
const removeFromCyclePromise = removeIssueFromCycle(workspaceSlug, projectId, cycleId, issueId);
|
|
|
|
setPromiseToast(removeFromCyclePromise, {
|
|
|
|
loading: "Removing cycle from issue...",
|
|
|
|
success: {
|
|
|
|
title: "Success!",
|
|
|
|
message: () => "Cycle removed from issue successfully",
|
|
|
|
},
|
|
|
|
error: {
|
|
|
|
title: "Error!",
|
|
|
|
message: () => "Cycle remove from issue failed",
|
|
|
|
},
|
2024-01-10 14:39:45 +00:00
|
|
|
});
|
2024-03-06 15:17:38 +00:00
|
|
|
await removeFromCyclePromise;
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-03-06 15:17:38 +00:00
|
|
|
payload: { issueId, state: "SUCCESS", element: "Issue detail page" },
|
2024-02-05 07:49:07 +00:00
|
|
|
updates: {
|
|
|
|
changed_property: "cycle_id",
|
|
|
|
change_details: "",
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
} catch (error) {
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { state: "FAILED", element: "Issue detail page" },
|
|
|
|
updates: {
|
|
|
|
changed_property: "cycle_id",
|
|
|
|
change_details: "",
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
}
|
|
|
|
},
|
2024-01-30 09:53:20 +00:00
|
|
|
addModulesToIssue: async (workspaceSlug: string, projectId: string, issueId: string, moduleIds: string[]) => {
|
2024-01-10 14:39:45 +00:00
|
|
|
try {
|
2024-03-06 08:48:41 +00:00
|
|
|
const addToModulePromise = addModulesToIssue(workspaceSlug, projectId, issueId, moduleIds);
|
|
|
|
setPromiseToast(addToModulePromise, {
|
|
|
|
loading: "Adding module to issue...",
|
|
|
|
success: {
|
|
|
|
title: "Success!",
|
|
|
|
message: () => "Module added to issue successfully",
|
|
|
|
},
|
|
|
|
error: {
|
|
|
|
title: "Error!",
|
|
|
|
message: () => "Module add to issue failed",
|
|
|
|
},
|
2024-01-27 09:50:36 +00:00
|
|
|
});
|
2024-03-06 08:48:41 +00:00
|
|
|
const response = await addToModulePromise;
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { ...response, state: "SUCCESS", element: "Issue detail page" },
|
|
|
|
updates: {
|
|
|
|
changed_property: "module_id",
|
|
|
|
change_details: moduleIds,
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
} catch (error) {
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { id: issueId, state: "FAILED", element: "Issue detail page" },
|
|
|
|
updates: {
|
|
|
|
changed_property: "module_id",
|
|
|
|
change_details: moduleIds,
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
removeIssueFromModule: async (workspaceSlug: string, projectId: string, moduleId: string, issueId: string) => {
|
|
|
|
try {
|
2024-03-06 08:48:41 +00:00
|
|
|
const removeFromModulePromise = removeIssueFromModule(workspaceSlug, projectId, moduleId, issueId);
|
|
|
|
setPromiseToast(removeFromModulePromise, {
|
|
|
|
loading: "Removing module from issue...",
|
|
|
|
success: {
|
|
|
|
title: "Success!",
|
|
|
|
message: () => "Module removed from issue successfully",
|
|
|
|
},
|
|
|
|
error: {
|
|
|
|
title: "Error!",
|
|
|
|
message: () => "Module remove from issue failed",
|
|
|
|
},
|
2024-01-10 14:39:45 +00:00
|
|
|
});
|
2024-03-06 08:48:41 +00:00
|
|
|
await removeFromModulePromise;
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { id: issueId, state: "SUCCESS", element: "Issue detail page" },
|
|
|
|
updates: {
|
|
|
|
changed_property: "module_id",
|
|
|
|
change_details: "",
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
} catch (error) {
|
2024-02-05 07:49:07 +00:00
|
|
|
captureIssueEvent({
|
2024-02-09 10:52:08 +00:00
|
|
|
eventName: ISSUE_UPDATED,
|
2024-02-05 07:49:07 +00:00
|
|
|
payload: { id: issueId, state: "FAILED", element: "Issue detail page" },
|
|
|
|
updates: {
|
|
|
|
changed_property: "module_id",
|
|
|
|
change_details: "",
|
|
|
|
},
|
|
|
|
path: router.asPath,
|
|
|
|
});
|
2024-01-10 14:39:45 +00:00
|
|
|
}
|
|
|
|
},
|
2024-01-30 09:53:20 +00:00
|
|
|
removeModulesFromIssue: async (
|
|
|
|
workspaceSlug: string,
|
|
|
|
projectId: string,
|
|
|
|
issueId: string,
|
|
|
|
moduleIds: string[]
|
|
|
|
) => {
|
2024-03-06 08:48:41 +00:00
|
|
|
const removeModulesFromIssuePromise = removeModulesFromIssue(workspaceSlug, projectId, issueId, moduleIds);
|
|
|
|
setPromiseToast(removeModulesFromIssuePromise, {
|
|
|
|
loading: "Removing module from issue...",
|
|
|
|
success: {
|
|
|
|
title: "Success!",
|
|
|
|
message: () => "Module removed from issue successfully",
|
|
|
|
},
|
|
|
|
error: {
|
2024-01-31 10:06:55 +00:00
|
|
|
title: "Error!",
|
2024-03-06 08:48:41 +00:00
|
|
|
message: () => "Module remove from issue failed",
|
|
|
|
},
|
|
|
|
});
|
|
|
|
await removeModulesFromIssuePromise;
|
2024-01-30 09:53:20 +00:00
|
|
|
},
|
2024-01-10 14:39:45 +00:00
|
|
|
}),
|
|
|
|
[
|
2024-01-16 07:16:03 +00:00
|
|
|
is_archived,
|
2024-01-11 12:56:58 +00:00
|
|
|
fetchIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
updateIssue,
|
|
|
|
removeIssue,
|
2024-02-28 11:23:26 +00:00
|
|
|
archiveIssue,
|
2024-01-16 07:16:03 +00:00
|
|
|
removeArchivedIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
addIssueToCycle,
|
|
|
|
removeIssueFromCycle,
|
2024-01-30 09:53:20 +00:00
|
|
|
addModulesToIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
removeIssueFromModule,
|
2024-01-30 09:53:20 +00:00
|
|
|
removeModulesFromIssue,
|
2024-01-10 14:39:45 +00:00
|
|
|
]
|
|
|
|
);
|
|
|
|
|
2024-01-16 07:16:03 +00:00
|
|
|
// issue details
|
2024-01-10 14:39:45 +00:00
|
|
|
const issue = getIssueById(issueId);
|
2024-01-16 07:16:03 +00:00
|
|
|
// checking if issue is editable, based on user role
|
2024-01-11 12:56:58 +00:00
|
|
|
const is_editable = !!currentProjectRole && currentProjectRole >= EUserProjectRoles.MEMBER;
|
2024-01-10 14:39:45 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{!issue ? (
|
|
|
|
<EmptyState
|
|
|
|
image={emptyIssue}
|
|
|
|
title="Issue does not exist"
|
|
|
|
description="The issue you are looking for does not exist, has been archived, or has been deleted."
|
|
|
|
primaryButton={{
|
|
|
|
text: "View other issues",
|
|
|
|
onClick: () => router.push(`/${workspaceSlug}/projects/${projectId}/issues`),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
) : (
|
2024-03-06 13:09:14 +00:00
|
|
|
<div className="flex h-full w-full overflow-hidden">
|
|
|
|
<div className="max-w-2/3 h-full w-full space-y-5 divide-y-2 divide-custom-border-200 overflow-y-auto p-5">
|
2024-01-10 14:39:45 +00:00
|
|
|
<IssueMainContent
|
|
|
|
workspaceSlug={workspaceSlug}
|
|
|
|
projectId={projectId}
|
|
|
|
issueId={issueId}
|
|
|
|
issueOperations={issueOperations}
|
2024-01-24 13:20:54 +00:00
|
|
|
is_editable={!is_archived && is_editable}
|
2024-01-10 14:39:45 +00:00
|
|
|
/>
|
|
|
|
</div>
|
2024-02-12 11:39:22 +00:00
|
|
|
<div
|
2024-03-12 13:41:36 +00:00
|
|
|
className="fixed right-0 z-[5] h-full w-full min-w-[300px] overflow-hidden border-l border-custom-border-200 bg-custom-sidebar-background-100 py-5 sm:w-1/2 md:relative md:w-1/3 lg:min-w-80 xl:min-w-96"
|
2024-02-12 11:31:24 +00:00
|
|
|
style={themeStore.issueDetailSidebarCollapsed ? { right: `-${window?.innerWidth || 0}px` } : {}}
|
|
|
|
>
|
2024-01-10 14:39:45 +00:00
|
|
|
<IssueDetailsSidebar
|
|
|
|
workspaceSlug={workspaceSlug}
|
|
|
|
projectId={projectId}
|
|
|
|
issueId={issueId}
|
|
|
|
issueOperations={issueOperations}
|
|
|
|
is_archived={is_archived}
|
2024-01-24 13:20:54 +00:00
|
|
|
is_editable={!is_archived && is_editable}
|
2024-01-10 14:39:45 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
2024-01-16 07:16:03 +00:00
|
|
|
|
|
|
|
{/* peek overview */}
|
|
|
|
<IssuePeekOverview />
|
2024-01-10 14:39:45 +00:00
|
|
|
</>
|
|
|
|
);
|
2024-02-12 11:31:24 +00:00
|
|
|
});
|