Skip to content

Commit

Permalink
fix: do not disable tree or levels/groups for user ou
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenrikoverland committed Sep 23, 2024
1 parent ae4dbe6 commit 8ea9a96
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/components/OrgUnitDimension/OrgUnitDimension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -236,13 +233,7 @@ const OrgUnitDimension = ({
/>
</div>
)}
<div
className={cx('orgUnitTreeWrapper', {
disabled: selected.some((item) =>
DYNAMIC_ORG_UNITS.includes(item.id)
),
})}
>
<div className="orgUnitTreeWrapper">
<OrganisationUnitTree
roots={roots}
initiallyExpanded={[
Expand Down Expand Up @@ -276,9 +267,6 @@ const OrgUnitDimension = ({
</div>
<div
className={cx('selectsWrapper', {
disabled: selected.some((item) =>
DYNAMIC_ORG_UNITS.includes(item.id)
),
hidden: hideLevelSelect && hideGroupSelect,
})}
>
Expand Down

0 comments on commit 8ea9a96

Please sign in to comment.