From 0adf57fc7d455861d0aa428f177c8c030c12e8c2 Mon Sep 17 00:00:00 2001 From: Ralph Mensah Date: Tue, 25 Jul 2023 00:08:04 +0000 Subject: [PATCH] 6048:should filter out removed users by default --- .../components/involved-people-section.html | 8 ++++++++ .../components/involved-people-section.js | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/waltz-ng/client/involvement/components/involved-people-section.html b/waltz-ng/client/involvement/components/involved-people-section.html index 8c7f6314e5..767f916330 100644 --- a/waltz-ng/client/involvement/components/involved-people-section.html +++ b/waltz-ng/client/involvement/components/involved-people-section.html @@ -59,6 +59,14 @@ label-off="Showing all involvements (including inherited)"> +
+ + +
diff --git a/waltz-ng/client/involvement/components/involved-people-section.js b/waltz-ng/client/involvement/components/involved-people-section.js index f346c5c5f4..c811b665f4 100644 --- a/waltz-ng/client/involvement/components/involved-people-section.js +++ b/waltz-ng/client/involvement/components/involved-people-section.js @@ -76,7 +76,8 @@ const initialState = { showDirectOnly: true, visibility: { editor: false - } + }, + showRemovedPeople: false }; @@ -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 = () => { @@ -226,6 +230,10 @@ function controller($q, displayNameService, descriptionService, serviceBroker, i vm.showDirectOnly = !vm.showDirectOnly; refreshGridData(); } + vm.onHiddenPeople= ()=>{ + vm.showRemovedPeople = !vm.showRemovedPeople; + refreshGridData(); + } }