Random drug screen and Blazor UI front end#100
Merged
Conversation
Added a new Blazor Server project, `RandomDrugScreenUI`, to the solution with configurations for `Debug` and `Release` builds. Updated NuGet package dependencies across multiple projects to their latest stable versions, including `NLog`, `System.Drawing.Common`, `Newtonsoft.Json`, and `Microsoft.Data.SqlClient`, among others. Refactored `FinRepository` to simplify its structure and improve code readability. Introduced the Open Iconic icon set, including font files (`.woff`, `.ttf`, `.eot`, `.svg`) and associated CSS for scalable vector icons. Updated `NLog.xsd` schema to enhance logging capabilities with new layouts, targets, and filtering options. These changes improve maintainability, modernize the solution, and enhance functionality across the application.
Refactored `FinRepository` to streamline implementation, replace `System` with `Microsoft.Data.SqlClient`, and remove unused namespaces. Updated `GetActive` and `GetFin` methods to use `PetaPoco.Sql.Builder`. Added `RandomDrugScreenPerson` entity class with database schema mapping and excluded non-mapped properties. Introduced `RandomDrugScreenPersonRepository` for data access operations, leveraging dependency injection.
- Updated solution structure to include `DataGridViewGrouper` under `#Utilities` and removed outdated references. - Enhanced `App.config` and `Settings` files to update database server configurations. - Refactored project files to align with the new `#Utilities` structure and simplified target frameworks to `net8.0`. - Created `RandomDrugScreenService` for managing candidates, random selection, and data import with secure RNG. - Added new repository methods for querying candidates, bulk operations, and fetching distinct clients/shifts. - Implemented Blazor UI pages: - Dashboard with statistics and quick actions. - Candidate Management for CRUD operations and filtering. - Random Selection with validation, results display, and export options. - Updated `Program.cs` for dependency injection and added `AppSettings` for configuration. - Enhanced `IUnitOfWork` to include `RandomDrugScreenPersonRepository`. - Made `TestDate` nullable in `RandomDrugScreenPerson` model. - Improved error handling, logging, and validation across the application. - Updated documentation with architecture, implementation details, and testing strategy.
Marked Phase 3 tasks as completed in `IMPLEMENTATION_PLAN.md`, including: - ImportCandidates.razor: Added candidate import page with client selection, CSV upload, preview, and import functionality. - Reports.razor: Added reporting page with dynamic report generation, client summary, and CSV export. - Enhanced UI/UX with validation, error handling, and responsive design. - Updated documentation to reflect readiness for Phase 4.
- Replaced dropdowns with a reusable `AutocompleteInput<TItem>` component for client selection across multiple pages, improving UX for large datasets with real-time search and keyboard support. - Updated Candidate Management to require client selection before displaying candidates, improving clarity and performance. - Added a "Clients with Candidates" section to the dashboard, showing active/total counts and direct navigation to manage clients. - Enabled query parameter support for pre-selecting clients in Candidate Management, improving workflow consistency. - Improved Random Selection, Import, and Reports pages with autocomplete integration and dynamic data loading. - Introduced CSS-isolated styling for autocomplete, ensuring a polished and responsive design. - Optimized performance by deferring candidate loading until client selection and supporting client-side filtering. - Enhanced error handling with clear messages and logging. - Added detailed documentation for new features and workflows. - Refactored code for better maintainability and scalability.
Transformed the app from "Random Drug Screen" to a modular "Lab Outreach" platform. Key updates include: - Integrated robust authentication with Windows and SQL modes. - Added CSV export functionality with JavaScript interop. - Redesigned home page and navigation for modular structure. - Created dedicated dashboards for "Random Drug Screen" and placeholders for "Client Viewer." - Updated documentation for authentication, CSV export, and modular architecture. - Removed unused components (e.g., `Counter.razor`, `FetchData.razor`). - Added utilities for password hashing and CSV generation.
Consolidated client viewer functionality into `ClientList.razor`: - Removed `ClientDetails.razor` and integrated its features. - Added autocomplete search and inactive client toggle. - Implemented inline client details display with quick actions. - Enhanced error handling, loading states, and UI responsiveness. Updated `Index.razor` and `NavMenu.razor`: - Reflected new Client Viewer functionality in the home page. - Simplified navigation with a single "Search Clients" link. Added `RequisitionForms.razor` as a placeholder: - Included breadcrumbs and "Coming Soon" messaging. - Previewed planned requisition form features. Documented changes in `CLIENT_VIEWER_MODULE.md`: - Highlighted single-page design, UX improvements, and future plans. - Provided testing recommendations and performance considerations. Improved code consistency and maintainability: - Reused `AutocompleteInput` component for search. - Streamlined client-related functionality for better scalability.
Refactored `CandidateManagement.razor` to use modular components for better maintainability and reusability. Introduced new components for client selection, random selection, candidate management, and reporting. Added comprehensive reporting functionality with CSV and PDF export capabilities, including support for three report types: All Candidates, Non-Selected Candidates, and Client Summary. Integrated live previews and summary statistics. Enhanced the RDS Dashboard with improved layouts, inactive client toggles, and better data filtering. Updated navigation and added a "Quick Access" section for streamlined user experience. Included new dependencies for PDF generation and added a `downloadFromBase64` function in `fileDownload.js` for client-side downloads. Documented the implementation and migration strategy in `REPORTS_IMPLEMENTATION.md` and `Address Requisition Specifications.md`.
Refactored `GenerateReportPdf` in `CandidateManagement.razor` to improve PDF structure, formatting, and user experience: - Added portrait orientation, page footer, and repeating headers. - Implemented alternating row colors for better readability. - Adjusted table column widths for improved alignment. - Included client summary statistics for relevant reports. - Styled headers with bold text and shading for distinction. - Improved error handling and standardized filename format. - Used `MigraDoc` library for professional PDF rendering.
Updated `_Host.cshtml` to use `favicon.ico` instead of `favicon.png` for better browser compatibility. Modified `RandomDrugScreenUI.csproj` to manage `logoicon2.ico` and `logoicon2.png` as non-content files. Enhanced `MainLayout.razor` by improving the `AuthorizeView` structure and styling. Updated `NavMenu.razor` to include `logoicon2.png` alongside the "Lab Outreach" text for better branding. Improved `NavMenu.razor.css` with hover effects, text styling, and layout adjustments for the logo. Added `logoicon2.png` as a new branding asset.
Enhanced application security by enabling HTTPS redirection and configuring HSTS in production. Updated `Program.cs` to enforce secure communication and added explicit Kestrel endpoint configurations in `appsettings.json` and `appsettings.Production.json`. Configured SSL port and added a new "https" profile in `launchSettings.json`. Disabled detailed errors and adjusted logging levels for production. Created comprehensive SSL documentation: - `SSL_CONFIGURATION.md`: Detailed setup and deployment guide. - `SSL_IMPLEMENTATION_SUMMARY.md`: Summary of changes and security features. - `SSL_QUICKSTART.md`: Quick start guide for developers. These changes ensure HIPAA compliance and improve the security posture of the application.
Enhanced authentication flow by switching from Integrated Authentication to SQL Server Authentication for database connections. Updated `CustomAuthenticationStateProvider` to handle session-based and Windows authentication more robustly, with improved error handling and caching. Introduced `ILogger` and integrated NLog for structured logging, adding detailed log messages for authentication flow and diagnostics. Added `AuthDiagnostics.razor` for authentication diagnostics and `/auth-diagnostics` endpoint for troubleshooting. Introduced `UserCircuitHandler` to preserve Windows usernames during Blazor circuit lifetime. Simplified `AuthenticationWrapper` and delegated responsibilities to `CustomAuthenticationStateProvider`. Updated `appsettings.json` to include `DatabaseUsername` and `DatabasePassword` for SQL Server Authentication. Added new documentation (`AUTHENTICATION_CONFIG.md`, `QUICK_SETUP_GUIDE.md`) and SQL scripts for setting up the `labpa_service` account. Improved role and permission handling, error messages, and dependency injection setup. Refactored code for readability and maintainability. Enhanced security by recommending strong passwords and secure storage for credentials.
Rebranded the application from "Random Drug Screen" to "Lab Outreach" with a modular architecture for "Random Drug Screen" and "Client Viewer" modules. Updated the home page to serve as a module selector. Enhanced the Random Drug Screen module with dashboards, candidate management, CSV import, and reporting features. Added a Client Viewer module with a searchable client list and requisition form placeholders. Introduced shared components like `AutocompleteInput` and reusable modals. Improved UI with responsive design, validation messages, and accessible navigation. Added authentication support with `Login.razor`, `AuthDiagnostics.razor`, and enhanced `CustomAuthenticationStateProvider`. Implemented CSV export functionality using `fileDownload.js`. Improved error handling, optimized database queries, and added client-side filtering for scalability. Created detailed documentation for features and implementation plans. Removed legacy files, including `RandomSelection.razor`, `Reports.razor`, and deployment artifacts. Added new branding assets (`logoicon2.png`) and integrated Bootstrap for styling.
Migrated functionality from RandomDrugScreenUI to LabOutreachUI, including: - Authentication setup with `CustomAuthenticationStateProvider`, `Login.razor`, and `AuthenticationWrapper.razor`. - Added `LabOutreachUI\Shared\AutocompleteInput.razor` for reusable autocomplete functionality. - Introduced client viewer module with inline client details display. - Updated CSV export utilities to reference `LabOutreachUI.Utilities`. - Added Blazor UI components for pages like `Index.razor`, `CandidateManagement.razor`, and `Reports.razor`. - Replaced `RandomDrugScreenUI.styles.css` with `LabOutreachUI.styles.css`. - Implemented reporting functionality with `ReportsPanel.razor`. - Configured SSL/HTTPS for `LabOutreachUI` and updated related files. - Updated SQL setup script for password hashing using `LabOutreachUI.Utilities`. - Adjusted logging configuration to use `LabOutreachUI.Authentication.*`. These changes establish `LabOutreachUI` as a parallel application with similar features to `RandomDrugScreenUI`.
Replaced custom authentication wrappers with Blazor's built-in `CascadingAuthenticationState` and introduced `WindowsAuthenticationMiddleware` for validating Windows-authenticated users against the database. Added `DatabaseUserAuthorizationHandler` to enforce database-based user policies. Implemented `AccessDenied.razor` and diagnostics pages for better feedback and troubleshooting. Updated layouts and styles for improved user experience and responsiveness. Switched to Integrated Windows Authentication in project configuration. Enhanced logging and error handling, including 403 redirects to the access denied page. Removed legacy authentication code and streamlined session handling.
Removed "Contacts" and "Reports" buttons and placeholders from `ClientList.razor`. Removed "Status" sections and updated feature availability in `Index.razor`. Refactored layout structure in `MainLayout.razor` for readability. Deleted `SurveyPrompt.razor` component and its associated code. Performed general cleanup and formatting for maintainability.
- Added Blazor components for requisition forms (CLIREQ, PTHREQ, CYTREQ, custody, lab office, and ED lab forms) with precise positioning. - Implemented `FormPrintService` and `RequisitionPrintingService` for HTML generation, printer management, and audit tracking. - Introduced `RequisitionPrintTrack` model and repository for database logging of print jobs. - Enhanced authentication with `DevelopmentAuthenticationHandler` for local debugging and `UseWindowsAuthentication` toggle for production. - Updated `WindowsAuthenticationMiddleware` for improved logging and claim management. - Added `requisition-forms.css` for legacy-compatible styles and `requisitionPrint.js` for browser-based printing. - Replaced placeholder UI in `RequisitionForms.razor` with `AddressRequisitionPrint` component. - Documented implementation and usage in `Printing-User-Guide.md` and `Requisition-Form-Layout-Guide.md`.
Introduced a new RDS module with fine-grained access control: - Added `access_random_drug_screen` column to `emp` table. - Updated SQL project to include new permission script. - Implemented `RandomDrugScreen` authorization policy. - Enhanced middleware to add RDS-related claims. - Updated `UserSecurity` UI to manage RDS permissions. - Secured RDS pages with `[Authorize]` attributes. - Improved logging in authorization handlers. - Added progressive disclosure for RDS UI elements. - Created troubleshooting and UI testing guides. - Ensured defense-in-depth security for RDS features.
Introduced a robust documentation system with user, admin, and quick reference guides. Added Markdown rendering using `Markdig` and PDF generation support with `MigraDocCore`. Updated `LabOutreachUI.csproj` to include new dependencies and ensure Markdown files are copied to the output directory. Enhanced the UI across multiple components: - Added help buttons to `CandidateManagement.razor`, `Index.razor`, and `RDSDashboard.razor`. - Updated `MainLayout.razor` and `NavMenu.razor` to include a "Help & Support" section. - Introduced `Help.razor` for dynamic documentation rendering with a sidebar and content area. Added `documentation.css` for consistent styling of documentation pages. Improved accessibility to diagnostics and help sections throughout the application.
Refactor `<AutocompleteInput>` for the client field to include additional properties like `Items`, `SearchProperty`, `ValueProperty`, and `ItemTemplate` for improved functionality. Add a nullable `clientAutocomplete` field for programmatic interaction and introduce a `RenderFragment<Client>` template to customize the display of autocomplete items. Override `OnParametersSetAsync` to initialize the autocomplete component when editing an existing candidate, ensuring the selected client is pre-populated. These changes improve the user experience by making the client selection process more interactive and user-friendly.
Refactored lifecycle methods by replacing `OnParametersSetAsync` with `OnParametersSet` for synchronous parameter handling and introducing `OnAfterRenderAsync` to manage rendering logic. Added `hasSetInitialValue` and `lastClientMnemonic` fields to improve state management. Simplified `AutocompleteInput` initialization by removing redundant `Task.Delay(10)`. Reformatted `HandleSave` and `HandleCancel` methods for consistency. Enhanced overall state handling to ensure proper behavior when modal visibility or candidate data changes.
Enhanced printing capabilities with support for dot-matrix printers using PCL5 commands. Key changes include: - Added `UseDotMatrixRawPrinting` property in `ApplicationParameters` for enabling raw printing. - Improved `SystemParametersRepository` with better data type handling and logging. - Updated `RequisitionPrintingService` to support alignment testing, single, and batch printing for dot-matrix printers. - Enhanced `AddressRequisitionPrint.razor` with a toggle for browser vs. dot-matrix printing, dynamic UI updates, and validation. - Introduced `DotMatrixRequisitionService` and `PCL5FormatterService` for generating PCL5 commands. - Added `RawPrinterHelper` for direct printer communication via Win32 APIs. - Updated styles in `requisition-forms.css` for better alignment on pin-fed forms. - Added comprehensive testing and integration documentation. These changes improve accuracy, reliability, and user experience for printing 3-ply pin-fed requisition forms.
Migrated from PCL5-based printing to text-only mode for dot-matrix requisition printing, simplifying the print process and improving compatibility. Introduced a file-based emulator for development and testing. Updated `RequisitionPrintingService` to support plain text printing and added validation for printer access. Redesigned multiple UI components (`AddressRequisitionPrint.razor`, `CandidateManagement.razor`, `ClientList.razor`, `RDSDashboard.razor`) for compact layouts, better readability, and modernized styles. Enhanced printer configuration management with a new admin page (`PrinterConfiguration.razor`) and improved validation messages. Documented the migration to text-only mode, emulator usage, and network printer configuration. Added temporary hardcoded printer support while preparing for database-driven configuration. Updated styles in `requisition-forms.css` to align with text-only printing.
Updated `web.config` to forward Windows Authentication tokens to the application by adding `forwardWindowsAuthToken="true"`. Added detailed IIS configuration steps in `IIS-Configuration-Steps.md` to guide setting up Windows Authentication, including manual and automated methods, application pool configuration, browser settings, and troubleshooting procedures. These changes ensure secure and functional authentication for ASP.NET Core applications hosted in IIS.
Enhanced client validation and error handling for printing, including support for multiple copies with detailed logging for failures. Updated dot-matrix emulation to generate separate files per copy and improved output messaging. Standardized logging and improved exception handling for better diagnostics.
Reformatted RequisitionPrintingService.cs for improved readability and maintainability. Applied consistent indentation, brace style, and error handling structure throughout. No changes to business logic; all updates are related to code style and clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.