Skip to content

Commit

Permalink
Merge pull request #20 from Puralogica/dev-newfeatures
Browse files Browse the repository at this point in the history
Add CanAllowHtml and CanModifyState
  • Loading branch information
199ocero authored Feb 28, 2024
2 parents 07addb7 + 5ff4ea5 commit 5072022
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion resources/views/infolists/components/activity-date.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<span class="flex-shrink-0 text-xs font-medium text-gray-500 uppercase fi-timeline-item-date dark:text-gray-400">
{{ $getState() != null ? $getDate($getState()) : $getPlaceholder() }}
@if ($isHtmlAllowed())
{!! $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) !!}
@else
{{ $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) }}
@endif
</span>
6 changes: 5 additions & 1 deletion src/Components/ActivityDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 5072022

Please sign in to comment.