From a5a1793153d79cc6ef74208ddb6bd660a4d904c3 Mon Sep 17 00:00:00 2001 From: remyvdwereld <86827854+remyvdwereld@users.noreply.github.com> Date: Thu, 21 Sep 2023 18:26:38 +0200 Subject: [PATCH] 90686 --- src/app/components/cases/Cases/Cases.tsx | 1 - .../cases/CasesFilter/CasesFilter.tsx | 25 +++++----- src/app/components/tasks/Tasks/Tasks.tsx | 1 - .../tasks/TasksFilter/TasksFilter.tsx | 48 +++++++++---------- 4 files changed, 34 insertions(+), 41 deletions(-) diff --git a/src/app/components/cases/Cases/Cases.tsx b/src/app/components/cases/Cases/Cases.tsx index 4fd10dbd4..e8a5b4839 100644 --- a/src/app/components/cases/Cases/Cases.tsx +++ b/src/app/components/cases/Cases/Cases.tsx @@ -82,7 +82,6 @@ const Cases: React.FC = () => { ** housingCorporations to avoid a stale selection: */ if (key === "theme") { - casesContextItem.housingCorporations = [] casesContextItem.reason = "" casesContextItem.projects = [] casesContextItem.subjects = [] diff --git a/src/app/components/cases/CasesFilter/CasesFilter.tsx b/src/app/components/cases/CasesFilter/CasesFilter.tsx index 71d808d3d..b33701d02 100644 --- a/src/app/components/cases/CasesFilter/CasesFilter.tsx +++ b/src/app/components/cases/CasesFilter/CasesFilter.tsx @@ -7,7 +7,6 @@ import scaffoldDate from "./scaffoldDate" import scaffoldTheme from "./scaffoldTheme" import scaffoldPageSize from "./scaffoldPageSize" import scaffoldReason from "./scaffoldReason" -import MultipleOptionsFilter from "app/components/filters/MultipleOptionsFilter/MultipleOptionsFilter" import MultipleOptionsFilterBox from "app/components/filters/MultipleOptionsFilterBox/MultipleOptionsFilterBox" type Props = { @@ -45,20 +44,21 @@ const CasesFilter: React.FC = ({ - { theme === "Onderhuur" && ( - - )} + + + { reasons === undefined ? : ( )} + { projects !== undefined && ( = ({ byId /> )} - - - - { ** housingCorporations to avoid a stale selection: */ if (key === "theme") { - tasksContextItem.housingCorporations = [] tasksContextItem.projects = [] tasksContextItem.reason = "" tasksContextItem.subjects = [] diff --git a/src/app/components/tasks/TasksFilter/TasksFilter.tsx b/src/app/components/tasks/TasksFilter/TasksFilter.tsx index 32a28491e..3123dfdae 100644 --- a/src/app/components/tasks/TasksFilter/TasksFilter.tsx +++ b/src/app/components/tasks/TasksFilter/TasksFilter.tsx @@ -8,7 +8,6 @@ import scaffoldRole from "./scaffoldRole" import scaffoldPageSize from "./scaffoldPageSize" import scaffoldMyTasks from "./scaffoldMyTasks" import scaffoldReasons from "./scaffoldReasons" -import MultipleOptionsFilter from "app/components/filters/MultipleOptionsFilter/MultipleOptionsFilter" import MultipleOptionsFilterBox from "app/components/filters/MultipleOptionsFilterBox/MultipleOptionsFilterBox" type Props = { @@ -62,21 +61,6 @@ const TasksFilter: React.FC = ({ ) } - { theme === "Onderhuur" && ( - - )} - { reasons === undefined ? : ( - - - - ) - } { roles === undefined ? : ( @@ -85,14 +69,10 @@ const TasksFilter: React.FC = ({ ) } - { projects !== undefined && ( - + { reasons === undefined ? : ( + + + )} { taskNames === undefined ? : ( = ({ setSelectedOptions={ setSelectedTaskNames } /> )} + + + { projects !== undefined && ( + + )} + { subjects !== undefined && ( = ({ byId /> )} -