diff --git a/web/components/core/activity.tsx b/web/components/core/activity.tsx index 31a796949..629e9908d 100644 --- a/web/components/core/activity.tsx +++ b/web/components/core/activity.tsx @@ -17,6 +17,7 @@ import { SignalMediumIcon, MessageSquareIcon, UsersIcon, + Inbox, } from "lucide-react"; import { IIssueActivity } from "@plane/types"; import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon } from "@plane/ui"; @@ -112,6 +113,40 @@ const EstimatePoint = observer((props: { point: string }) => { ); }); +const inboxActivityMessage = { + declined: { + showIssue: "declined issue", + noIssue: "declined this issue from inbox.", + }, + snoozed: { + showIssue: "snoozed issue", + noIssue: "snoozed this issue.", + }, + accepted: { + showIssue: "accepted issue", + noIssue: "accepted this issue from inbox.", + }, + markedDuplicate: { + showIssue: "declined issue", + noIssue: "declined this issue from inbox by marking a duplicate issue.", + }, +}; + +const getInboxUserActivityMessage = (activity: IIssueActivity, showIssue: boolean) => { + switch (activity.verb) { + case "-1": + return showIssue ? inboxActivityMessage.declined.showIssue : inboxActivityMessage.declined.noIssue; + case "0": + return showIssue ? inboxActivityMessage.snoozed.showIssue : inboxActivityMessage.snoozed.noIssue; + case "1": + return showIssue ? inboxActivityMessage.accepted.showIssue : inboxActivityMessage.accepted.noIssue; + case "2": + return showIssue ? inboxActivityMessage.markedDuplicate.showIssue : inboxActivityMessage.markedDuplicate.noIssue; + default: + return "updated inbox issue status."; + } +}; + const activityDetails: { [key: string]: { message: (activity: IIssueActivity, showIssue: boolean, workspaceSlug: string) => React.ReactNode; @@ -658,8 +693,7 @@ const activityDetails: { {renderFormattedDate(activity.new_value)} {showIssue && ( <> - {" "} - for + )} @@ -667,6 +701,20 @@ const activityDetails: { }, icon: