Enhance PDF viewing experience with new document viewer

- Replaced button in `Details.cshtml` with a link to a new document viewer page.
- Created `DocumentViewer.cshtml` to display PDFs using an iframe, with a back button and a link to an experimental DevExpress viewer.
- Introduced `DocumentViewerModel` in `DocumentViewer.cshtml.cs` for handling invoice ID and PDF URL.
- Updated `OnGetAsync` in `ViewPdf.cshtml.cs` to set `Content-Disposition` to inline for better PDF rendering in the browser.
This commit is contained in:
OlgunR
2026-06-08 16:59:57 +02:00
parent b515b4f523
commit 1cc617de42
4 changed files with 58 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace DXApp.TemplateKitProject.Pages.Invoices;
public class DocumentViewerModel : PageModel
{
[BindProperty(SupportsGet = true)]
public int Id { get; set; }
public string PdfUrl => $"/Invoices/ViewPdf?id={Id}";
public void OnGet()
{
// Keine serverseitige Logik nötig für die erste Version.
}
}