import { useRouter } from "next/router"; import Link from "next/link"; // ui import { Tooltip } from "components/ui"; // icons import { getPriorityIcon } from "components/icons"; import { CalendarDaysIcon, CheckCircleIcon, ClockIcon, DocumentDuplicateIcon, ExclamationTriangleIcon, XCircleIcon, } from "@heroicons/react/24/outline"; // helpers import { renderShortDateWithYearFormat } from "helpers/date-time.helper"; // types import type { IInboxIssue } from "types"; // constants import { INBOX_STATUS } from "constants/inbox"; type Props = { issue: IInboxIssue; active: boolean; }; export const InboxIssueCard: React.FC = (props) => { const { issue, active } = props; const router = useRouter(); const { workspaceSlug, projectId, inboxId } = router.query; const issueStatus = issue.issue_inbox[0].status; return (

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

{issue.name}
{getPriorityIcon( issue.priority && issue.priority !== "" ? issue.priority ?? "" : "None", "text-sm" )}
{renderShortDateWithYearFormat(issue.created_at ?? "")}
s.value === issueStatus)?.textColor }`} > {issueStatus === -2 ? ( <> Pending ) : issueStatus === -1 ? ( <> Declined ) : issueStatus === 0 ? ( <> {new Date(issue.issue_inbox[0].snoozed_till ?? "") < new Date() ? "Snoozed date passed" : "Snoozed"} ) : issueStatus === 1 ? ( <> Accepted ) : ( <> Duplicate )}
); };