Stage 3 — WO photos + ETA + QR + public tracking page
- HasMedia (Spatie) on WorkOrder with `photos` collection
- eta_at + tracking_token columns; token auto-generated on create
- Public /t/{token} page — tenant-scoped via subdomain, white-label themed
- QR code SVG via chillerlan/php-qrcode (inline modal + download)
- Filament: SpatieMediaLibraryFileUpload + ETA picker + tracking section
- EditWorkOrder header action "Link client (QR)" modal
- Fix: Auditable::dontSubmitEmptyLogs() → dontLogEmptyChanges() (removed in activitylog)
- Tests: TrackingPageTest (4 pass) covering token gen + cross-tenant isolation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,16 @@ class EditWorkOrder extends EditRecord
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\Action::make('tracking')
|
||||
->label('Link client (QR)')
|
||||
->icon('heroicon-m-qr-code')
|
||||
->color('primary')
|
||||
->modalHeading(fn () => 'Tracking client — WO #' . $this->record->number)
|
||||
->modalSubmitAction(false)
|
||||
->modalCancelActionLabel('Închide')
|
||||
->modalContent(fn () => view('filament.tenant.tracking-qr', [
|
||||
'wo' => $this->record,
|
||||
])),
|
||||
Actions\Action::make('pdf')
|
||||
->label('Descarcă PDF')
|
||||
->icon('heroicon-m-document-arrow-down')
|
||||
|
||||
Reference in New Issue
Block a user