- Add EdaCommunicationMethod enum (EMAIL, MESSENGER)
- Add EdaSettings entity with DB-persisted communication method
- Add AdminEdaSettingsController (GET/PUT /api/admin/eda-settings)
- Add EdaCommunicationRouter that resolves the correct EdaConsentService
- Add MessengerEdaConsentService as placeholder (throws UnsupportedOperationException)
- Add AdminEdaSettingsComponent in frontend with radio button selection
- Route /dashboard/admin-eda-settings (ADMIN only)
- Update EdaCommunicationEventListener to use router
- Remove @Profile from EmailEdaConsentService/SimulatedEdaConsentService
- Use @Lazy for EdaMailSender dependency to support non-prod contexts
- Fix pre-existing deleteUserTariff API call mismatch
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
- Fix UserTariffController: use @CurrentUserId instead of broken extractUserId()
- Fix UserTariffController: use @PathVariable instead of @RequestParam for userId in delete
- Add @PreAuthorize annotations to all tariff endpoints (ADMIN for community, MEMBER for user)
- Add duplicate tariff prevention for (source, target) pairs
- Optimize membership check: replace N+1 query with efficient isActiveMemberOfCommunity()
- Update tests to match new membership check API
Backend:
- Add CommunityTariff entity (admin-managed max price + surcharge per community)
- Add UserTariff entity (user-agreed tariffs between metering points)
- Add TariffController (admin endpoints) and UserTariffController (user endpoints)
- Add TariffService with full validation (price <= max, ACTIVE state, membership)
- Add CommunityTariffChangedEvent and UserTariffChangedEvent
- Update NotificationListener to notify members on tariff changes
- Add 27 comprehensive tests for TariffService
Frontend:
- Add AdminTariffComponent (/dashboard/tariffs) for managing community tariffs
- Add UserTariffComponent (/dashboard/my-tariffs) for managing user tariffs
- Add routing and navigation entries
- Regenerate OpenAPI spec and frontend API client
Note: Old Tariff.java entity replaced by CommunityTariff + UserTariff
- Remove invalid JOIN FETCH mp.user from MembershipRepository query
(MeteringPoint has no @ManyToOne User field, only UUID userId)
- Fix OpenApiGeneratorTest: disable security filters for MockMvc,
use UTF-8 for getContentAsString and Files.writeString