Skip to content

Commit

Permalink
hotfix: task source optional (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan <[email protected]>
  • Loading branch information
jdolkowski and Jan authored Feb 12, 2024
1 parent 2f910d9 commit f0f6b68
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/TaskSearcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { fetchTasks } from '../actions';
import trimBusinessEvent from '../utils/trimBusinessEvent';

function TaskSearcher({
rights, contribution, entityId,
rights, contribution, entityId, showFilters = true,
}) {
const history = useHistory();
const modulesManager = useModulesManager();
Expand Down Expand Up @@ -94,12 +94,14 @@ function TaskSearcher({
value: false,
filter: 'isDeleted: false',
},
source: {
};
if (contribution?.taskSource) {
filters.source = {
value: contribution.taskSource,
filter: `source: "${contribution.taskSource}"`,
},
};
if (entityId !== null && entityId !== undefined) {
};
}
if (entityId) {
filters.entityId = {
value: entityId,
filter: `entityId: "${entityId}"`,
Expand All @@ -120,7 +122,7 @@ function TaskSearcher({
return (
<Searcher
module="tasksManagement"
FilterPane={taskFilter}
FilterPane={showFilters && taskFilter}
fetch={fetch}
items={tasks}
itemsPageInfo={tasksPageInfo}
Expand Down

0 comments on commit f0f6b68

Please sign in to comment.