simedkom/app/Filament/Resources/Monitoring/ContentRecaps/Tables/ContentRecapsTable.php
Yoga Pangestu 2983cd243f refactor: centralize cheerful notifications and cleanup auth calls
- Introduce `CheerfulNotification` utility class to standardize cheerful and expressive notifications across the application.
- Refactor custom "Cheerful" actions (Create, Edit, Delete, etc.) and `DefaultBulkActions` to utilize the new utility class.
- Update all `ToggleColumn` status updates in Master Data modules to use `CheerfulNotification::statusUpdated()`.
- Replace inline `Notification::make()` calls in custom actions (Reply, Crawl News, Cooperation actions) and Resource Pages with `CheerfulNotification` methods.
- Address various lint errors by standardizing the use of the `Auth` facade and improving type hinting for the authenticated `User` model.
2026-01-14 09:54:46 +07:00

85 lines
2.6 KiB
PHP

<?php
namespace App\Filament\Resources\Monitoring\ContentRecaps\Tables;
use App\Filament\Actions\Cheerful\DeleteAction;
use App\Filament\Actions\Cheerful\EditAction;
use App\Filament\Actions\Cheerful\ForceDeleteAction;
use App\Filament\Actions\Cheerful\RestoreAction;
use App\Filament\Actions\DefaultBulkActions;
use App\Filament\Columns\TimestampColumns;
use Filament\Actions\BulkActionGroup;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\TrashedFilter;
use Filament\Tables\Table;
class ContentRecapsTable
{
public static function configure(Table $table): Table
{
return $table
->columns([
TextColumn::make('title')
->label('Judul')
->searchable()
->sortable()
->wrap(),
TextColumn::make('type')
->label('Tipe')
->searchable()
->sortable(),
TextColumn::make('channel')
->label('Kanal')
->searchable()
->sortable(),
TextColumn::make('social_media')
->label('Media Sosial')
->searchable()
->sortable(),
TextColumn::make('classification.name')
->label('Klasifikasi')
->searchable()
->sortable(),
TextColumn::make('link')
->label('Tautan')
->searchable()
->sortable(),
TextColumn::make('posting_date')
->label('Tgl Posting')
->searchable()
->sortable()
->date('l, d F Y'),
...TimestampColumns::make(),
])
->filters([
TrashedFilter::make()->native(false),
])
->recordActions([
EditAction::make(),
DeleteAction::make(),
ForceDeleteAction::make(),
RestoreAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
...DefaultBulkActions::make('Rekap Konten'),
]),
])
->emptyStateIcon(Heroicon::ClipboardDocumentList)
->emptyStateDescription('Setelah Anda membubat data pertama, maka akan muncul disini.')
->defaultSort('created_at', 'desc')
->deferFilters(false);
}
}