Warn about calls closing and content coming off the site
A dashboard widget lists what expires in the next two weeks, and a daily command reminds whoever edits it a week and a day ahead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
27
resources/views/filament/widgets/expiring-soon.blade.php
Normal file
27
resources/views/filament/widgets/expiring-soon.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<x-filament-widgets::widget>
|
||||
<x-filament::section
|
||||
:heading="__('panel.expiring.heading')"
|
||||
:description="__('panel.expiring.description', ['days' => \App\Filament\Widgets\ExpiringSoon::DAYS])"
|
||||
icon="heroicon-o-clock"
|
||||
>
|
||||
<ul class="divide-y divide-gray-100 dark:divide-white/5">
|
||||
@foreach ($this->items() as $item)
|
||||
<li class="flex flex-wrap items-center justify-between gap-2 py-2">
|
||||
<div class="flex items-center gap-2">
|
||||
<x-filament::badge :color="$item['event'] === 'closes' ? 'warning' : 'gray'">
|
||||
{{ __('panel.expiring.types.'.$item['type']) }}
|
||||
</x-filament::badge>
|
||||
|
||||
<x-filament::link :href="$item['url']">
|
||||
{{ $item['title'] }}
|
||||
</x-filament::link>
|
||||
</div>
|
||||
|
||||
<span class="text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ __('panel.expiring.events.'.$item['event'], ['when' => $item['at']->diffForHumans(), 'date' => $item['at']->isoFormat('LL')]) }}
|
||||
</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</x-filament::section>
|
||||
</x-filament-widgets::widget>
|
||||
Reference in New Issue
Block a user