63 lines
2.3 KiB
PHP
63 lines
2.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Kontos\Tables;
|
|
|
|
use Filament\Actions\Action;
|
|
use Filament\Actions\EditAction;
|
|
use Filament\Forms\Components\RichEditor;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Support\Enums\FontWeight;
|
|
use Filament\Support\Enums\IconSize;
|
|
use Filament\Support\Enums\TextSize;
|
|
use Filament\Tables\Columns\IconColumn;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
|
|
class KontosTable
|
|
{
|
|
public static function configure(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
TextColumn::make('company')->label('Firma')
|
|
->description(fn ($record): string => $record->address),
|
|
IconColumn::make('plan.icon')
|
|
->width('30px')
|
|
->label('')
|
|
->size(IconSize::TwoExtraLarge)
|
|
->color('primary')
|
|
->icon(fn (string $state): string => $state)
|
|
->extraAttributes(['class' => 'rounded-xl border border-gray-200 dark:border-gray-700 drop-shadow-xl']),
|
|
TextColumn::make('plan.name')
|
|
->label('Zahlungs Plan')
|
|
->description(fn ($record): string => $record->plan->payment),
|
|
|
|
TextColumn::make('guthaben')
|
|
->size(TextSize::Large)
|
|
->weight(FontWeight::Bold)
|
|
->color('primary')
|
|
->description('Gutachten')
|
|
->alignCenter(),
|
|
TextColumn::make('abgeschlossen')
|
|
->size(TextSize::Large)
|
|
->weight(FontWeight::Bold)
|
|
->color('success')
|
|
->description('Gutachten')
|
|
->alignCenter(),
|
|
|
|
])
|
|
->recordActions([
|
|
EditAction::make()->iconButton()->color('gray'),
|
|
Action::make('Bezahlen')
|
|
->iconButton()
|
|
->color('gray')
|
|
->icon('heroicon-o-credit-card')
|
|
->schema([
|
|
TextInput::make('subject')->required(),
|
|
RichEditor::make('body')->required(),
|
|
])
|
|
->action(function (array $data) {}),
|
|
]);
|
|
}
|
|
}
|