Skip to content

Conversation

@MWG-Logan
Copy link
Owner

This pull request introduces a new feature that allows users to select from a list of active projects before generating a project completion report, improving the user experience and workflow. It adds a new API endpoint to retrieve active projects, updates the frontend to display a project selection table, and enhances authentication configuration and documentation.

Backend/API Enhancements:

  • Added a new Azure Function (ProjectsFunction) and service method (GetActiveProjectsAsync) to provide a list of active projects via the /api/projects endpoint. [1] [2] [3] [4]

Frontend Improvements:

  • Updated Home.razor to load and display active projects in a data grid, allowing users to select a project and generate a report, with improved loading/error handling and UI/UX. [1] [2]
  • Refactored report generation logic to work with the selected project and improved error messages for report and PDF generation actions. [1] [2]

Authentication and SPA Routing Configuration:

  • Enhanced staticwebapp.config.json to include a navigationFallback with exclusions for authentication endpoints and Blazor static assets, ensuring correct routing and authentication flows.

Documentation Updates:

  • Updated README.md and deployment docs to clarify authentication flow, the importance of SPA fallback exclusions, and the configuration of response overrides for unauthenticated users. [1] [2]

Copilot AI and others added 2 commits December 24, 2025 12:52
… configuration (#34)

* Initial plan

* Add navigationFallback to fix auth routing issue

Co-authored-by: MWG-Logan <[email protected]>

* Add critical /.auth/* exclusion to navigationFallback

Co-authored-by: MWG-Logan <[email protected]>

* Update documentation to explain authentication configuration

Co-authored-by: MWG-Logan <[email protected]>

* Update Bezalu.ProjectReporting.Web/staticwebapp.config.json

Co-authored-by: Copilot <[email protected]>

* Add service-worker.published.js to static web app config

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MWG-Logan <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Initial plan

* Add project picker feature with active project listing

Co-authored-by: MWG-Logan <[email protected]>

* Address code review feedback: improve error handling and null checks

Co-authored-by: MWG-Logan <[email protected]>

* Improve error messages to avoid exposing sensitive information

Co-authored-by: MWG-Logan <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MWG-Logan <[email protected]>
Copilot AI review requested due to automatic review settings December 24, 2025 17:59
@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://mango-river-0addcf70f-35.eastus2.2.azurestaticapps.net

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a project selection workflow that allows users to choose from a list of active ConnectWise projects before generating a completion report, significantly improving the user experience. The changes include a new backend API endpoint to retrieve active projects, frontend UI enhancements with a data grid for project selection, and improved authentication configuration and documentation.

Key Changes:

  • Added /api/projects endpoint to retrieve active projects from ConnectWise
  • Refactored the home page to display projects in a selectable data grid before report generation
  • Enhanced Static Web App configuration with proper navigation fallback and exclusions

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Bezalu.ProjectReporting.API/Functions/ProjectsFunction.cs New Azure Function providing the GET /api/projects endpoint
Bezalu.ProjectReporting.API/Services/ProjectReportingService.cs Added GetActiveProjectsAsync method to query ConnectWise for active projects
Bezalu.ProjectReporting.Shared/DTOs/ProjectCompletionReportModels.cs New ProjectListItem DTO for project list data
Bezalu.ProjectReporting.Web/Pages/Home.razor Major UI refactor with project selection grid, improved error handling, and better user flow
Bezalu.ProjectReporting.Web/staticwebapp.config.json Added navigationFallback configuration with exclusions for authentication and static assets
README.md Enhanced authentication flow documentation with SPA routing details
docs/deployment.md Updated deployment documentation with authentication and routing configuration details

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Renamed and relocated Azure Function for project completion reports (ProjectCompletionReportFunction → ReportFunction) for better organization.
- Broadened "active" project filter to include "In Progress" status in ProjectReportingService.
- Enhanced Blazor UI to detect 401 Unauthorized responses and show a login prompt with sign-in button.
- Updated staticwebapp.config.json to require authentication for all routes (/*) instead of just /api/*.
- Minor UI formatting improvements to data grids.
@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://mango-river-0addcf70f-35.eastus2.2.azurestaticapps.net

@MWG-Logan MWG-Logan merged commit 52dd1b0 into main Dec 24, 2025
9 of 10 checks passed
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.

2 participants