import React from "react"; // import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; import { CalendarDays, Signal, Tag } from "lucide-react"; // hooks import { useIssueDetail, useProject } from "hooks/store"; // components import { IssueLabel, TIssueOperations } from "components/issues"; import { PriorityDropdown, ProjectMemberDropdown, StateDropdown } from "components/dropdowns"; // ui import { CustomDatePicker } from "components/ui"; // icons import { DoubleCircleIcon, StateGroupIcon, UserGroupIcon } from "@plane/ui"; // types type Props = { workspaceSlug: string; projectId: string; issueId: string; issueOperations: TIssueOperations; is_editable: boolean; }; export const InboxIssueDetailsSidebar: React.FC = observer((props) => { const { workspaceSlug, projectId, issueId, issueOperations, is_editable } = props; // router // FIXME: Check if we need this. Previously it was used to render Project Identifier conditionally. // const router = useRouter(); // const { inboxIssueId } = router.query; // store hooks const { getProjectById } = useProject(); const { issue: { getIssueById }, } = useIssueDetail(); const issue = getIssueById(issueId); if (!issue) return <>; const projectDetails = issue ? getProjectById(issue.project_id) : null; const minDate = issue.start_date ? new Date(issue.start_date) : null; minDate?.setDate(minDate.getDate()); return (

{projectDetails?.identifier}-{issue?.sequence_id}

{/* State */}

State

issueOperations.update(workspaceSlug, projectId, issueId, { state_id: val })} projectId={projectId?.toString() ?? ""} disabled={!is_editable} buttonVariant="background-with-text" />
{/* Assignee */}

Assignees

issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })} disabled={!is_editable} projectId={projectId?.toString() ?? ""} placeholder="Assignees" multiple buttonVariant={issue?.assignee_ids?.length > 0 ? "transparent-without-text" : "background-with-text"} buttonClassName={issue?.assignee_ids?.length > 0 ? "hover:bg-transparent px-0" : ""} />
{/* Priority */}

Priority

issueOperations.update(workspaceSlug, projectId, issueId, { priority: val })} disabled={!is_editable} buttonVariant="background-with-text" />
{/* Due Date */}

Due date

issueOperations.update(workspaceSlug, projectId, issueId, { target_date: val })} className="border-none bg-custom-background-80" minDate={minDate ?? undefined} disabled={!is_editable} />
{/* Labels */}

Label

); });