Skip to content

Commit f924b15

Browse files
authored
fix(institution-dashboard-summary): Sorted licenses and addons data (#522)
1 parent 626641f commit f924b15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class InstitutionsSummaryComponent implements OnInit {
143143
const addons = this.hasOsfAddonSearch();
144144

145145
this.addonLabels.set(addons.map((result) => result.label));
146-
this.addonDataset.set([{ label: '', data: addons.map((result) => +result.value) }]);
146+
this.addonDataset.set([{ label: '', data: addons.map((result) => +result.value).sort((a, b) => b - a) }]);
147147
});
148148
}
149149

@@ -219,7 +219,7 @@ export class InstitutionsSummaryComponent implements OnInit {
219219
const licenses = this.rightsSearch();
220220

221221
this.licenceLabels.set(licenses.map((result) => result.label));
222-
this.licenceDataset.set([{ label: '', data: licenses.map((result) => +result.value) }]);
222+
this.licenceDataset.set([{ label: '', data: licenses.map((result) => +result.value).sort((a, b) => b - a) }]);
223223
});
224224
}
225225
}

0 commit comments

Comments
 (0)