From 8d3a0a2eecd981290e5cedd550877608a5dbe915 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:07:53 +0530 Subject: [PATCH] fix: build error (#3128) --- web/components/headers/project-view-issues.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/components/headers/project-view-issues.tsx b/web/components/headers/project-view-issues.tsx index 827997f7b..a4428f633 100644 --- a/web/components/headers/project-view-issues.tsx +++ b/web/components/headers/project-view-issues.tsx @@ -17,6 +17,7 @@ import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOption import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "constants/issue"; import { EFilterType } from "store/issues/types"; import { EProjectStore } from "store/command-palette.store"; +import { EUserWorkspaceRoles } from "constants/workspace"; export const ProjectViewIssuesHeader: React.FC = observer(() => { const router = useRouter(); @@ -35,6 +36,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { viewIssuesFilter: { issueFilters, updateFilters }, commandPalette: commandPaletteStore, trackEvent: { setTrackElement }, + user: { currentProjectRole }, } = useMobxStore(); const activeLayout = issueFilters?.displayFilters?.layout; @@ -85,6 +87,9 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { const viewsList = projectId ? projectViewsStore.viewsList[projectId.toString()] : undefined; const viewDetails = viewId ? projectViewsStore.viewDetails[viewId.toString()] : undefined; + const canUserCreateIssue = + currentProjectRole && [EUserWorkspaceRoles.ADMIN, EUserWorkspaceRoles.MEMBER].includes(currentProjectRole); + return (