Commit Graph

6 Commits

Author SHA1 Message Date
e62cdc9d9d Update NavMenu links and add commented-out navigation
- Added a commented-out block for "Home" and "Document Viewer (JS-Based)" navigation links.
- Updated the "reportviewer" link text to "Empfänger-UI."
- Updated the "reportdesigner" link text to "Umschlag-UI."
2026-05-26 10:27:37 +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