Skip to content

Commit

Permalink
Merge pull request #95 from canyongbs/feature/assist-409-add-filters-…
Browse files Browse the repository at this point in the history
…kb-articles

[ASSIST-409] Add Filters for KB Articles
  • Loading branch information
Orrison authored Sep 15, 2023
2 parents b6a29f4 + 97f77c6 commit 928e504
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Assist\KnowledgeBase\Filament\Resources\KnowledgeBaseItemResource\Pages;

use Filament\Actions;
use Filament\Tables\Table;
use Filament\Actions\CreateAction;
use Filament\Tables\Actions\EditAction;
use Filament\Tables\Actions\ViewAction;
use Filament\Tables\Columns\TextColumn;
use Filament\Resources\Pages\ListRecords;
use Filament\Tables\Filters\SelectFilter;
use Filament\Tables\Filters\TernaryFilter;
use Filament\Tables\Actions\BulkActionGroup;
use Filament\Tables\Actions\DeleteBulkAction;
use Assist\KnowledgeBase\Filament\Resources\KnowledgeBaseItemResource;
Expand Down Expand Up @@ -44,6 +46,19 @@ public function table(Table $table): Table
->sortable(),
])
->filters([
SelectFilter::make('quality')
->relationship('quality', 'name')
->multiple()
->preload(),
SelectFilter::make('status')
->relationship('status', 'name')
->multiple()
->preload(),
SelectFilter::make('category')
->relationship('category', 'name')
->multiple()
->preload(),
TernaryFilter::make('public'),
])
->actions([
ViewAction::make(),
Expand All @@ -59,7 +74,7 @@ public function table(Table $table): Table
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
CreateAction::make(),
];
}
}

0 comments on commit 928e504

Please sign in to comment.