Add IncludeDocAndDocRes option to envelope queries

Introduced a new boolean property `IncludeDocAndDocRes` in the `ReadEnvelopeQuery` class to control the inclusion of document and document result details in query results. Updated `ReadEnvelopeQueryHandler` to handle this property, returning a simplified `EnvelopeDto` when set to `false`.

Modified `SenderPage.razor` to exclude document details by passing `includeDocAndDocRes: false` to `EnvelopeService.GetAsync()`. Enhanced `EnvelopeService` to accept and process the `includeDocAndDocRes` parameter, ensuring API requests respect this preference.
This commit is contained in:
2026-10-26 15:24:18 +01:00
parent c746612d80
commit 8d27718062
3 changed files with 94 additions and 1 deletions

View File

@@ -629,7 +629,7 @@
try
{
_allEnvelopes = await EnvelopeService.GetAsync() ?? [];
_allEnvelopes = await EnvelopeService.GetAsync(includeDocAndDocRes: false) ?? [];
// Split into active and completed based on effective status
// (history-aware: rejected envelopes should not stay in active tab).

View File

@@ -25,6 +25,7 @@ public class EnvelopeService(IHttpClientFactory clientFactory)
string? uuid = null,
bool? onlyActive = null,
bool? onlyCompleted = null,
bool? includeDocAndDocRes = null,
CancellationToken cancel = default)
{
var baseUrl = $"/api/Envelope";
@@ -46,6 +47,10 @@ public class EnvelopeService(IHttpClientFactory clientFactory)
{
queryParams["OnlyCompleted"] = onlyCompleted.Value.ToString();
}
if (includeDocAndDocRes.HasValue)
{
queryParams["IncludeDocAndDocRes"] = includeDocAndDocRes.Value.ToString();
}
var url = QueryHelpers.AddQueryString(baseUrl, queryParams);