Skip to content

Commit

Permalink
Merge pull request #6690 from ralphmensah/feature-6048
Browse files Browse the repository at this point in the history
6048:should filter out removed users by default
  • Loading branch information
davidwatkins73 authored Aug 7, 2023
2 parents ea27b96 + 0adf57f commit 766e593
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
label-off="Showing all involvements (including inherited)">
</waltz-toggle>
</div>
<div style="padding-top: 1em">
<waltz-toggle
state="$ctrl.showRemovedPeople"
on-toggle="$ctrl.onHiddenPeople()"
label-on="Hide removed people"
label-off="Show removed people">
</waltz-toggle>
</div>
</div>

<div ng-if="$ctrl.gridData.length > 0">
Expand Down
12 changes: 10 additions & 2 deletions waltz-ng/client/involvement/components/involved-people-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ const initialState = {
showDirectOnly: true,
visibility: {
editor: false
}
},
showRemovedPeople: false
};


Expand Down Expand Up @@ -145,7 +146,10 @@ function controller($q, displayNameService, descriptionService, serviceBroker, i
? vm.aggDirectInvolvements
: vm.aggInvolvements;

vm.gridData = mkGridData(involvements, displayNameService, descriptionService);
const updatedGridData = mkGridData(involvements, displayNameService, descriptionService);
vm.gridData = vm.showRemovedPeople ?
updatedGridData:
updatedGridData.filter( d => d.person.isRemoved === vm.showRemovedPeople);
}

const refresh = () => {
Expand Down Expand Up @@ -226,6 +230,10 @@ function controller($q, displayNameService, descriptionService, serviceBroker, i
vm.showDirectOnly = !vm.showDirectOnly;
refreshGridData();
}
vm.onHiddenPeople= ()=>{
vm.showRemovedPeople = !vm.showRemovedPeople;
refreshGridData();
}
}


Expand Down

0 comments on commit 766e593

Please sign in to comment.