inhaltsangabe wip
This commit is contained in:
1 parent
8ccc4a3c20
commit
3a35ccd69d
34 files changed
+281
-236
No files matched your search
@@ -23,7 +23,7 @@ class KontoTextblockResource extends Resource
|
||||
|
||||
protected static ?string $cluster = VerwaltungCluster::class;
|
||||
|
||||
protected static ?string $navigationLabel = 'Textblock';
|
||||
protected static ?string $navigationLabel = 'Eigene Textblöcke';
|
||||
|
||||
protected static ?string $modelLabel = 'Textblock';
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\KontoTextblocks\Schemas;
|
||||
|
||||
use App\Models\TextblockKennung;
|
||||
use Filament\Forms\Components\RichEditor;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
@@ -17,11 +15,7 @@ class KontoTextblockForm
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->required(),
|
||||
Textarea::make('beschreibung')
|
||||
->afterLabel('Bei gleichen Textblockarten kann hier der Unterschied kurz angerissen werden.'),
|
||||
Select::make('textblock_kennung_id')
|
||||
->label('Textblock Art')
|
||||
->options(TextblockKennung::pluck('name', 'id')),
|
||||
Textarea::make('beschreibung'),
|
||||
RichEditor::make('textblock')
|
||||
->toolbarButtons([
|
||||
['bold', 'italic', 'underline', 'strike', 'subscript', 'superscript'],
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
|
||||
namespace App\Filament\Resources\KontoTextblocks\Tables;
|
||||
|
||||
use App\Models\TextblockKennung;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Support\Enums\FontWeight;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
@@ -19,14 +16,8 @@ class KontoTextblocksTable
|
||||
return $table
|
||||
->defaultPaginationPageOption(5)
|
||||
->columns([
|
||||
TextColumn::make('textblock_kennung.name')
|
||||
->label('Kennung')
|
||||
->color('info')
|
||||
->wrap()
|
||||
->description(function ($record) {
|
||||
return new HtmlString($record->beschreibung);
|
||||
}),
|
||||
TextColumn::make('name')
|
||||
->searchable()
|
||||
->weight(FontWeight::Bold)
|
||||
->wrap()
|
||||
->description(function ($record) {
|
||||
@@ -34,22 +25,9 @@ class KontoTextblocksTable
|
||||
})
|
||||
->html(),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('textblock_kennung_id')
|
||||
->label('Textbock Art')
|
||||
->options(function (): array {
|
||||
return TextblockKennung::join('konto_textblocks', 'textblock_kennungs.id', '=', 'konto_textblocks.textblock_kennung_id')
|
||||
->pluck('textblock_kennungs.name', 'textblock_kennungs.id')->toArray();
|
||||
})
|
||||
->preload(),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
DeleteAction::make()->iconButton(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user