Files
fotospiel-app/app/Filament/Resources/TenantResource/Pages/ViewTenantLifecycle.php
Codex Agent 412ecbe691
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled
Implement superadmin audit log for mutations
2026-01-02 11:57:49 +01:00

50 lines
1.6 KiB
PHP

<?php
namespace App\Filament\Resources\TenantResource\Pages;
use App\Filament\Resources\TenantResource;
use App\Filament\Resources\TenantResource\Schemas\TenantLifecycleInfolist;
use App\Services\Audit\SuperAdminAuditLogger;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;
use Filament\Schemas\Schema;
class ViewTenantLifecycle extends ViewRecord
{
protected static string $resource = TenantResource::class;
public static function getNavigationLabel(): string
{
return __('admin.tenants.pages.lifecycle');
}
public function getTitle(): string
{
return __('admin.tenants.pages.lifecycle');
}
protected function getHeaderActions(): array
{
return [
Actions\EditAction::make()
->after(fn (array $data, $record) => app(SuperAdminAuditLogger::class)->recordModelMutation(
'updated',
$record,
SuperAdminAuditLogger::fieldsMetadata($data),
static::class
)),
Actions\ActionGroup::make(TenantResource::lifecycleActions())
->label(__('admin.tenants.actions.lifecycle'))
->icon('heroicon-o-shield-exclamation'),
Actions\ActionGroup::make(TenantResource::lifecycleManagementActions())
->label(__('admin.tenants.actions.lifecycle_controls'))
->icon('heroicon-o-adjustments-horizontal'),
];
}
public function infolist(Schema $schema): Schema
{
return TenantLifecycleInfolist::configure($schema);
}
}