Commit Graph

5 Commits

Author SHA1 Message Date
dac44dcb7d fix(frontend): align @angular/platform-browser-dynamic version to ^21.2.0
Fixed peer dependency conflict by updating @angular/platform-browser-dynamic
from ^20.0.7 to ^21.2.0 to match the rest of the Angular 21 packages.
2026-07-25 17:52:59 +02:00
54f45d6bf7 test(frontend): fix vitest test infrastructure and admin-user-approval tests
- Add vitest.config.ts for Angular 21 @angular/build:unit-test runner
- Install @angular/platform-browser-dynamic for TestBed initialization
- Regenerate API client from OpenAPI spec (npm run generate-api)
- Fix spec: use includes() for URL matching (generated API prepends basePath)
- Fix spec: 'should not reload' test assertion (0 not 1) for no-reload behavior
- All 107 frontend tests now pass (17 test files)
2026-07-24 09:33:19 +02:00
4b7b26231f feat(community): add member consumption dashboard with coverage preview
Backend:
- ConsumptionDashboardService: aggregates consumption and community
  feed-in data with daily/hourly granularity based on date range
- Coverage calculation: min(consumption, communityFeedIn) per interval
- Ownership check on dashboard endpoint
- 6 new aggregate queries in MeteringDataRepository
- findActiveMeteringPointIdsByCommunityId in MembershipRepository
- 6 unit tests for ConsumptionDashboardService

Frontend:
- Apache ECharts via ngx-echarts for chart visualization
- ConsumptionDashboardComponent with metering point selector,
  date range picker, quick-range buttons (7/30/90 days)
- Chart: blue bars (consumption), green bars (covered), orange
  line (community feed-in), tooltip with coverage percentage
- Summary cards: total consumption, coverage %, feed-in, covered kWh
- Warning when user has no community membership
- Route /dashboard/consumption (MEMBER only)

Tests: 143/143 passing
2026-07-22 13:23:58 +02:00
ad47f7399e added admin approval list
implemented approval (untested)
implemented eda consent simulation (untested)
2026-06-17 11:08:44 +02:00
4ef6d32093 first working frontend/backend 2026-06-01 16:59:49 +02:00