Skip to content

Commit

Permalink
feat: added functionality to display the status of the collection
Browse files Browse the repository at this point in the history
  • Loading branch information
sriramkanakam87 committed May 14, 2024
1 parent ceb3a5a commit e14219b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/Filament/Dashboard/Resources/CollectionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([
//
Expand Down

0 comments on commit e14219b

Please sign in to comment.