From 8ea9a96ad053c478be811a454504485876af2670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Mon, 23 Sep 2024 12:00:14 +0200 Subject: [PATCH] fix: do not disable tree or levels/groups for user ou --- .../OrgUnitDimension/OrgUnitDimension.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/OrgUnitDimension/OrgUnitDimension.js b/src/components/OrgUnitDimension/OrgUnitDimension.js index 5d2d7115a..9ed1078de 100644 --- a/src/components/OrgUnitDimension/OrgUnitDimension.js +++ b/src/components/OrgUnitDimension/OrgUnitDimension.js @@ -51,10 +51,7 @@ const OrgUnitDimension = ({ let result = [...selected] if (checked && DYNAMIC_ORG_UNITS.includes(id)) { - result = [ - ...result.filter((item) => DYNAMIC_ORG_UNITS.includes(item.id)), - { id, displayName }, - ] + result = [...result, { id, displayName }] } else if (checked) { result.push({ id, path, name: displayName }) } else { @@ -236,13 +233,7 @@ const OrgUnitDimension = ({ /> )} -
- DYNAMIC_ORG_UNITS.includes(item.id) - ), - })} - > +
- DYNAMIC_ORG_UNITS.includes(item.id) - ), hidden: hideLevelSelect && hideGroupSelect, })} >