Skip to content

Commit bc0e643

Browse files
FIX: org view rating explorer (was working from a limited set of capabilities)
FIX: rating explorer tree sorts on 'name' #206
1 parent 89777c9 commit bc0e643

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

waltz-ng/client/org-units/services/org-unit-view-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function service($q,
9292
const bulkPromise = $q.all([
9393
ratingStore.findByAppIds(appIds),
9494
appCapabilityStore.findApplicationCapabilitiesByAppIdSelector(appIdSelector),
95-
capabilityStore.findByAppIds(appIds),
95+
capabilityStore.findAll(),
9696
ratedDataFlowDataService.findByOrgUnitTree(orgUnitId), // use orgIds (ASC + DESC)
9797
authSourceCalculator.findByOrgUnit(orgUnitId), // use orgIds(ASC)
9898
endUserAppStore.findByOrgUnitTree(orgUnitId), // use orgIds(DESC)

waltz-ng/client/ratings/directives/rating-explorer/rating-explorer-section.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<div class="col-md-4">
3232
<treecontrol class="tree-light"
3333
tree-model="ctrl.capabilityTree.data"
34-
order-by="name"
34+
order-by="'-name'"
3535
on-selection="ctrl.selectCapability(node)"
3636
options="ctrl.capabilityTree.options">
3737
<span ng-class="{ 'waltz-inherited-value' : node.implied }">

waltz-ng/client/ratings/directives/rating-explorer/rating-explorer-section.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ function calculateRequiredCapabilities(directCaps = [],
4646
cap.level5]))
4747
.filter(id => id != null)
4848
.uniq()
49-
.map(id => capsById[id])
49+
.map(id => {
50+
const cap = capsById[id];
51+
if (!cap) {
52+
console.log("Capability Id referenced but does not exist", id);
53+
}
54+
return cap;
55+
})
56+
.filter(cap => cap != null)
5057
.value()
5158
}
5259

0 commit comments

Comments
 (0)