Skip to content

Commit

Permalink
Add category prefix to public poll table
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschucki committed Mar 11, 2024
1 parent 4edd785 commit 1ce74a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Filament/Resources/PublicPollsResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function table(Table $table): Table
Tables\Columns\Layout\Stack::make([
Tables\Columns\TextColumn::make('title')->weight(FontWeight::ExtraBold)->label('Titel')->prefix('Titel: ')->searchable()->sortable(),
Tables\Columns\TextColumn::make('description')->label('Beschreibung')->searchable()->sortable(),
Tables\Columns\TextColumn::make('category.title')->label('Kategorie')->searchable()->sortable(),
Tables\Columns\TextColumn::make('category.title')->prefix('Kategorie: ')->label('Kategorie')->searchable()->sortable(),
Tables\Columns\TextColumn::make('closes_after')->label('Ende')->prefix('Endet in: ')->state(fn (PublicPoll $publicPoll) => $publicPoll->hasEnded() ? 'Geschlossen' : now()->add($publicPoll->closes_after)->diffForHumans().' ('.$publicPoll->closes_at->format('d.m.Y H:i').' Uhr)')->toggleable(),
Tables\Columns\TextColumn::make('user.name')->label('Ersteller')->prefix('Von: ')->state(fn (PublicPoll $publicPoll) => $publicPoll->not_anonymous ? $publicPoll->user->name : '')->searchable()->sortable(),
Tables\Columns\TextColumn::make('within_target_group')->label('Innerhalb deiner Zielgruppe')->icon(function (PublicPoll $poll) {
Expand Down

0 comments on commit 1ce74a7

Please sign in to comment.