Harden workstation UX and seed placeholder scans after Playwright QA.
Fix mobile queue navigation, draft/loading states, and Intake overflow; seed MinIO demo PDFs so document viewing does not 500; add e2e smoke coverage.
This commit is contained in:
@@ -111,6 +111,7 @@ public class CoverSheetController : ControllerBase
|
||||
AssignToUserName: sheet.AssignToUser?.FullName,
|
||||
IsUsed: sheet.IsUsed,
|
||||
BatchId: sheet.BatchId,
|
||||
BatchStatus: sheet.Batch?.Status.ToDbString(),
|
||||
CreatedAt: sheet.CreatedAt,
|
||||
UsedAt: sheet.UsedAt
|
||||
);
|
||||
|
||||
@@ -160,9 +160,25 @@ public class DigitizationBatchesController : ControllerBase
|
||||
|
||||
await RecordDocumentAccessAsync(id);
|
||||
|
||||
var stream = await _storage.DownloadAsync(batch.DocumentRef);
|
||||
Response.Headers.CacheControl = "private, max-age=300";
|
||||
return File(stream, contentType);
|
||||
try
|
||||
{
|
||||
if (!await _storage.ObjectExistsAsync(batch.DocumentRef))
|
||||
return NotFound(ApiResponse<object>.Fail(
|
||||
404,
|
||||
"Scanned document is missing from storage. Re-upload the batch or restore the object.",
|
||||
"DOCUMENT_NOT_FOUND"));
|
||||
|
||||
var stream = await _storage.DownloadAsync(batch.DocumentRef);
|
||||
Response.Headers.CacheControl = "private, max-age=300";
|
||||
return File(stream, contentType);
|
||||
}
|
||||
catch (Exception ex) when (ex is not OperationCanceledException)
|
||||
{
|
||||
return StatusCode(503, ApiResponse<object>.Fail(
|
||||
503,
|
||||
"Document storage is temporarily unavailable.",
|
||||
"DOCUMENT_STORAGE_UNAVAILABLE"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user