feat: add application statistics dashboard and fix sponsor permissions#68
Merged
MatejMa2ur merged 7 commits intomainfrom Apr 16, 2026
Merged
feat: add application statistics dashboard and fix sponsor permissions#68MatejMa2ur merged 7 commits intomainfrom
MatejMa2ur merged 7 commits intomainfrom
Conversation
- Add Statistics page with dropdown field response breakdowns, filterable by status - Add GET API route for statistics data - Add getApplicationStatistics getter querying option counts per form field - Add Statistics tab to dashboard (admin-only) - Fix sponsors getter to scope applications by hackathonId (permissions bug) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…AUDE.md - Add file field handling to createFormValuesObject (option > file.name > value) - Add file.name to formValues select in applicationList and getApplicationsForSponsors - Add email/team name search and rows per page selector to SponsorsApplicationsTable - Rewrite getApplicationStatistics to use FormFieldType value for select fields - Add requireAdmin() guard to statistics page - Fix statistics API route error handling - Add CLAUDE.md project documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use FormFieldTypesWithOptions (radio/select/combobox) instead of non-existent "multi_select" - Separate auth errors (401) from server errors (500) in statistics API route - Validate hackathonId is a number and status is a known value before processing - Remove file.id over-fetch in getApplicationsForSponsors - Remove unused ApplicationStatusEnum and FieldStatistic imports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rtal Critical: - Statistics.tsx: only commit statusFilter on successful fetch to prevent desync; show loading indicator and error message on failure - SponsorsApplicationsTable.tsx: wrap JSON.parse(localStorage) in try/catch to prevent crash on corrupted data; remove `table` from useEffect deps to prevent re-initialization on every render - getApplicationsForSponsors + applicationList: move createFormValuesObject spread before named properties so id/email/status can never be overwritten by a form field with a colliding label Major: - getApplicationStatistics: replace separate status DB lookup with Prisma relation filter (eliminates extra round-trip and silent filter-drop on missing status row) - statistics/page.tsx: add NaN guard on hackathonId before calling getter - getApplicationsForSponsors: add sponsor hackathon ownership check so a sponsor cannot access another hackathon's applications; fix misleading error messages to identify which status is missing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- route.ts: format validStatuses array with trailing comma - statistics/page.tsx: inline Statistics JSX to match prettier line length - DashboardTabs.tsx: break statistics path check to new line - Statistics.tsx: format onChange handler across multiple lines - SponsorsApplicationsTable.tsx: break long label text to new line - getApplicationStatistics.ts: format Map generic type, replace non-null assertion with safe stepEntry guard Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s to v4 - statistics/page.tsx: remove wrapping parens from single-element return (prettier) - e2e.yml: upload-artifact@v3 -> v4, setup-node@v3 -> v4 - unit.yml: setup-node@v3 -> v4 - static-checks.yml: setup-node@v3 -> v4 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ubuntu 24.04 (Noble) no longer provides libasound2, libffi7, and libx264-163 which the current Playwright version requires for browser installation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com