Skip to content

fixes problem showing event info and resolves show case samples also shows environment samples on gis dashboard#13737

Merged
obinna-h-n merged 1 commit intodevelopmentfrom
bugfixes-13470-13723
Nov 24, 2025
Merged

fixes problem showing event info and resolves show case samples also shows environment samples on gis dashboard#13737
obinna-h-n merged 1 commit intodevelopmentfrom
bugfixes-13470-13723

Conversation

@obinna-h-n
Copy link
Copy Markdown
Contributor

@obinna-h-n obinna-h-n commented Nov 24, 2025

…showing environ sameples

Fixes #13470, #13723

Summary by CodeRabbit

  • New Features

    • Added new user permission for accessing the adverse events following immunization dashboard.
  • Improvements

    • Updated event data retrieval on geographic dashboards.
  • Access Control

    • Enabled archived events viewing for administrator and national user roles.
    • Enhanced access control requirements for Epipulse export functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

@obinna-h-n obinna-h-n merged commit 1f2e107 into development Nov 24, 2025
3 of 9 checks passed
@obinna-h-n obinna-h-n deleted the bugfixes-13470-13723 branch November 24, 2025 16:21
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 24, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Refactors geographical analysis dashboard event display by replacing static pre-fetched event data with dynamic criteria-based fetching via DashboardFacade. Adds new user rights for adverse events dashboard access and EVENT_VIEW_ARCHIVED permissions for admin and national users. Introduces feature-level access control for EPIPULSE export functionality.

Changes

Cohort / File(s) Summary
Permission & Schema Updates
sormas-api/src/main/resources/enum.properties, sormas-backend/src/main/resources/sql/sormas_schema.sql
Adds new enum key for adverse events dashboard access. Inserts EVENT_VIEW_ARCHIVED user right for ADMIN and NATIONAL_USER roles; adds corresponding schema version (598).
GIS Dashboard Event Fetching Refactoring
sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/gis/GisDashboardDataProvider.java, sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/gis/GisDashboardMapComponent.java
Removes static event data fields and getters/setters from GisDashboardDataProvider. Adds buildEventDashboardCriteria() method. Updates GisDashboardMapComponent to fetch events dynamically via DashboardFacade using criteria instead of accepting pre-fetched lists. Changes showEventMarkers() to build and retrieve events internally. Updates UI state (showEnvironmentalSamples default, showEventsCheckBox visibility).
Feature Access Control
sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/AbstractStatisticsView.java
Adds FeatureType permission layer to EPIPULSE export access check alongside existing UserRight check.

Sequence Diagram

sequenceDiagram
    participant User
    participant GisDashboardMapComponent as GIS Dashboard<br/>Map Component
    participant GisDashboardDataProvider as GIS Dashboard<br/>Data Provider
    participant DashboardFacade

    rect rgb(200, 220, 240)
    Note over User,DashboardFacade: Old Flow (Static Pre-fetch)
    User->>GisDashboardMapComponent: Show Events (Checkbox)
    GisDashboardMapComponent->>GisDashboardDataProvider: getEvents()
    GisDashboardDataProvider-->>GisDashboardMapComponent: List<DashboardEventDto>
    GisDashboardMapComponent->>GisDashboardMapComponent: showEventMarkers(events)
    end

    rect rgb(220, 240, 200)
    Note over User,DashboardFacade: New Flow (Dynamic Criteria-based)
    User->>GisDashboardMapComponent: Show Events (Checkbox)
    GisDashboardMapComponent->>GisDashboardMapComponent: showEventMarkers()
    GisDashboardMapComponent->>GisDashboardDataProvider: buildEventDashboardCriteria()
    GisDashboardDataProvider-->>GisDashboardMapComponent: DashboardCriteria
    GisDashboardMapComponent->>DashboardFacade: getEventsByDashboardCriteria(criteria)
    DashboardFacade-->>GisDashboardMapComponent: List<DashboardEventDto>
    GisDashboardMapComponent->>GisDashboardMapComponent: Render event markers
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

  • GisDashboardMapComponent event-fetching refactoring: Review the switch from static pre-fetched events to dynamic criteria-based DashboardFacade calls to ensure correct filtering and permissions are applied.
  • Method signature and field removal in GisDashboardDataProvider: Verify all call sites have been updated to use the new buildEventDashboardCriteria() pattern and no orphaned references remain.
  • showEventMarkers() behavioral change: Confirm internal event-building logic correctly applies disease and date range filters and handles edge cases (no events, permission errors).

Poem

🐰 On dashboards bright where maps once stalled,
Events now flow with criteria called—
No static lists, but fetches true,
The geographical view finds its way through.
New rights to see what matters most,
And access layers guard the post! 📍

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfixes-13470-13723

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3967ba0 and b711b1b.

📒 Files selected for processing (5)
  • sormas-api/src/main/resources/enum.properties (1 hunks)
  • sormas-backend/src/main/resources/sql/sormas_schema.sql (1 hunks)
  • sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/gis/GisDashboardDataProvider.java (2 hunks)
  • sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/gis/GisDashboardMapComponent.java (7 hunks)
  • sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/AbstractStatisticsView.java (2 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with showing event information on geographical analysis dashboard

1 participant