ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: причина отклонения, reply и in-app уведомления

This commit is contained in:
DCCONSTRUCTIONS
2026-04-19 09:22:15 +03:00
parent 61a8625a5c
commit 0a584abf26
25 changed files with 623 additions and 32 deletions
@@ -20,6 +20,7 @@ import { useUserPermissions } from "@/hooks/store/user";
import { useWorkspaceIssueProperties } from "@/hooks/use-workspace-issue-properties";
// plane web imports
import { useNotificationPreview } from "@/plane-web/hooks/use-notification-preview";
import { ExternalContoursContentRoot } from "@/plane-web/components/projects/external-contours/content-root";
// local imports
import { InboxContentRoot } from "../inbox/content";
@@ -40,7 +41,7 @@ export const NotificationsRoot = observer(function NotificationsRoot({ workspace
const { fetchUserProjectInfo } = useUserPermissions();
const { isWorkItem, PeekOverviewComponent, setPeekWorkItem } = useNotificationPreview();
// derived values
const { workspace_slug, project_id, issue_id, is_inbox_issue } =
const { workspace_slug, project_id, issue_id, is_inbox_issue, is_external_contour } =
notificationLiteByNotificationId(currentSelectedNotificationId);
// fetching workspace work item properties
@@ -64,10 +65,12 @@ export const NotificationsRoot = observer(function NotificationsRoot({ workspace
// fetching user project member info
const { isLoading: projectMemberInfoLoader } = useSWR(
workspace_slug && project_id && is_inbox_issue
workspace_slug && project_id && (is_inbox_issue || is_external_contour)
? `PROJECT_MEMBER_PERMISSION_INFO_${workspace_slug}_${project_id}`
: null,
workspace_slug && project_id && is_inbox_issue ? () => fetchUserProjectInfo(workspace_slug, project_id) : null
workspace_slug && project_id && (is_inbox_issue || is_external_contour)
? () => fetchUserProjectInfo(workspace_slug, project_id)
: null
);
const embedRemoveCurrentNotification = useCallback(
@@ -91,7 +94,23 @@ export const NotificationsRoot = observer(function NotificationsRoot({ workspace
</div>
) : (
<>
{is_inbox_issue === true && workspace_slug && project_id && issue_id ? (
{is_external_contour === true && workspace_slug && project_id && issue_id ? (
<>
{projectMemberInfoLoader ? (
<div className="flex h-full w-full items-center justify-center">
<LogoSpinner />
</div>
) : (
<ExternalContoursContentRoot
setIsMobileSidebar={() => {}}
isMobileSidebar={false}
workspaceSlug={workspace_slug}
projectId={project_id}
inboxIssueId={issue_id}
/>
)}
</>
) : is_inbox_issue === true && workspace_slug && project_id && issue_id ? (
<>
{projectMemberInfoLoader ? (
<div className="flex h-full w-full items-center justify-center">