From e14219b2451bc9b15a8cf879ddf76f4ec4a53599 Mon Sep 17 00:00:00 2001 From: Sagar Date: Tue, 14 May 2024 13:17:14 +0200 Subject: [PATCH] feat: added functionality to display the status of the collection --- app/Filament/Dashboard/Resources/CollectionResource.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Filament/Dashboard/Resources/CollectionResource.php b/app/Filament/Dashboard/Resources/CollectionResource.php index e013be93..a745e0ee 100644 --- a/app/Filament/Dashboard/Resources/CollectionResource.php +++ b/app/Filament/Dashboard/Resources/CollectionResource.php @@ -75,6 +75,15 @@ public static function table(Table $table): Table return $table ->columns([ Tables\Columns\TextColumn::make('title')->wrap(), + Tables\Columns\TextColumn::make('status') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'DRAFT' => 'info', + 'REVIEW' => 'warning', + 'EMBARGO' => 'warning', + 'PUBLISHED' => 'success', + 'REJECTED' => 'danger', + }), ]) ->filters([ //