Skip to content

Commit

Permalink
[ADVAPP-964]: Add enabled and complete as options to display in the l…
Browse files Browse the repository at this point in the history
…ist view of campaigns (#1092)
  • Loading branch information
kandarp-canyon authored Oct 29, 2024
1 parent 0af49eb commit ec5d46e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
use Filament\Actions\CreateAction;
use Filament\Tables\Actions\EditAction;
use Filament\Tables\Actions\ViewAction;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\TextColumn;
use AdvisingApp\Campaign\Models\Campaign;
use App\Filament\Tables\Columns\IdColumn;
Expand All @@ -59,6 +60,15 @@ public function table(Table $table): Table
TextColumn::make('name'),
TextColumn::make('segment.name')
->label('Population Segment'),
IconColumn::make('enabled')
->label('Enabled')
->boolean()
->toggleable(isToggledHiddenByDefault: true),
IconColumn::make('execution_status')
->label('Complete')
->getStateUsing(fn (Campaign $record) => $record->hasBeenExecuted())
->boolean()
->toggleable(isToggledHiddenByDefault: true),
])
->actions([
ViewAction::make(),
Expand Down

0 comments on commit ec5d46e

Please sign in to comment.