- Add EmailEdaConsentService for prod consent requests via SMTP
- Add EdaMailSender, EdaMailParser, EdaMailPoller for IMAP polling
- Polling interval: 15 min (configurable via eda.email.poll-interval-ms)
- Consumption data ingestion from XLSX email attachments
- Add @Profile('!prod') to SimulatedEda*Services as fallback
- Add EMAIL_AUTO to DataSource enum for automated email imports
- Add EDA email configuration to application-prod.yml and application-dev.yml
- Add unit tests for all new services
- Add docs/PLAN-EDA-KOMMUNIKATION.md with full implementation plan
All 232 tests passing.
Root cause: ngx-echarts v18+ requires provideEcharts() in the app
config. Without it, NgxEchartsDirective silently fails to render
charts, causing the dashboard overview chart to appear empty.
Added provideEcharts() to app.config.ts and added
DashboardServiceIntegrationTest for the metering data overview endpoint.
The empty error callback in loadMeteringData() silently swallowed API
failures, causing the chart to show 'Keine Daten' instead of the actual
error. Added proper error logging and user-facing error message.
Also added DashboardServiceTest for getMeteringDataOverview with
scenarios for data, no metering points, empty time range, and
multiple metering points.
The consumption dashboard sent dates like '2026-06-24T00:00:00' without
timezone offset, which Spring could not parse into java.time.Instant.
Append 'Z' suffix to produce valid ISO-8601 UTC timestamps.
Add section-based grouping to the sidebar navigation with headers and
dividers. Menu items are now organized into 4 sections:
- Allgemein (Übersicht, Zählpunkte, Mein Profil)
- Community (Community beitreten, Meine Mitgliedschaften, Verbrauch)
- Tarife & Einladungen (Meine Tarife, Einladungen)
- Verwaltung (Admin-only: Mitgliedschaften, Benutzerverwaltung, etc.)
Only sections with visible items for the current role are rendered.
All 107 frontend tests passing.
Switch interval_start/interval_end from LocalDateTime to Instant across the
entire metering data stack (entity, DTOs, parser, repository, services, controllers).
This eliminates DST-related unique constraint violations that occurred when two
different wall-clock times mapped to the same epoch millis during CET/CEST transitions.
Key changes:
- MeteringData entity: intervalStart/intervalEnd now Instant
- XlsxMeteringDataParser: produces Instant via JVM timezone conversion
- MeteringDataRepository: all queries use Instant parameters
- MeteringDataService: simplified deduplicate() (Instant has no DST ambiguity)
- Added hibernate.jdbc.time_zone=UTC and test profile for in-memory H2
- Added MeteringDataUploadIntegrationTest with real H2 database
- Added DST-specific parser and service tests
- All 216 tests passing
- Add TariffInviteServiceTest, GlobalExceptionHandlerTest, setup-test.ts
- Add compose plans/specs docs
- Extend .gitignore with *.xlsx, *.ps1, *.http, *.py, *.docx
- Remove stale test data files and scripts from working tree
- TariffService: extract ValidatedUserTariffPoints record from validateUserTariffRequest to eliminate redundant MeteringPoint loads in createUserTariff/updateUserTariff (saves 2 SELECT queries per create call)
- TariffService: move source != target check into validateUserTariffRequest for single-responsibility
- MeteringPoint: restrict CascadeType from ALL to PERSIST/MERGE and remove orphanRemoval to prevent accidental cascade deletes of independent Memberships
- MeteringPointService, MembershipService, MeteringDataService, TariffInviteService, TariffService: replace FQ org.springframework.security.access.AccessDeniedException with imported short form for consistency
The generated API service requires userId as a second parameter for
deleteUserTariff(). Inject AuthService and use getCurrentUserId() to
provide the required argument, unblocking the entire frontend test suite.
- 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)
Add comprehensive tests covering:
- Tab navigation (pending/all) with signal verification
- loadAllUsers() calls correct endpoint via generated AdminIAMService
- Error handling for loadPendingUsers and loadAllUsers failures
- Approve/reject user actions including undefined userId guards
- Template rendering: pending tab with Freigeben/Ablehnen buttons
- Template rendering: all users tab without action buttons
- Status badge rendering in both tabs
- Role column display (Unternehmen/Privatperson)
- Empty state messages for both tabs
- Duplicate Status column header bug fix verification
- No reload of allUsers if already loaded
Add onCreate() method with @PrePersist annotation that sets createdAt
to LocalDateTime.now() on first persist, consistent with other entities
(UserTariff, CommunityTariff, etc.). Guard prevents overwriting existing
values. Two new tests verify auto-population and idempotency.
- Add three tabs: Ausstehende Anträge / Aktive Mitgliedschaften / Alle
- Card view for pending tab (existing approve/reject behavior preserved)
- Table view for active and all tabs (Name, Email, Community, Zählpunkt, Priorität, Status)
- getStatusLabel() for German status display (Ausstehend/Aktiv/Inaktiv)
- getStatusBadgeClass() for color-coded status badges
- Client-side filtering for instant tab switching
- Add comprehensive tests (19 test cases)
- Add getAllUsers() to AdminIAMService (fixes compilation for admin-user-approval)
- Fix deleteUserTariff missing userId argument in user-tariff component
- Add activeTab signal ('pending' | 'all') with tab navigation UI
- Add allUsers signal with loadAllUsers() using generated AdminIAMService.getAllUsers()
- Add getStatusLabel() helper for German status labels (Ausstehend/Aktiv/Freigeschaltet/Inaktiv/Abgelehnt)
- Add getStatusBadgeClass() for color-coded status badges (yellow/green/red)
- Fix duplicate 'Status' column header bug in pending users table
- All-users tab shows Name, Email, Status badge, Rolle columns (no action buttons)
- Add 22 passing tests covering signals, helpers, tab switching, approve/reject, and template
Add method to fetch all admin memberships via GET /api/community/admin/memberships
with corresponding unit tests using Angular HttpClientTestingModule.
- Add getAllMemberships_returnsAllStatuses: verifies PENDING, ACTIVE, INACTIVE
- Add getAllMemberships_collectsDistinctUserIds: verifies distinct user ID collection
- Add getAllUsers_returnsSortedByCreatedAtDesc: verifies sorting order
- Add getAllUsers_returnsEmptyList: edge case for empty user list
- Add getAllUsers_includesAllRegistrationStatuses: verifies all statuses present
- All 172 backend tests pass
Add method to retrieve all users ordered by creation date descending.
This supports the admin user management overview feature.
Tests:
- UserRepositoryTest: verify method exists and returns List<User>
Add @Transactional(readOnly = true) method that uses findAllWithDetails()
and batch-fetches users with the same lookup pattern as getPendingMemberships().
Returns List<PendingMembershipResponse> with all memberships (pending, active,
inactive) for the admin overview tab.
Tests: 3 new tests covering normal case, empty list, and missing user.
- Add createdAt LocalDateTime field with @Column(updatable = false)
- No @GeneratedValue - set manually during user creation
- Set createdAt in AuthService.register() and AdminDataInitializer
- Ignore createdAt in UserMapper (mapped manually, not from DTO)
- Add UserTest with 3 tests verifying field, annotation, and default
Add @Query with JOIN FETCH on meteringPoint and energyCommunity, no WHERE clause
to return all memberships regardless of status. Includes reflection-based unit test
verifying method existence and annotation correctness.
- Add frontend upload page with file selection, drag-and-drop, and preview
- Add preview endpoint (POST /api/community/metering-data/preview/xlsx)
- Validate FEED_IN only for PRODUCER, CONSUMPTION only for CONSUMER metering points
- Optimize deduplication with bulk query (fix N+1 problem)
- Eliminate duplicate DB query in validateRecords
- Add 4 new tests for data type validation
- Add navigation entry for admin users
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
- Add pendingMemberships field to AdminStats DTO
- Add 4th card 'Offene Mitgliedsanträge' to admin dashboard
- Rename 'Offene Freigaben' to 'Ausstehende Freischaltungen'
- Update DashboardService to count pending memberships
- Update tests to match new AdminStats structure