Skip to content

Commit

Permalink
Added sorting to roles on the involvement section
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwatkins73 committed Sep 17, 2023
1 parent 0b41dbf commit 08f1854
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
</thead>

<tbody>
<tr ng-repeat="role in row.entity.roles">
<tr ng-repeat="role in row.entity.roles | orderBy:'displayName'">
<td>
<div ng-bind="role.displayName"></div>
<div class="small text-muted" ng-bind="role.provenance"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ const columnDefs = [
{
field: "rolesDisplayName",
displayName: "Roles",
sortingAlgorithm: (a, b) => {
const aNames = _.join(_.map(a, "displayName"));
const bNames = _.join(_.map(b, "displayName"));
return aNames.localeCompare(bNames);
},
cellTemplate: `
<div class="ui-grid-cell-contents">
<span ng-bind="COL_FIELD"
Expand Down Expand Up @@ -95,6 +90,7 @@ function mkGridData(involvements = [], displayNameService, descriptionService) {
const rolesDisplayName = _
.chain(roles)
.map("displayName")
.sort()
.join(", ")
.value();

Expand Down

0 comments on commit 08f1854

Please sign in to comment.