Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions src/features/tasks/components/data-filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ interface DataFiltersProps {
showMyTasksOnly?: boolean; // New prop to hide assignee filter in My Tasks
projects?: Project[]; // Passed in My Space mode for cross-workspace filters
disableManageColumns?: boolean; // Disable when project setup is needed
hideManageColumns?: boolean; // Hide entirely (e.g. calendar view)
}

export const DataFilters = ({ hideProjectFilter, showMyTasksOnly, projects: passedProjects, disableManageColumns }: DataFiltersProps) => {
export const DataFilters = ({ hideProjectFilter, showMyTasksOnly, projects: passedProjects, disableManageColumns, hideManageColumns }: DataFiltersProps) => {
const workspaceId = useWorkspaceId();
const currentProjectId = useProjectId();

Expand Down Expand Up @@ -303,16 +304,18 @@ export const DataFilters = ({ hideProjectFilter, showMyTasksOnly, projects: pass
/>
</div>

<Button
size="sm"
onClick={openManageModal}
disabled={disableManageColumns}
title={disableManageColumns ? "Complete project setup in Backlog first" : undefined}
className="h-8 text-xs lg:ml-auto gap-2"
>
<Settings2Icon className="size-4 mr-2" />
Manage Columns
</Button>
{!hideManageColumns && (
<Button
size="sm"
onClick={openManageModal}
disabled={disableManageColumns}
title={disableManageColumns ? "Complete project setup in Backlog first" : undefined}
className="h-8 text-xs lg:ml-auto gap-2"
>
<Settings2Icon className="size-4 mr-2" />
Manage Columns
</Button>
)}
</div>
);
};
1 change: 1 addition & 0 deletions src/features/tasks/components/task-view-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ export const TaskViewSwitcher = ({
showMyTasksOnly={showMyTasksOnly}
projects={showMyTasksOnly ? (mySpaceProjectsQuery.data?.documents || []) : undefined}
disableManageColumns={effectiveProjectId ? setupState.needsSetup : false}
hideManageColumns={view === "calendar"}
/>
)}

Expand Down
Loading