ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: причина отклонения, reply и in-app уведомления
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user