From bf9a5fbd39ab341992b69bb85249dfafa2ae69f6 Mon Sep 17 00:00:00 2001 From: fsociety Date: Sun, 29 Sep 2024 23:24:08 +0200 Subject: [PATCH] feat(EinundzwanzigPlebTable): update columns and filters This commit updates the column configuration and filters in the EinundzwanzigPlebTable component. The changes include making some columns visible in export, removing the searchable feature from some columns, and removing all filters. The WithExport trait has also been added to the component. --- app/Livewire/EinundzwanzigPlebTable.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/Livewire/EinundzwanzigPlebTable.php b/app/Livewire/EinundzwanzigPlebTable.php index 1d3a7cb..d36aaeb 100644 --- a/app/Livewire/EinundzwanzigPlebTable.php +++ b/app/Livewire/EinundzwanzigPlebTable.php @@ -9,16 +9,18 @@ use PowerComponents\LivewirePowerGrid\Button; use PowerComponents\LivewirePowerGrid\Column; use PowerComponents\LivewirePowerGrid\Detail; use PowerComponents\LivewirePowerGrid\Exportable; -use PowerComponents\LivewirePowerGrid\Facades\Filter; use PowerComponents\LivewirePowerGrid\Facades\Rule; use PowerComponents\LivewirePowerGrid\Footer; use PowerComponents\LivewirePowerGrid\Header; use PowerComponents\LivewirePowerGrid\PowerGrid; use PowerComponents\LivewirePowerGrid\PowerGridFields; use PowerComponents\LivewirePowerGrid\PowerGridComponent; +use PowerComponents\LivewirePowerGrid\Traits\WithExport; final class EinundzwanzigPlebTable extends PowerGridComponent { + use WithExport; + public string $sortField = 'application_for'; public string $sortDirection = 'asc'; @@ -96,34 +98,32 @@ final class EinundzwanzigPlebTable extends PowerGridComponent public function columns(): array { return [ - Column::make('Avatar', 'avatar'), + Column::make('Avatar', 'avatar') + ->visibleInExport( visible: false), Column::make('Npub', 'npub') - ->searchable() + ->visibleInExport(visible: false) ->sortable(), Column::make('Name', 'name_lower') - ->searchable() ->sortable(), Column::make('Aktueller Status', 'association_status_formatted', 'association_status') - ->searchable() + ->visibleInExport( visible: true) ->sortable(), Column::make('Bewirbt sich für', 'for', 'application_for') - ->searchable() + ->visibleInExport( visible: false) ->sortable(), - Column::action('Action'), + Column::action('Action') + ->visibleInExport( visible: false), ]; } public function filters(): array { - return [ - Filter::inputText('name'), - Filter::datepicker('created_at_formatted', 'created_at'), - ]; + return []; } #[\Livewire\Attributes\On('edit')]