Skip to content

feat: add admin payment dashboard - #56

Open
TsioryJonathan wants to merge 23 commits into
preprodfrom
feat/admin-ui
Open

feat: add admin payment dashboard#56
TsioryJonathan wants to merge 23 commits into
preprodfrom
feat/admin-ui

Conversation

@TsioryJonathan

@TsioryJonathan TsioryJonathan commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Adds an admin payment dashboard with authentication, filters, pagination, and CSV export.

  • SecurityConf. Form login backed by ADMIN_EMAIL and ADMIN_PASSWORD environment variables. Sessions are stored in the database through @EnableJdbcHttpSession. CSRF protection is on for admin forms and off for webhook endpoints.

  • PaymentViewController. The dashboard page at /payments. Paginated (15 per page, newest first), filterable by application, scope, and date range. Shows total collected, payment count, and pending count. The CSV export button passes the current filters along.

image

Mathieu-bot and others added 19 commits July 27, 2026 23:37
* feat: add CSV export endpoint and service methods

* test: add CSV export integration and service tests

* refactor: make applicationName optional in CSV export endpoint

* refactor: replace System.currentTimeMillis() with static import

* refactor: ZoneOffset.UTC as static import

* refactor: improve CSV builder readability with String.format

* refactor: use English instead of French for csv title

* chore: add .env to .gitignore

* test: replace inline CSV assertions with expected-export.csv comparison

* test: replace inline CSV assertions with expected-export.csv comparison

* test: remove unused PaymentRepository import

---------

Co-authored-by: Mathieu-bot <mathieu-bot@users.noreply.github.com>

* test: simplify CSV test to single data row

* feat(security): require apiKey on GET /payments/export/csv, remove applicationName param

* feat: add AdminAuthorizer, applicationName param for CSV export

* fix: validate admin API key via env var instead of DB

* style: inline format string in String.format

* style: format code

---------

Co-authored-by: Tafita Mathieu <199898191+Mathieu-bot@users.noreply.github.com>
Co-authored-by: Mathieu-bot <mathieu-bot@users.noreply.github.com>
Comment thread src/main/java/school/hei/vola/endpoint/rest/controller/PaymentViewController.java Outdated
Comment thread src/main/java/school/hei/vola/endpoint/rest/controller/PaymentViewController.java Outdated
Mathieu-bot and others added 4 commits July 30, 2026 21:23
* refactor: use SPRING_SESSION_* env vars instead of SessionConfig

* fix: constructor injection and configurable page size

---------

Co-authored-by: Mathieu-bot <mathieu-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants