zuabschl wip

This commit is contained in:
salam committed 2025-10-08 12:05:35 +02:00
1 parent 79c0b14bb5
commit 1728384c4e
12 files changed
+12411 -104

No files matched your search

@@ -12,9 +12,11 @@ use Filament\Actions\ImportAction;
use Filament\Forms\Components\TextInput;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Schemas\Schema;
use Filament\Tables\Columns\Summarizers\Sum;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\TextInputColumn;
use Filament\Tables\Table;
use Illuminate\Support\HtmlString;
use Illuminate\Validation\Rules\File;
class AllgemeinflaechensRelationManager extends RelationManager
@@ -23,11 +25,16 @@ class AllgemeinflaechensRelationManager extends RelationManager
protected static ?string $title = 'Allgemeinflächen';
protected static ?string $navigationLabel = 'Allgemeinflächen';
protected static ?string $modelLabel = 'Allgemeinflächen';
protected static ?string $pluralModelLabel = 'Allgemeinflächen';
public function form(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('geschoss')
->required()
->maxLength(255),
@@ -35,7 +42,7 @@ class AllgemeinflaechensRelationManager extends RelationManager
->required()
->maxLength(255),
TextInput::make('flaeche')
->suffix('m²')
->suffix(new HtmlString(' m²'))
->numeric()
->label('Fläche')
->required()
@@ -46,12 +53,16 @@ class AllgemeinflaechensRelationManager extends RelationManager
public function table(Table $table): Table
{
return $table
->striped()
->recordTitleAttribute('geschoss')
->columns([
TextColumn::make('geschoss')->searchable(),
TextColumn::make('raumart')->searchable(),
TextInputColumn::make('flaeche')
->suffix('m²')
->summarize(Sum::make()->label('Gesammt')->numeric(
decimalPlaces: 2,
)->suffix(new HtmlString(' m²')))
->suffix(new HtmlString(' m²'))
->width('2rem')
->rules(['required', 'price' => 'decimal:2'])
->alignment('right')