Skip to content

Commit

Permalink
6048:should filter out removed users by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphmensah committed Jul 25, 2023
1 parent ed1e82e commit 0adf57f
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 0adf57f

Please sign in to comment.