Commit Graph

10 Commits

Author SHA1 Message Date
7aa08cf8e9 Enable Wasm native build and refactor signature layout
Updated EnvelopeGenerator.ReceiverUI.csproj to enable native WebAssembly builds and load all globalization data for improved localization support.

Refactored ReportViewer.razor to enhance layout calculations for the signature section:
- Introduced constants for better readability and maintainability.
- Dynamically adjusted band height and padding to fit content without overlap.
- Updated control positioning and sizing using calculated values.
- Changed font style of the signature label to regular and reordered control additions for clarity.
2026-05-28 19:43:03 +02:00
2a8fed166b Adjust signature layout and bottom margin height
Increased the `bottomMargin` height from 140F to 175F to provide additional space. Updated the `signatureInformation` format to simplify text structure, remove redundant labels, and use a short date format.

Modified the `XRLabel` to enable multiline text, adjusted its height to 70F, and changed text alignment to `TopLeft`. Updated the `XRPictureBox` position by shifting its Y-coordinate to 80F for better alignment with the new layout.
2026-05-28 17:08:18 +02:00
60f01565da Add user input fields and enhance signature details
Added input fields for "Full Name," "Position," and "Place" in `ReportViewer.razor` to collect additional user details. Introduced validation for required fields ("Full Name" and "Place") in `ApplySignatureAsync`. Updated `CreateSignedReportInstance` and `AddSignature` to include these details in the signature label, which now dynamically displays full name, position (if provided), place, and date. Adjusted layout and bounds for proper alignment and spacing in the report.
2026-05-28 16:57:27 +02:00
0a22e4e5cc Enhance signature popup with multiple input modes
Refactored `@using` directives in `ReportViewer.razor` to use specific aliases for improved readability. Updated the signature popup to support three input modes: "Draw", "Text", and "Image", with a tabbed interface for switching between modes. Added font selection for typed signatures and improved state management for signature modes.

Refactored JavaScript interop methods to handle initialization, clearing, and data retrieval for each signature mode. Enhanced `receiver-signature.js` to support typed and image-based signatures, including rendering text-based signatures and handling image uploads with scaling and centering.

Improved maintainability by modularizing code and extracting reusable functions. Enhanced user experience with dynamic UI updates and better handling of signature state changes.
2026-05-28 14:39:38 +02:00
0ca487d5bd Enhance globalization and error handling support
Added support for culture-specific globalization in the Blazor WebAssembly project by disabling invariant globalization and enabling the loading of all globalization data.

Improved error handling in `ReportViewer.razor` by wrapping the `ExportToAsync` method in a `try-catch` block to handle export failures gracefully. Updated user-facing messages to provide clearer feedback in case of errors.
2026-05-28 13:57:42 +02:00
12a0974efe Refactor signature input into popup modal
The signature input process has been refactored to use a `<DxPopup>` modal for better user experience. The `<canvas>` element for capturing the signature has been moved into the popup, which is dynamically displayed when the user interacts with the "Unterschrift hinzufügen" or "Unterschrift erneuern" button.

Dynamic messages now provide clearer feedback based on whether a signature has been applied. Signature-related actions (renew, apply, close) have been consolidated into the popup's footer, decluttering the main interface.

New properties (`SignaturePopupVisible`, `PopupValidationMessage`) and methods (`OpenSignaturePopupAsync`, `RenewSignatureAsync`, `CloseSignaturePopup`) have been added to manage the popup and its behavior. The `ApplySignatureAsync` method has been updated to handle popup-specific validation and close the popup after applying the signature.

The `OnAfterRenderAsync` method has been removed, and signature pad initialization has been moved to `OpenSignaturePopupAsync`. The `ApplySignatureToReport` method has been removed, with its functionality integrated into `ApplySignatureAsync`.

Minor layout adjustments and validation logic improvements have been made. The "Export Signed PDF" button is now disabled unless a signature has been applied.
2026-05-26 09:55:40 +02:00
367850fee5 Refactor ReportViewer for reusability and dynamic updates
Refactored `ReportViewer.razor` to improve maintainability and
ensure dynamic updates to the `DxReportViewer` component.

- Added `@key` attribute bound to `ViewerKey` to trigger re-renders.
- Introduced `CreateReportInstance` and `CreateSignedReportInstance`
  helper methods to encapsulate report creation logic.
- Updated `OnInitializedAsync`, `ClearSignatureAsync`, and
  `ApplySignatureAsync` to use the new helper methods.
- Incremented `ViewerKey` in relevant methods to ensure proper
  re-rendering of the `DxReportViewer` component.
- Replaced `ApplySignatureToReport` with `CreateSignedReportInstance`.

These changes improve code modularity, readability, and ensure
the UI reflects the latest state of the report.
2026-05-26 02:39:25 +02:00
09cc639466 Add signature input and PDF export functionality
Introduced a signature input feature in `ReportViewer.razor` to allow users to draw a signature on a canvas and embed it into reports before exporting as a signed PDF.

- Added a canvas (`receiver-signature-pad`) and buttons for clearing, applying, and exporting signatures.
- Injected `IJSRuntime` for JavaScript interop and added methods for signature handling (`ClearSignatureAsync`, `ApplySignatureAsync`, `ExportSignedPdfAsync`).
- Embedded the signature as an image and label in the report's bottom margin.
- Added `receiver-signature.js` to manage the signature pad, including drawing, clearing, and exporting the signature as a Base64 image.
- Updated `index.html` to include the new JavaScript file.
- Displayed validation messages for missing or invalid signatures.
2026-05-26 01:02:07 +02:00
c3730d109b Add in-memory report storage and async report handling
Introduced `InMemoryReportStorageWebExtension` to manage
reports in memory, enabling dynamic report storage and
retrieval. Updated `ReportViewer.razor` to conditionally
render the `DxReportViewer` component and initialize
reports asynchronously.

Configured dependency injection in `Program.cs` to register
`InMemoryReportStorageWebExtension` as a singleton and
integrated it with `CustomReportProvider`. Registered
`EnvelopeGenerator.ReceiverUI.PredefinedReports.Report` as
a trusted class for deserialization.

Enhanced `CustomReportProvider` to fetch reports from
memory or generate them dynamically using `ReportsFactory`.
Added necessary `using` directives and ensured proper
report lifecycle management.
2026-05-25 14:04:25 +02:00
f510cfb5ad INIT 2026-05-22 10:50:25 +02:00