fix: project view application error (#6091)
This commit is contained in:
parent
1cb16bf176
commit
7469e67b71
1 changed files with 13 additions and 12 deletions
|
|
@ -28,18 +28,6 @@ const ProjectViewsPage = observer(() => {
|
||||||
const project = projectId ? getProjectById(projectId.toString()) : undefined;
|
const project = projectId ? getProjectById(projectId.toString()) : undefined;
|
||||||
const pageTitle = project?.name ? `${project?.name} - Views` : undefined;
|
const pageTitle = project?.name ? `${project?.name} - Views` : undefined;
|
||||||
|
|
||||||
if (!workspaceSlug || !projectId) return <></>;
|
|
||||||
|
|
||||||
// No access to
|
|
||||||
if (currentProjectDetails?.issue_views_view === false)
|
|
||||||
return (
|
|
||||||
<div className="flex items-center justify-center h-full w-full">
|
|
||||||
<EmptyState
|
|
||||||
type={EmptyStateType.DISABLED_PROJECT_VIEW}
|
|
||||||
primaryButtonLink={`/${workspaceSlug}/projects/${projectId}/settings/features`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
const handleRemoveFilter = useCallback(
|
const handleRemoveFilter = useCallback(
|
||||||
(key: keyof TViewFilterProps, value: string | EViewAccess | null) => {
|
(key: keyof TViewFilterProps, value: string | EViewAccess | null) => {
|
||||||
let newValues = filters.filters?.[key];
|
let newValues = filters.filters?.[key];
|
||||||
|
|
@ -59,6 +47,19 @@ const ProjectViewsPage = observer(() => {
|
||||||
|
|
||||||
const isFiltersApplied = calculateTotalFilters(filters?.filters ?? {}) !== 0;
|
const isFiltersApplied = calculateTotalFilters(filters?.filters ?? {}) !== 0;
|
||||||
|
|
||||||
|
if (!workspaceSlug || !projectId) return <></>;
|
||||||
|
|
||||||
|
// No access to
|
||||||
|
if (currentProjectDetails?.issue_views_view === false)
|
||||||
|
return (
|
||||||
|
<div className="flex items-center justify-center h-full w-full">
|
||||||
|
<EmptyState
|
||||||
|
type={EmptyStateType.DISABLED_PROJECT_VIEW}
|
||||||
|
primaryButtonLink={`/${workspaceSlug}/projects/${projectId}/settings/features`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title={pageTitle} />
|
<PageHead title={pageTitle} />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue