wip
This commit is contained in:
1 parent
04e8abb55f
commit
d95452bc9d
5 files changed
+123
-78
No files matched your search
+4
-1
@@ -188,7 +188,10 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()
|
||||
->mutateDataUsing(function ($data, $record): array {
|
||||
$data['nutzwert'] = round($record->methode->faktor * $data['flaeche']);
|
||||
|
||||
if (isset($record->methode->faktor)) {
|
||||
$data['nutzwert'] = round($record->methode->faktor * $data['flaeche']);
|
||||
}
|
||||
|
||||
return $data;
|
||||
})->after(function (Component $livewire) {
|
||||
|
||||
@@ -23,8 +23,8 @@ class ProjekteForm
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Section::make('Projekt Daten')
|
||||
->label(fn (?Projekte $record): ?string => ($record?->created_at) ? 'Erstellt: '.$record?->created_at->diffForHumans().', Geändert: '.$record?->updated_at->diffForHumans() : '')
|
||||
Section::make('Projekt Details')
|
||||
->label(fn (?Projekte $record): ?string => ($record?->created_at) ? 'Erstellt: '.$record?->created_at->diffForHumans().' | Geändert: '.$record?->updated_at->diffForHumans() : '')
|
||||
->collapsed(fn ($operation) => $operation == 'create' ? false : true)
|
||||
->icon('heroicon-o-rectangle-stack')
|
||||
->schema([
|
||||
@@ -66,6 +66,7 @@ class ProjekteForm
|
||||
->selectablePlaceholder(false)
|
||||
->options(ProjektStatus::class)
|
||||
->required(),
|
||||
TextInput::make('id')->disabled()->label('Interne ID'),
|
||||
|
||||
])->columns(2),
|
||||
Tab::make('Ort & Datum')
|
||||
|
||||
Reference in new issue
Block a user