Skip to content

Adds initial Dashboard index page#1023

Open
tom-karasch wants to merge 35 commits into
Devfrom
954-dashboard-include-an-advanced-search---priority-1
Open

Adds initial Dashboard index page#1023
tom-karasch wants to merge 35 commits into
Devfrom
954-dashboard-include-an-advanced-search---priority-1

Conversation

@tom-karasch

Copy link
Copy Markdown
Member

Initializes the Dashboard Razor Page as the foundation for the advanced search functionality. Part of issue #954.

@tom-karasch tom-karasch self-assigned this Apr 6, 2026
@tom-karasch tom-karasch added enhancement request New feature or request high priority Critical issue that should be addressed quickly labels Apr 6, 2026
@tom-karasch tom-karasch linked an issue Apr 6, 2026 that may be closed by this pull request
@tom-karasch tom-karasch added the Task Project Task label Apr 6, 2026
@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch from 5484471 to 03eba78 Compare April 8, 2026 15:11
@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch 4 times, most recently from 2bcc069 to 9776fc4 Compare April 22, 2026 15:15
@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch 2 times, most recently from ea0c2a2 to 9f06919 Compare April 27, 2026 15:50
@sonarqubecloud

Copy link
Copy Markdown

@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch 2 times, most recently from 65e2874 to 07c9110 Compare May 20, 2026 22:09
@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch 3 times, most recently from f7b06d3 to 615dc88 Compare June 5, 2026 23:21
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
13.2% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube Cloud

@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch 2 times, most recently from 7be6fe2 to 4030c10 Compare June 23, 2026 19:54
@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch from 6c60362 to e67b99f Compare July 6, 2026 19:38
@dougwaldron
dougwaldron force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch from 86716b1 to 83144c8 Compare July 7, 2026 19:08
@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch from ee8a16e to aa2ac9a Compare July 13, 2026 22:13
Initializes the Dashboard Razor Page as the foundation for the advanced search functionality. Part of issue #954.
Updates the sign-in logic to redirect users with assigned roles to the Dashboard instead of the Facilities list. Adds initial content to the Dashboard index page and removes the unused HSI menu partial. Part of issue #954.
Deletes the unused `_HSIMenuPartial.cshtml` file to clean up the codebase. Part of issue #954.
Introduces the `UserProgram` entity to enable tracking of user associations with specific organizational units or programs, a foundational step for advanced search capabilities on the dashboard.

Also, adjusts the conditional logic in `SiteSummaryHelper` to ensure drinking water well information is displayed only when relevant to the groundwater score.

Part of issue #954.
Replaces the placeholder Dashboard page with a more comprehensive layout including collapsible sections for current facilities, events, and data maintenance. The associated backend logic is prepared to fetch user-specific data.

Also introduces an `IXmlSerializable Settings` property to the `UserProgram` entity, enabling the storage of user-specific configurations for their associated programs, which can be leveraged by the dashboard.

Part of issue #954.
Introduces the `UserProgram` entity as a distinct, top-level domain concept, complete with its DTOs and dedicated repository for managing available programs.

The existing `UserProgram` entity under `FMS.Domain/Entities/Users/` is renamed `UserInfo` and updated to hold explicit references to the new `UserProgram` and `UserPosition` entities. This clarifies the relationship between users, programs, and positions by separating the definition of a program from a user's specific association.

Also corrects a typo in `UserPositionSummaryDto.cs`.

Part of issue #954.
Introduces basic Razor Pages and navigation links for managing `UserProgram` and `UserPosition` entities, facilitating their independent maintenance. The `IUserProgramRepository` is also registered for dependency injection.

Corrects an error in `ParcelType` maintenance pages where `UserPosition` DTOs were mistakenly used instead of `ParcelType` DTOs.

The recently introduced `UserInfo` entity definition and its `DbSet` entry are temporarily commented out from the domain and infrastructure layers. This indicates a pause or re-evaluation of its design and role in managing user-specific program and position relationships.

