Fix data exports UI and scope format
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-06 12:59:38 +01:00
parent e82a10cb8b
commit a3538f6470
5 changed files with 96 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Filament\Resources\DataExportResource\Tables;
use App\Enums\DataExportScope;
use App\Jobs\GenerateDataExport;
use App\Models\DataExport;
use App\Services\Audit\SuperAdminAuditLogger;
@@ -14,6 +15,15 @@ use Illuminate\Support\Number;
class DataExportTable
{
public static function formatScope(DataExportScope|string|null $state): string
{
if ($state instanceof DataExportScope) {
$state = $state->value;
}
return $state ? __('admin.data_exports.scope.'.$state) : '—';
}
public static function configure(Table $table): Table
{
return $table
@@ -31,7 +41,7 @@ class DataExportTable
TextColumn::make('scope')
->label(__('admin.data_exports.fields.scope'))
->badge()
->formatStateUsing(fn (?string $state) => $state ? __('admin.data_exports.scope.'.$state) : '—'),
->formatStateUsing(fn (DataExportScope|string|null $state): string => self::formatScope($state)),
TextColumn::make('status')
->label(__('admin.data_exports.fields.status'))
->badge()