feat(dashboard): latest documents & open incidents widgets with open actions#22
Merged
Conversation
Register ApplyRuntimeSettings as persistent middleware so it runs on Livewire AJAX requests (upload/update), not just the initial page load. Filament processes file uploads inside those requests, so the S3 StorageSettings were never applied and uploads failed. This also covers Mail/Auth/General settings on Livewire requests. Also remove the dangling AdminTestPanelProvider reference and add a regression test guarding the persistent middleware registration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add two auto-discovered Filament table widgets to the App panel: - LatestDocumentsTableWidget: newest uploaded document attachments - OpenIncidentsTableWidget: currently open incidents, newest first Both follow the WarrantyExpiringTableWidget pattern with German labels. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an 'Öffnen' row action to the latest documents widget that opens each document inline in a new tab. Because attachments live on a private disk, add an authenticated attachments.open route that streams the file inline via a new AttachmentController. Also redirect unauthenticated web requests to the Filament panel login, since the app has no standalone login route. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an 'Öffnen' row action to the open incidents widget that navigates to the incident's asset edit page, where the incident is managed via the incidents relation manager. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new Filament dashboard widgets to the App panel, each with an Öffnen (open) row action.
LatestDocumentsTableWidget) — newest uploaded document attachments (type = 'document'), showing title, category, attached-to type, uploader, and upload time. Open action streams the file inline in a new tab.OpenIncidentsTableWidget) — currently open incidents (closed_dateis null), newest first, showing title, asset model, serial, opened date, and days-open badge. Open action navigates to the incident's asset edit page (incidents are managed via the asset's relation manager).Both widgets are auto-discovered, span full width, use
trans()with newlang/defiles, and follow the existingWarrantyExpiringTableWidgetpattern.Notable changes
attachments.openroute +AttachmentController— attachments live on a private disk, so there's no public URL. The route is authenticated and streams the file inline viaStorage::disk()->response().redirectGuestsTo(filament.app.auth.login)inbootstrap/app.php. The app previously had no standaloneloginroute, so the newauth-protected route needed a redirect target for unauthenticated users.Notes
attachments.openroute lets any authenticated user open any attachment by ID — consistent with the existing relation-manager download action, which also has no per-record authorization. Restricting by asset ownership would be a follow-up.fix(settings): apply runtime settings on Livewire requests.Testing
attachments.openroute (inline streaming, 404 on missing file, guest redirect).🤖 Generated with Claude Code