Part of issue #954.
The `UserInfo` entity, previously temporarily commented out, is now fully removed from the domain. This commit also applies the database migration to persist the `UserProgram` and `UserPosition` entities, along with the new `Points` and `ReportEligible` fields for `EventType`, which reflect earlier domain model changes. Finally, the complete Razor Pages for `UserPosition` maintenance are implemented, providing user interface for CRUD and status management.
Part of issue #954.
Adds a `Description` property to `UserProgram` and `UserPosition` entities, their DTOs, and associated repository methods. This includes a database migration to persist the new field, validation for unique descriptions, and full integration into the `Add`, `Edit`, and `Index` Razor Pages for comprehensive maintenance. This provides more context and detail for these records.
Also adds a display attribute to `SoilStatusSummaryDto.Description`.
Part of issue #954.
Refactors `IUserService.UpdateUserDesignationsAsync` to accept `Guid?` for UserProgram, OrganizationalUnit, and UserPosition. This allows for more robust updates and the ability to clear existing designations by passing `null`.

Consolidates the user designation editing UI into the `/Account/Index` Razor Page, which can now handle updates for both the current user and other users (when an optional `id` parameter is provided). This centralizes the management of user programs, units, and positions.

Adds `AutoInclude` for `ApplicationUser` navigation properties (`UserProgram`, `UserUnit`, `UserPosition`) in the `FmsDbContext` to streamline data retrieval.

Part of issue #954.
Updates user ID checks in the Account page to use `Guid.Empty` for more robust validation of provided IDs. Also refines exception messages to be more generic and consistent.
Part of issue #954.
Consolidates individual accordion components into a single main accordion for a cleaner UI. Refines padding and button styling for improved presentation.

Also retrieves and exposes current user roles on the page model, preparing for role-based content display.
Part of issue #954.
Introduces data transfer objects and a repository layer to retrieve
facility information specific to dashboard views. This allows
fetching facilities associated with users, organizational units,
and programs/facility types for display. Placeholders for event-related
DTOs are also included.

Part of issue #954.
…ard user data

Introduces a direct relationship between Organizational Units and User Programs, enabling more precise categorization and management.

This includes:
- Adding the `UserProgram` property to the `OrganizationalUnit` entity and its DTOs.
- Updating `IOrganizationalUnitRepository` to support `UserProgram` in create and edit operations.
- Generating a database migration to establish the `UserProgramId` foreign key on the `OrganizationalUnits` table.
- Updating Organizational Unit maintenance pages (Add, Edit, Index) to allow selecting and displaying the associated program.

Additionally, the Dashboard repository is enhanced to fetch `ApplicationUser` details and facilities associated with either the compliance officer or related events.

Part of issue #954.
- Expands `DashboardUserFacilitiesDto` to include additional facility details like facility number, organizational unit, compliance officer, county, and location class.
- Replaces the placeholder dashboard page (`Index.cshtml`) with tables displaying the current user's facilities and facilities belonging to their assigned organizational unit.
- Corrects the `GetUnitFacilitiesById` method to filter by the current user's `UserUnit.Id`, ensuring facilities are correctly displayed for the user's associated unit.

Part of issue #954.
- Makes `DomainConstants` a static class and removes unused namespaces for improved design and clarity.
- Updates the development publish profile to `SkipExtraFilesOnServer = true` to prevent accidental deletion of non-deployed files on the server during publish.

Part of issue #954.
- Expands dashboard DTOs to include comprehensive facility and event details.
- Implements repository methods to fetch HSI facilities and recent events (last year), filtered by user, organizational unit, or program manager roles.
- Updates the dashboard UI to dynamically display facilities and events relevant to the current user's responsibilities and position.
- Adds conditional rendering for the Data Maintenance section based on user role.
- Adds a `Facility` navigation property to the `Event` entity for eager loading facility details.

