fix: Filament v5 callbacks $r → $record (Plans/Subs/SuperAdmins/Companies)

+ central PWA: real PNG icons, SW registration, scope=/

- All `fn ($r) =>` and `fn (Type $r) =>` replaced with $record (Filament v5
  injects callback params by name; $r resolved to nothing)
- /pwa/admin-{192,512}.png — generated on-the-fly with GD + DejaVuSans-Bold
- /pwa/admin-icon.svg — vector favicon
- /admin-sw.js — service worker (cache shell, network-first elsewhere)
  with Service-Worker-Allowed: / header
- Manifest scope=/ + start_url=/admin → install prompt fires on Chrome/Edge/Safari
- BODY_END render hook registers SW on central panel
This commit is contained in:
2026-05-08 04:37:25 +00:00
parent 0ac42dde3d
commit d1a18848d3
8 changed files with 142 additions and 35 deletions
@@ -88,11 +88,11 @@ class PlanResource extends Resource
->columns([
Tables\Columns\TextColumn::make('name')->searchable()->sortable(),
Tables\Columns\TextColumn::make('price_monthly')
->money(fn ($r) => $r->currency)
->money(fn ($record) => $record->currency)
->label('Lunar')
->sortable(),
Tables\Columns\TextColumn::make('price_yearly')
->money(fn ($r) => $r->currency)
->money(fn ($record) => $record->currency)
->label('Anual'),
Tables\Columns\TextColumn::make('companies_count')
->counts('companies')