diff --git a/resources/views/infolists/components/activity-date.blade.php b/resources/views/infolists/components/activity-date.blade.php index e6f2f80..2155bd3 100644 --- a/resources/views/infolists/components/activity-date.blade.php +++ b/resources/views/infolists/components/activity-date.blade.php @@ -1,3 +1,7 @@ - {{ $getState() != null ? $getDate($getState()) : $getPlaceholder() }} + @if ($isHtmlAllowed()) + {!! $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) !!} + @else + {{ $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) }} + @endif diff --git a/src/Components/ActivityDate.php b/src/Components/ActivityDate.php index 89301d9..511157c 100644 --- a/src/Components/ActivityDate.php +++ b/src/Components/ActivityDate.php @@ -2,11 +2,15 @@ namespace JaOcero\ActivityTimeline\Components; -use Filament\Infolists\Components\Entry; use Illuminate\Support\Carbon; +use Filament\Infolists\Components\Entry; +use Filament\Forms\Components\Concerns\CanAllowHtml; +use JaOcero\ActivityTimeline\Concerns\CanModifyState; class ActivityDate extends Entry { + use CanAllowHtml, CanModifyState; + protected string $viewIdentifier = 'activityDate'; protected string $view = 'activity-timeline::infolists.components.activity-date';