This commit removes all features and UI elements related to signature handling in the `EnvelopeReceiverPage_DxReportViewer.razor` file. Key changes include: - Removed signature creation (drawing, typing, uploading) and associated UI components like the signature popup and action bar. - Removed annotation handling logic, including toggling checkboxes and applying signatures to annotations. - Removed PDF export functionality for signed documents. - Deleted methods and properties related to signature handling, such as `AddSignature`, `OnInitializedAsync`, and `SignaturePopupVisible`. - Removed `@inject` services and JavaScript interop calls related to signature handling. - Simplified the `DxReportViewer` usage to only display the report without overlays or interactions. - Removed envelope metadata display and logout functionality. The page now focuses solely on displaying reports without any signature-related features.
53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
@page "/envelope/{EnvelopeKey}/DxReportViewer"
|
|
@using XtraReport = DevExpress.XtraReports.UI.XtraReport
|
|
@using DevExpress.Blazor.Reporting
|
|
@using Microsoft.Extensions.Options
|
|
@using EnvelopeGenerator.ReceiverUI.Options
|
|
@using EnvelopeGenerator.ReceiverUI.Services
|
|
@inject InMemoryReportStorageWebExtension ReportStorage
|
|
@inject DocumentService DocumentService
|
|
@inject IOptions<ApiOptions> AppOptions
|
|
|
|
<link href="_content/DevExpress.Blazor.Themes/blazing-berry.bs5.min.css" rel="stylesheet" />
|
|
<link href="_content/DevExpress.Blazor.Reporting.Viewer/css/dx-blazor-reporting-components.bs5.css" rel="stylesheet" />
|
|
|
|
|
|
@if (Report is not null) {
|
|
<DxReportViewer Report="Report" RootCssClasses="w-100 h-100" Zoom="1.3" />
|
|
}
|
|
|
|
@code {
|
|
[Parameter] public string EnvelopeKey { get; set; } = string.Empty;
|
|
|
|
XtraReport? Report;
|
|
byte[]? _basePdfBytes;
|
|
|
|
protected override async Task OnInitializedAsync() {
|
|
if (!AppOptions.Value.ForceToUseFakeDocument) {
|
|
var (pdfBytes, _) = await DocumentService.GetDocumentAsync(EnvelopeKey);
|
|
if (pdfBytes is { Length: > 0 })
|
|
_basePdfBytes = pdfBytes;
|
|
}
|
|
|
|
Report = BuildFreshBaseReport();
|
|
}
|
|
|
|
XtraReport BuildFreshBaseReport() {
|
|
if (_basePdfBytes is { Length: > 0 }) {
|
|
var report = new XtraReport();
|
|
var detail = new DevExpress.XtraReports.UI.DetailBand();
|
|
report.Bands.Add(detail);
|
|
detail.Controls.Add(new DevExpress.XtraReports.UI.XRPdfContent { Source = _basePdfBytes, GenerateOwnPages = true });
|
|
return report;
|
|
}
|
|
return CreateReportInstance();
|
|
}
|
|
|
|
XtraReport CreateReportInstance() {
|
|
return ReportStorage.TryGetReport("LargeDatasetReport", out var savedReport)
|
|
? savedReport
|
|
: PredefinedReports.ReportsFactory.GetReport("LargeDatasetReport");
|
|
}
|
|
}
|
|
|