Statistic Page closes #310 #417

Merged
moritz merged 16 commits from feature/statistics into main 2026-02-12 19:40:23 +01:00
Owner

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

What has been changed?

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass
  • axe-core dev tools show no critical or major issues

Additional Notes

## Description of the implemented changes The changes were: - [ ] Bugfixing - [x] New Feature - [ ] Breaking Change - [ ] Refactoring <!--- Describe the goal of the PR in a few words --> ## What has been changed? <!--- List the things you changed --> ## Definition of Done ### Code Quality - [x] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [ ] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [ ] Aria labels are added when needed - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [ ] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass - [x] axe-core dev tools show no critical or major issues ## Additional Notes <!--- Add any additional information for the reviewers here -->
moritz added this to the Optional: Statistics and charts milestone 2026-02-10 22:42:20 +01:00
moritz self-assigned this 2026-02-10 22:42:20 +01:00
moritz added 6 commits 2026-02-10 22:42:21 +01:00
- first_join_year, active/inactive counts, joins/exits by year
- cycle_totals_by_year, open_amount_total
- Unit tests for Statistics

Co-authored-by: Cursor <cursoragent@cursor.com>
- /statistics route and PagePaths.statistics
- Permission sets: viewer and admin can access /statistics
- Sidebar link with can_access_page check
- Plug and sidebar tests updated

Co-authored-by: Cursor <cursoragent@cursor.com>
- Summary cards: active/inactive members, open amount
- Joins and exits by year (horizontal bars)
- Contributions by year: table with stacked bar above amounts
- Column order: Paid, Unpaid, Suspended, Total; color dots for legend
- All years combined pie chart
- LiveView tests

Co-authored-by: Cursor <cursoragent@cursor.com>
- get_actor(opts): use opts[:actor] or system actor
- load_member, do_generate_cycles, create_cycles pass opts
- Seeds pass admin_user_with_role for Ash.load! and cycle updates

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Update docs and guidelines for statistics feature
All checks were successful
continuous-integration/drone/push Build is passing
6ffd1ea5aa
- CODE_GUIDELINES.md and feature-roadmap.md
- Add statistics-page-implementation-plan.md

Co-authored-by: Cursor <cursoragent@cursor.com>
moritz force-pushed feature/statistics from 6ffd1ea5aa to 99aa8969f0 2026-02-10 22:44:51 +01:00 Compare
requested reviews from simon, carla 2026-02-10 22:46:11 +01:00
moritz changed title from WIP: Statistic Page to WIP: Statistic Page closes #310 2026-02-10 22:49:24 +01:00
carla approved these changes 2026-02-11 13:35:36 +01:00
@ -91,0 +91,4 @@
<%= if can_access_page?(@current_user, PagePaths.statistics()) do %>
<.menu_item
href={~p"/statistics"}
icon="hero-chart-bar"
Owner

The icon is not rendered

The icon is not rendered
Author
Owner

That's strange, for me it's working, maybe we could debug it together.

That's strange, for me it's working, maybe we could debug it together.
@ -0,0 +28,4 @@
@impl true
def render(assigns) do
~H"""
<Layouts.app flash={@flash} current_user={@current_user}>
Owner

Nice approach ! Thank you :)
Overall I like the sum of statistics and I think its enough for the first version. Some ideas regarding the UI
We could categorize the statistics:
Mitglieder
Aktive Mitglieder: xx
Inaktive Mitglieder: xx

Mitgliederzahlen nach Jahr
TABELLE

  • zur tabelle:
  • Eintritte / Austritte als Zeilen, Jahre als Spalten
  • auch als Tabelle (table-element, aktuelle nur span und divs) wie bei Beträge

Beiträge:
Offener betrag (was genau bedeutet offener betrag, vielleicht eher ausstehend?)
Beträge auch vielleicht bezahlt / unbezahl etc als Zeilen und jahre als Spalten?
Auf jeden Fall einheitlich zu Mitgliedern

Perspektivisch
Filte rnach Jahren
Statistik nach Beitragsarten?

Nice approach ! Thank you :) Overall I like the sum of statistics and I think its enough for the first version. Some ideas regarding the UI We could categorize the statistics: **Mitglieder** Aktive Mitglieder: xx Inaktive Mitglieder: xx Mitgliederzahlen nach Jahr TABELLE - zur tabelle: - Eintritte / Austritte als Zeilen, Jahre als Spalten - auch als Tabelle (table-element, aktuelle nur span und divs) wie bei Beträge **Beiträge:** Offener betrag (was genau bedeutet offener betrag, vielleicht eher ausstehend?) Beträge auch vielleicht bezahlt / unbezahl etc als Zeilen und jahre als Spalten? Auf jeden Fall einheitlich zu Mitgliedern **Perspektivisch** Filte rnach Jahren Statistik nach Beitragsarten?
moritz added 3 commits 2026-02-12 17:43:42 +01:00
moritz added 4 commits 2026-02-12 18:45:58 +01:00
moritz added 3 commits 2026-02-12 19:17:48 +01:00
moritz changed title from WIP: Statistic Page closes #310 to Statistic Page closes #310 2026-02-12 19:35:41 +01:00
moritz force-pushed feature/statistics from f9695cf358 to f08c5d59f3 2026-02-12 19:35:54 +01:00 Compare
moritz merged commit b49e795641 into main 2026-02-12 19:40:23 +01:00
moritz deleted branch feature/statistics 2026-02-12 19:40:24 +01:00
Sign in to join this conversation.
No description provided.