From ed8d00acb1d3ace4bb71ca0b5c73c5ceac801664 Mon Sep 17 00:00:00 2001 From: Akshita Goyal <36129505+gakshita@users.noreply.github.com> Date: Fri, 11 Apr 2025 19:49:35 +0530 Subject: [PATCH] [WEB-3849] chore: added intake source in the list (#6919) * chore: added intake source in the list * fix: refactor --- web/ce/components/inbox/source-pill.tsx | 7 +++++++ web/core/components/inbox/sidebar/inbox-list-item.tsx | 6 +++++- .../issue-activity/activity/actions/default.tsx | 4 +++- web/ee/components/inbox/source-pill.tsx | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 web/ce/components/inbox/source-pill.tsx create mode 100644 web/ee/components/inbox/source-pill.tsx diff --git a/web/ce/components/inbox/source-pill.tsx b/web/ce/components/inbox/source-pill.tsx new file mode 100644 index 000000000..6e42f6880 --- /dev/null +++ b/web/ce/components/inbox/source-pill.tsx @@ -0,0 +1,7 @@ +import { EInboxIssueSource } from "@plane/constants"; + +export type TInboxSourcePill = { + source: EInboxIssueSource; +}; + +export const InboxSourcePill = (props: TInboxSourcePill) => <>; diff --git a/web/core/components/inbox/sidebar/inbox-list-item.tsx b/web/core/components/inbox/sidebar/inbox-list-item.tsx index 6762c2528..1b21c97be 100644 --- a/web/core/components/inbox/sidebar/inbox-list-item.tsx +++ b/web/core/components/inbox/sidebar/inbox-list-item.tsx @@ -15,6 +15,7 @@ import { renderFormattedDate } from "@/helpers/date-time.helper"; import { getFileURL } from "@/helpers/file.helper"; import { useLabel, useMember, useProjectInbox } from "@/hooks/store"; import { usePlatformOS } from "@/hooks/use-platform-os"; +import { InboxSourcePill } from "@/plane-web/components/inbox/source-pill"; type InboxIssueListItemProps = { workspaceSlug: string; @@ -65,7 +66,10 @@ export const InboxIssueListItem: FC = observer((props)
{projectIdentifier}-{issue.sequence_id}
- {inboxIssue.status !== -2 && } +
+ {inboxIssue.source && } + {inboxIssue.status !== -2 && } +

{issue.name}

diff --git a/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx b/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx index 100be6a13..b9a1f4bbe 100644 --- a/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx +++ b/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx @@ -6,6 +6,7 @@ import { observer } from "mobx-react"; import { EInboxIssueSource } from "@plane/constants"; import { LayersIcon } from "@plane/ui"; // hooks +import { capitalizeFirstLetter } from "@plane/utils"; import { useIssueDetail } from "@/hooks/store"; // local imports import { IssueActivityBlockComponent } from "./"; @@ -34,7 +35,8 @@ export const IssueDefaultActivity: FC = observer((props) {activity.verb === "created" ? ( source && source !== EInboxIssueSource.IN_APP ? ( - created the work item via {source.toLowerCase()}. + created the work item via{" "} + {capitalizeFirstLetter(source.toLowerCase() || "")}. ) : ( created the work item. diff --git a/web/ee/components/inbox/source-pill.tsx b/web/ee/components/inbox/source-pill.tsx new file mode 100644 index 000000000..a3be79206 --- /dev/null +++ b/web/ee/components/inbox/source-pill.tsx @@ -0,0 +1 @@ +export * from "ce/components/inbox/source-pill";