mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-859] chore: inbox sidebar improvement (#4381)
* chore: added created by field in inbox issue * chore: inbox sidebar list item created by avatar added --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
This commit is contained in:
parent
a46eccf300
commit
1eba6c24cd
@ -636,6 +636,7 @@ class IssueInboxSerializer(DynamicBaseSerializer):
|
|||||||
"project_id",
|
"project_id",
|
||||||
"created_at",
|
"created_at",
|
||||||
"label_ids",
|
"label_ids",
|
||||||
|
"created_by",
|
||||||
]
|
]
|
||||||
read_only_fields = fields
|
read_only_fields = fields
|
||||||
|
|
||||||
|
@ -4,12 +4,13 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { Tooltip, PriorityIcon } from "@plane/ui";
|
import { Tooltip, PriorityIcon } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
|
import { ButtonAvatars } from "@/components/dropdowns/member/avatar";
|
||||||
import { InboxIssueStatus } from "@/components/inbox";
|
import { InboxIssueStatus } from "@/components/inbox";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "@/helpers/common.helper";
|
import { cn } from "@/helpers/common.helper";
|
||||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||||
// hooks
|
// hooks
|
||||||
import { useLabel, useProjectInbox } from "@/hooks/store";
|
import { useLabel, useMember, useProjectInbox } from "@/hooks/store";
|
||||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||||
// store
|
// store
|
||||||
import { IInboxIssueStore } from "@/store/inbox/inbox-issue.store";
|
import { IInboxIssueStore } from "@/store/inbox/inbox-issue.store";
|
||||||
@ -31,6 +32,7 @@ export const InboxIssueListItem: FC<InboxIssueListItemProps> = observer((props)
|
|||||||
const { currentTab } = useProjectInbox();
|
const { currentTab } = useProjectInbox();
|
||||||
const { projectLabels } = useLabel();
|
const { projectLabels } = useLabel();
|
||||||
const { isMobile } = usePlatformOS();
|
const { isMobile } = usePlatformOS();
|
||||||
|
const { getUserDetails } = useMember();
|
||||||
const issue = inboxIssue.issue;
|
const issue = inboxIssue.issue;
|
||||||
|
|
||||||
const handleIssueRedirection = (event: MouseEvent, currentIssueId: string | undefined) => {
|
const handleIssueRedirection = (event: MouseEvent, currentIssueId: string | undefined) => {
|
||||||
@ -39,6 +41,9 @@ export const InboxIssueListItem: FC<InboxIssueListItemProps> = observer((props)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!issue) return <></>;
|
if (!issue) return <></>;
|
||||||
|
|
||||||
|
const createdByDetails = issue?.created_by ? getUserDetails(issue?.created_by) : undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Link
|
<Link
|
||||||
@ -63,6 +68,7 @@ export const InboxIssueListItem: FC<InboxIssueListItemProps> = observer((props)
|
|||||||
<h3 className="truncate w-full text-sm">{issue.name}</h3>
|
<h3 className="truncate w-full text-sm">{issue.name}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex flex-wrap items-center gap-2">
|
<div className="flex flex-wrap items-center gap-2">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
tooltipHeading="Created on"
|
tooltipHeading="Created on"
|
||||||
@ -108,6 +114,9 @@ export const InboxIssueListItem: FC<InboxIssueListItemProps> = observer((props)
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{/* created by */}
|
||||||
|
{createdByDetails && <ButtonAvatars showTooltip={false} userIds={createdByDetails?.id} />}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user