Integrated DevExpress Blazor components and added a responsive,
modern UI for the sender dashboard. Replaced placeholder content
with a functional layout, including a grid-based envelope viewer
with filtering, pagination, and detailed row templates.
Added status badges, progress indicators, and a sender action
bar with buttons for creating, editing, deleting, refreshing
envelopes, and logging out. Introduced loading and error
handling states for better user experience.
Refactored data loading with `LoadEnvelopesAsync` to fetch and
categorize envelopes. Added methods for envelope management
and logout functionality. Improved state management and removed
unused code. These changes lay the groundwork for future
enhancements.
Updated the `EnvelopeDto` class to use a simplified receiver model (`EnvelopeReceiverSimpleDto`) for streamlined data handling. Added the `EnvelopeReceiverSimpleDto` class to represent basic receiver information (`Name`, `Email`, `Signed`).
Introduced the `EnvelopeStatus` enumeration in `EnvelopeStatus.cs` to define envelope lifecycle statuses, repurposed for the `ReceiverUI` context. Added `EnvelopeStatusExtensions` with `IsActive` and `IsCompleted` methods to evaluate envelope status states.
A new asynchronous method `LogoutSenderAsync` was added to the `AuthService` class to handle sender user logout. The method sends a POST request to the `/api/auth/logout` endpoint and removes the authentication cookie. It accepts an optional `CancellationToken` parameter and returns a `bool` indicating the success of the operation. XML documentation comments were included to describe the method's functionality.
Added an `[Authorize]` attribute with the "Sender" policy to restrict access to the `EnvelopeSenderPage.razor`. Updated the page title to "Umschläge" and added placeholder text for data loading.
Injected `EnvelopeService` and `IJSRuntime` to fetch and log active and completed envelopes. Introduced `_activeEnvelopes` and `_completedEnvelopes` fields to store fetched data. Configured `JsonSerializerOptions` for consistent JSON handling.
Implemented `OnInitializedAsync` to fetch data asynchronously, log results to the console, and handle errors gracefully.
Changed the `launchUrl` for the HTTPS profile in `launchSettings.json` from `"swagger"` to `"sender"`, updating the default URL path.
Disabled `launchBrowser` for the `EnvelopeGenerator.ReceiverUI` profile, preventing the browser from automatically opening when this profile is executed.
Registered EnvelopeService with a scoped lifetime in the
dependency injection container by adding
`builder.Services.AddScoped<EnvelopeService>();` to Program.cs.
This ensures a new instance is created per HTTP request.
Introduced the `EnvelopeDto` class to represent envelope data with JSON property mappings. Added the `EnvelopeService` class to handle API interactions, including fetching envelopes with optional filters and query string construction using `Microsoft.AspNetCore.WebUtilities`. Updated the project file to include the required package reference for query string manipulation.
Added `OnlyActive` and `OnlyCompleted` properties to the `ReadEnvelopeQuery` class to enable filtering envelopes by their active or completed status. Updated the `ReadEnvelopeQueryHandler` to apply these filters when the properties are set.
Enhanced the `EnvelopeStatus` class by introducing `Active` and `Completed` status lists and adding extension methods (`IsActive` and `IsCompleted`) to determine status categories. Included necessary `using` directives for `System` and `System.Linq`.
The `System` namespace was added to `EnvelopeStatus.cs` to enable additional functionality. A documentation URL in the comments was updated to point to a new location, replacing the outdated link.
Introduced a new static class `EnvelopeStatusExtensions` with two extension methods for the `EnvelopeStatus` enum:
- `IsActive`: Checks if the status is active (between `EnvelopeCreated` and `EnvelopePartlySigned`).
- `IsCompleted`: Checks if the status is completed (between `EnvelopeCompletelySigned` and `EnvelopeWithdrawn`).
Migrate ReceiverUI to hybrid Blazor WebUI architecture
Migrated the `EnvelopeGenerator.ReceiverUI` project to a new
hybrid Blazor architecture (`EnvelopeGenerator.WebUI`) that
supports both Blazor Server and WebAssembly (WASM) modes.
- Added `WebUI` (server) and `WebUI.Client` (WASM) projects.
- Migrated client-side pages to `WebUI.Client` with
`@rendermode InteractiveWebAssembly`.
- Migrated server-side pages to `WebUI` with
`@rendermode InteractiveServer`.
- Added YARP reverse proxy (`yarp.json`) to `WebUI` for API
and Swagger routing.
- Registered DevExpress server-side services in `WebUI` to
enable backend rendering for `DxPdfViewer`.
- Migrated services, models, options, and data files to
`WebUI.Client` with updated namespaces.
- Merged static files (JS, CSS, configuration) from
`ReceiverUI/wwwroot` to `WebUI/wwwroot`.
- Retained `ReceiverUI` project for rollback safety.
This migration resolves the issue where the DevExpress
`DxPdfViewer` failed to render PDFs in a pure Blazor
WebAssembly environment due to missing server-side rendering
services.
The `using DevExpress.XtraReports.UI;` directive was modified in
both `Report.cs` and `ReportsFactory.cs` due to the addition of a
non-visible character (likely a Byte Order Mark or BOM) at the
beginning of the line. This change does not affect functionality
but may resolve potential issues with tools or version control
systems sensitive to such characters.
Enhanced `appsettings.json` with `ApiOptions` and `PdfViewerOptions` for better customization of rendering and zoom behaviors.
Added comprehensive styles in `envelope-viewer.css` for the layout, toolbar, thumbnails, and responsive design of the envelope viewer.
Introduced `receiver-signature.js` to manage signature functionality, including drawing, typed, and image-based signatures, as well as dynamic annotation checkboxes.
Integrated `Typed.js` (UMD version) for typing animations with configurable speeds, looping, and event hooks.
Added DevExpress WASM components for PDF and report viewing, including Blazor PDF Viewer and Report Viewer. Configured DevExpress Blazor Reporting for development mode and registered custom reporting services and trusted classes for deserialization.
Replaced default `HttpClient` with a scoped service using WebUI's YARP proxy. Introduced configuration options for `ApiOptions` and `PdfViewerOptions` and registered multiple business services in the DI container.
Added in-memory report storage and font loading functionality. Updated `_Imports.razor` with additional namespaces. Re-enabled and implemented previously commented-out configuration options and removed obsolete code.
Added JSON serialization options to ignore reference cycles in
the `AddControllers` method by configuring `ReferenceHandler`
to `IgnoreCycles`. Updated the `AddAuthorizationBuilder` to
include authentication schemes for the `SenderOrReceiver`
policy, requiring roles and schemes for enhanced security.
Replaced the generic [Authorize] attribute with a more specific
[Authorize(Policy = AuthPolicy.SenderOrReceiver)] to enforce
a stricter authorization policy. Added a `using` directive for
`EnvelopeGenerator.Domain.Constants` to support the new policy.
The `[Authorize]` attribute on the `Check` method was updated to specify the `AuthScheme.Sender` authentication scheme. This change ensures that the `Check` endpoint now requires authentication using this specific scheme, enhancing security and supporting multiple authentication schemes within the application.
Removed custom mapping logic for the `Receivers` property in the
`Envelope` to `EnvelopeDto` mapping within the `MappingProfile`
class. The mapping now uses default behavior without projecting
`EnvelopeReceivers` to `Receivers`.
Replaced the `Receivers` property with `EnvelopeReceivers` in the `EnvelopeDto` class to improve clarity and better align with the updated data model. The new property uses `IEnumerable<EnvelopeReceiverDto>?` instead of `IEnumerable<ReceiverDto>?`.
Introduced several new classes in the `EnvelopeGenerator.WebUI.Client` namespace:
- Added `Adjustment` class for financial adjustments with deterministic randomization.
- Added `Customer` class to load customer data from a SQL data source with fallback.
- Added `DataItem` class to represent detailed billing data, including adjustments.
- Added `DataItemList` class implementing `IList` for dynamic `DataItem` generation.
- Added `DeterministicRandom` class for reproducible random value generation.
- Added `Term` struct to define payment terms.
- Added `ReportsFactory` class to manage predefined reports.
Updated `MIGRATION_CONTEXT.md` to document the completion of Phase 5 (Data & PredefinedReports Migration) and outline next steps for resolving DevExpress-related errors in Phase 7.
Introduced new models (`SignatureDto`, `SignatureCaptureDto`, `EnvelopeReceiverDto`) to support a signature-based workflow. Added services for handling API interactions (`SignatureService`, `AuthService`, `DocumentService`, `EnvelopeReceiverService`, `SignatureCacheService`).
Enhanced configuration with `ApiOptions` and `PdfViewerOptions`. Integrated DevExpress features with custom data connection providers, in-memory report storage, and font loading utilities.
Marked `AnnotationDto` and `AnnotationService` as `[Obsolete]` in favor of newer implementations. Added detailed documentation for coordinate systems, unit conversions, and usage scenarios.
Added `EnvelopeSenderPage.razor` as a placeholder for the sender's dashboard.
Updated `Index.razor` to include a homepage with a hero header, feature badges,
and dynamic description rendering using JavaScript interop.
Implemented `LoginReceiverPage.razor` for secure document access via access code,
with error handling and user feedback for various login states.
Implemented `LoginSenderPage.razor` for sender authentication, including error
handling, password visibility toggle, and redirection to the sender dashboard.
Added YARP reverse proxy for API routing and DevExpress Blazor components for advanced UI features, including PDF Viewer. Updated `EnvelopeGenerator.WebUI.csproj` to include necessary packages and ensure `yarp.json` is copied to the output directory. Modified `Program.cs` to configure YARP and DevExpress services, and adjusted the HTTP pipeline for proper routing. Updated `appsettings.json` with `ApiOptions` and `PdfViewerOptions`. Added `yarp.json` to define reverse proxy routes and clusters.
Migrated `EnvelopeGenerator.ReceiverUI` to a new hybrid
Blazor architecture (`EnvelopeGenerator.WebUI`) combining
Blazor Server and WebAssembly modes. This resolves the
issue with `DxPdfViewer` requiring server-side rendering.
Key changes:
- Introduced `WebUI` (Blazor Server) and `WebUI.Client`
(Blazor WebAssembly) projects.
- Added YARP reverse proxy to `WebUI` for API routing.
- Migrated client-side pages to `WebUI.Client` with
`@rendermode InteractiveWebAssembly`.
- Migrated server-side pages (e.g., PDF viewer) to `WebUI`
with `@rendermode InteractiveServer`.
- Copied services, models, and static files from `ReceiverUI`.
- Configured DevExpress server-side and WASM components.
Includes detailed migration documentation, rollback plan,
and testing strategies to ensure stability.
Introduced a new Blazor WebAssembly project (`EnvelopeGenerator.WebUI.Client`) targeting .NET 8.0 for client-side functionality.
Added a Blazor Server project (`EnvelopeGenerator.WebUI`) to host the application and enable server-side rendering.
Created essential Razor components (`MainLayout.razor`, `Home.razor`, `Routes.razor`, `Error.razor`, etc.) for layouts, routing, and error handling.
Configured project files, solution structure, and build settings. Added necessary styles, app settings, and launch profiles for development.
Modified the `[Authorize]` attribute on the `GetAsync` method in the `EnvelopeController` class to specify `AuthenticationSchemes = AuthScheme.Sender`. This change enforces a more specific authentication requirement, allowing access only to users authenticated under the `Sender` scheme.
The mapping for the `Envelope` entity to the `EnvelopeDto` was
modified to include a custom mapping for the `Receivers` property.
The `Receivers` property in `EnvelopeDto` is now populated by
mapping from the `EnvelopeReceivers` collection in the `Envelope`
entity, specifically selecting the `Receiver` property from each
`EnvelopeReceiver` object.
Enhanced the EnvelopeDto class by introducing a new `Receivers` property of type `IEnumerable<ReceiverDto>?` to support including recipient information in the envelope DTO.
Added necessary `using` directives for `EnvelopeReceiver` and `Receiver` DTOs to ensure proper namespace references. Updated the class to accommodate this new functionality.
The `UserId` property in `ReadEnvelopeQuery` was changed from `public` to `internal` to improve encapsulation. A new `Authorize` method was added to set the `UserId` property using the `with` expression.
In `ReadEnvelopeQueryHandler`, the LINQ query was updated to replace the inclusion of `Documents` with `EnvelopeReceivers` and their associated `Receiver`, reflecting a shift in the data being eagerly loaded to support updated functionality.
Changed `SendReminderEmails`, `UseAccessCode`, and `TfaEnabled`
properties from non-nullable `bool` to nullable `bool?` to allow
representation of `null` values. Added conditional initialization
of `TfaEnabled` to `false` for `NETFRAMEWORK` target.
Bump the project version from 1.4.1 to 1.4.2 in the `<Version>` tag for the NuGet package. Updated `<AssemblyVersion>` and `<FileVersion>` to `1.4.2.0` to maintain consistency with the new version. This reflects a minor version update for API compatibility and file versioning.
- Added CSS styles for `.pdf-viewer` and its child elements
to ensure proper dimensions and layout for PDF display.
- Enhanced `EnvelopeReceiverPage_DxPdfViewer.razor` with
conditional rendering for improved user feedback.
- Introduced `EnvelopeReceiverPage_embed.razor` with a new
route `/envelope/Embed`, drag-and-drop file upload, and
embedded PDF viewer using `<embed>`.
- Implemented default PDF loading from embedded resources
and Base64 encoding for embedding.
- Refactored file upload handling with `OnFilesUploading`
and centralized allowed file types logic.
- Improved user experience with success and informational
messages for file upload and PDF viewing.
The `dx-blazor-reporting-components.bs5.css` file reference was removed from `EnvelopeReceiverPage_DxPdfViewer.razor`. This CSS file was likely used for styling DevExpress Blazor Reporting Viewer components, which are no longer needed or have been replaced.
Added a new Razor page `EnvelopeReceiverPage_DxPdfViewer.razor` with a route `/envelope/DxPdfViewer`. Integrated DevExpress components, including `DxPdfViewer` for displaying PDF documents and `DxFileInput` for drag-and-drop file uploads. Styled the drag-and-drop zone with custom CSS. Initialized the viewer with a default embedded PDF file and implemented logic to handle file uploads dynamically.
Refactored the `Report` property to `_report` with nullable support
and updated `EnvelopeKey` to use `init` for immutability.
Made `CreateReport` asynchronous, returning `Task<XtraReport>`,
and removed redundant `BasePdfBytes` property. Simplified predefined
report fetching by removing `ReportStorage.TryGetReport`. Improved
error handling for missing or invalid `pdfBytes` in `CreateReport`.
Made minor formatting and structural improvements for clarity.