fix(admin): render workflow rule summaries correctly

This commit is contained in:
Meghdad committed 2026-07-22 17:33:37 +03:30
1 parent 728d5d5807
commit 4542a5eea3
2 files changed
+24 -1

No files matched your search

@@ -3,6 +3,7 @@
namespace App\Filament\Resources\WorkflowConfigurations\Schemas;
use App\Domain\Loan\Enums\WorkflowConfigurationStatus;
use App\Models\WorkflowConfigurationStep;
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\RepeatableEntry;
use Filament\Infolists\Components\TextEntry;
@@ -56,7 +57,7 @@ class WorkflowConfigurationInfolist
IconEntry::make('is_enabled')->label('Enabled')->boolean(),
TextEntry::make('rules')
->label('Rules')
->formatStateUsing(fn (array $state): string => collect($state)
->state(fn (WorkflowConfigurationStep $record): string => collect($record->rules)
->map(fn (mixed $value, string $key): string => str($key)->headline().': '.(is_bool($value) ? ($value ? 'Yes' : 'No') : $value))
->implode(' · '))
->placeholder('No configurable rules')