Refactor _dotNetRef type and remove unused redirection

Updated the `_dotNetRef` field to use a more specific type, `DotNetObjectReference<EnvelopeReceiverPage_DxReportViewer>`, for better alignment with the component. Removed obsolete redirection logic from `/receiver/{key}` to `/envelope/{key}` in `OnInitializedAsync`, as it is no longer needed or handled elsewhere. Retained envelope access validation logic.
This commit is contained in:
2026-06-11 11:59:21 +02:00
parent 895fd5c509
commit a9fb82bbea

View File

@@ -307,7 +307,7 @@ Shown="OnPopupShownAsync">
byte[]? _basePdfBytes;
// annotation IDs the user has checked via overlay checkboxes
readonly HashSet<long> _checkedAnnotations = [];
DotNetObjectReference<ReportViewer>? _dotNetRef;
DotNetObjectReference<EnvelopeReceiverPage_DxReportViewer>? _dotNetRef;
int _lastOverlayViewerKey = -1;
async Task LogoutAsync() {
@@ -319,13 +319,6 @@ Shown="OnPopupShownAsync">
}
protected override async Task OnInitializedAsync() {
// ? REDIRECT: /receiver/{key} -> /envelope/{key} (NEW PDF.js viewer)
if (!string.IsNullOrWhiteSpace(EnvelopeKey)) {
Navigation.NavigateTo($"/envelope/{Uri.EscapeDataString(EnvelopeKey)}", forceLoad: false);
return;
}
if (!string.IsNullOrWhiteSpace(EnvelopeKey)) {
var hasAccess = await AuthService.CheckEnvelopeAccessAsync(EnvelopeKey);
if (!hasAccess) {