Part of issue #954.
- Replace event contractor and amount with event comment in event DTOs.
- Add organizational unit to program event DTO and ensure eager loading.
- Restructure dashboard event sections into nested accordions for improved clarity.
- Implement role-based edit and delete actions directly on event tables.
- Group program events by organizational unit for program managers (PM2).
- Adjust event sorting in dashboard repository queries for better ordering.

Part of issue #954.
- Initialize `UserUnits` property to ensure it's never null.
- Replace LINQ-based collection of organizational units with a manual `foreach` loop.
- Remove the unused `System.Linq` namespace import.

Part of issue #954.
- Change dashboard `UserUnits` collection to store unit names as `string` instead of `OrganizationalUnit` objects.
- Update dashboard display and filtering logic to utilize the simplified `UserUnits` string collection.
- Enhance `UserUnits` population logic to collect unique unit names, including null checks.
- Correct the application name displayed on the login page to "File Management System Web Application (FMS)".

Part of issue #954.
- Enclose each organizational unit's active event table within a Bootstrap accordion component.
- This enhances the dashboard's visual organization and improves navigability by allowing users to collapse and expand event lists for specific units.
- Clean up commented-out LINQ code from the PageModel.

Part of issue #954.
- Wrap organizational unit names in accordion headers with an `` tag.
- This enhances visual hierarchy and readability for better user experience.

Part of issue #954.
- This column provided information that was deemed unnecessary for the current dashboard views.
- Simplifying the table display improves readability and focuses user attention on more relevant event details.

Part of issue #954.
- Enclose the "My Facilities", "My Unit Facilities", and "My Program Facilities" tables within individual Bootstrap accordion components.
- This improves the dashboard's organization, reduces visual clutter, and allows users to collapse and expand specific facility lists for better navigation.

Part of issue #954.
- Adjust the main dashboard title (`ViewData["Title"]`) from `h3` to `h4` for improved semantic hierarchy.
- Enclose the text within all accordion buttons (e.g., "My Facilities", "Data Maintenance") with `` tags to standardize heading levels within the collapsible sections.
- Clarify the descriptive text for the 'Data Maintenance' section.
- Correct the `aria-labelledby` attribute for the 'Data Maintenance' accordion to match its ID.

These changes enhance visual consistency and clarity on the dashboard.

Part of issue #954.
The `IAuthorizationService` dependency was no longer being consumed within the `IndexModel` constructor. Removing unused dependencies contributes to cleaner code and reduced overhead.

Part of issue #954.
@tom-karasch
tom-karasch force-pushed the 954-dashboard-include-an-advanced-search---priority-1 branch from aa2ac9a to a741d77 Compare July 13, 2026 22:34
…in corresponding event tables, providing immediate context.

- Update facility list queries to sort by `Facility.Name` for a more intuitive display across user, unit, and program dashboards.
- Introduce direct navigation links to Facilities Search and Map pages from the dashboard.
- Refine the Program Manager (PM2) dashboard by organizing program facilities and events by organizational unit, improving overview and navigability.
- Include facility and event total counts for better data summarization.
- Perform minor code cleanup: remove duplicate property assignment in `DashboardUnitFacilitiesDto`, remove unused usings, and adjust event delete role check from `ComplianceOfficer` to `SiteMaintenance`.

Part of issue #954.
…nd improved organization

Part of issue #954.

- Introduce fiscal year-based event filtering (`GetFiscalYearStartDate`) to provide a more relevant view of active events, including those without specific start or completion dates.
- Expand facility type filtering to include "VRP" alongside "HSI" in dashboard facility lists.
- Refactor the dashboard UI to prioritize event display, presenting detailed event tables categorized by completion status (pending, ongoing, completed).
- Implement hierarchical grouping of events for Program Managers (PM1 by Compliance Officer, PM2 by Unit then Compliance Officer) for better oversight.
- Reorder dashboard sections to place events before facilities for non-PM2 users.
- Remove an unused commented-out line from `Startup.cs`.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
25.1% Duplication on New Code (required ≤ 10%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

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

Labels

enhancement request New feature or request high priority Critical issue that should be addressed quickly Task Project Task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard - Priority 11

1 participant