Updated the `ContentTemplate` to enhance the layout of the
`#attachment-content` container by using `display: flex` and
ensuring full height utilization. Added CSS rules for consistent
styling of the `.CodeMirror` editor, including font size and
height adjustments.
Simplified CodeMirror initialization for XML files by removing
redundant `<textarea>` creation and directly embedding the
editor. Added `viewportMargin: Infinity` for better rendering
and used `setTimeout` to ensure proper sizing and refresh.
Refined plain text rendering for non-XML files to maintain a
clean and consistent display.
Replaced direct file links with a JavaScript-based viewer
(`openAttachmentViewer`) and added a DevExtreme Popup
(`attachment-viewer-popup`) for displaying attachments in a
modal dialog. The viewer supports PDFs (via PDF.js), XML
(with CodeMirror syntax highlighting), plain text, images,
and provides a fallback for unsupported file types.
Dynamically load CodeMirror for XML files and handle errors
gracefully when loading file content. Added `onAttachmentPopupHiding`
to clear popup content on close.
Updated `ViewAttachmentModel` to return text/XML content
directly for AJAX requests, improving frontend performance
and enabling dynamic content loading.
Added shading and overlay color to the PDF Viewer popup for better user experience. Adjusted z-index values in the `<style>` block to ensure the popup and its overlay appear above other elements. Updated the `openPdfViewer` function to explicitly set the container and position options, and ensured z-index values are reapplied after the popup is shown.
Introduced the `InvoiceAttachment` entity and its relationship with `ZugferdInvoice` to manage extracted invoice attachments. Updated `AppDbContext` and added a migration to create the `InvoiceAttachments` table with cascading delete behavior and an index for optimized queries.
Enhanced the UI to display attachments in `Details.cshtml`, including file type icons, file size, and extraction date. Added a new `ViewAttachment` page to render or download attachments based on their type, with support for XML, plain text, images, and downloads.
Implemented `AttachmentViewerService` to determine viewer types and MIME types for attachments. Registered the service in the DI container. Updated `Upload.cshtml.cs` to save extracted attachments to the database.
Improved user experience with syntax highlighting for XML files and appropriate messages for unsupported file types.
Added support for advanced annotation tools, including signature and stamp management, along with accessibility improvements. Introduced WebAssembly binaries (`qcms_bg.wasm`, `quickjs-eval.wasm`, `openjpeg.wasm`, `jbig2.wasm`) for enhanced performance in color management, JavaScript execution, and image decoding.
Implemented a JavaScript fallback (`openjpeg_nowasm_fallback.js`) for environments without WebAssembly support. Updated `Details.cshtml` to include a PDF viewer popup and added a new Razor Page (`ViewPdf.cshtml`) for secure PDF file access. Registered `.mjs` MIME type in `Program.cs` for PDF.js compatibility.
Enhanced localization with translations for multiple languages in `viewer.ftl` and added new icons, dialogs, and accessibility features. Updated `DXApp.sln` to include a new project for template management. These changes improve functionality, modularity, and user experience.
Added a "Details" column to the grid in `Index.cshtml` with a button linking to the new invoice details page. The button dynamically generates the URL using the invoice ID.
Created `Details.cshtml` to display detailed invoice information, including metadata such as seller, buyer, amounts, and dates. Added a back button and error handling for missing invoices.
Introduced `DetailsModel` in `Details.cshtml.cs` to fetch invoice data using `AppDbContext`. Implemented the `OnGetAsync` method to retrieve data asynchronously and handle cases where the invoice is not found.