Skip to content

Commit

Permalink
fix: order rankings by type
Browse files Browse the repository at this point in the history
  • Loading branch information
FreekBes committed Nov 4, 2024
1 parent 91610d6 commit 828a6f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dev/create_rankings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const createRanking = async function(name: string, description: string, topTitle

const createRankings = async function(): Promise<void> {
await createRanking('Guiding Stars', 'Based on points gained through evaluations', 'Guiding Star', 100000, ['evaluation']);
await createRanking('Top Performers', 'Based on points gained through projects', 'Top Performer', 100000, ['project']);
await createRanking('Top Performers', 'Based on points gained through projects', 'Top Performer', 100000, ['project', 'exam']);
await createRanking('Top Endeavors', 'Based on points gained through logtime', 'Top Endeavor', 100000, ['logtime']);
await createRanking('Philanthropists', 'Based on points gained through donating evaluation points to the pool', 'Philanthropist', 100000, ['point_donated']);
await createRanking('Community Leaders', 'Based on points gained through organizing events', 'Community Leader', 100000, ['event_basic', 'event_intermediate', 'event_advanced']);
Expand Down
3 changes: 3 additions & 0 deletions src/routes/admin/rankings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const setupAdminRankingRoutes = function(app: Express, prisma: PrismaClie
include: {
fixed_types: true,
},
orderBy: {
type: 'asc',
},
});
res.render('admin/rankings.njk', {
rankings,
Expand Down

0 comments on commit 828a6f7

Please sign in to comment.