Skip to content

Commit

Permalink
[ALS-7862] Update sort order of Dashboard (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPeck authored Nov 20, 2024
1 parent b14b016 commit 70b2c69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/stores/Dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export async function loadDashboardData() {
const processedRows = dashboardData.rows.map(processRow(consents));

const sortedRows = processedRows.sort((a, b) => {
const aIsAnvil = (a.program_name?.toString().toLowerCase() || '') === 'anvil';
const bIsAnvil = (b.program_name?.toString().toLowerCase() || '') === 'anvil';
if (aIsAnvil !== bIsAnvil) {
return aIsAnvil ? 1 : -1;
}
if (a.consentGranted === b.consentGranted) {
return sortByAbbreviation(a, b);
}
Expand Down

0 comments on commit 70b2c69

Please sign in to comment.