import wip
This commit is contained in:
1 parent
8a809e5fff
commit
2c5352882b
16 files changed
+5078
-212
No files matched your search
@@ -37,15 +37,28 @@ class EditProjekte extends EditRecord
|
||||
* IMPORT
|
||||
*/
|
||||
ActionGroup::make([
|
||||
ImportAction::make('importallgemeinflaechen')
|
||||
ImportAction::make('import_allgemeinflaechen')
|
||||
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
|
||||
->importer(ProjektAllgemeinflaechenImporter::class)
|
||||
->csvDelimiter('|')
|
||||
->modalHeading('Allgemeinflächen Import')
|
||||
->modalContent(view('filament.pages.actions.import-allgemeinflaechen'))
|
||||
->modalContentFooter(view('filament.pages.actions.footer-allgemeinflaechen'))
|
||||
->label('Allgemeinflächen')
|
||||
->icon('phosphor-upload')
|
||||
->extraModalFooterActions([
|
||||
Action::make('copy')
|
||||
->tooltip('Kopiert die Spaltenname für die erste Zeile')
|
||||
->color('success')
|
||||
->label('Spalten Namen')
|
||||
->action(function ($livewire) {
|
||||
$livewire->js('window.navigator.clipboard.writeText("Geschoss|Raumart|Fläche");');
|
||||
|
||||
Notification::make()
|
||||
->title('Spaltenname kopiert')
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
|
||||
Action::make('delete')
|
||||
->label('Tabelle leeren')
|
||||
->color('danger')
|
||||
@@ -70,13 +83,26 @@ class EditProjekte extends EditRecord
|
||||
ImportAction::make('import_objekte')
|
||||
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
|
||||
->importer(ProjektObjekteImDetailImporter::class)
|
||||
->csvDelimiter('|')
|
||||
->modalHeading('Objekte im Detail Import')
|
||||
->modalContent(view('filament.pages.actions.import-objektemitraeumen'))
|
||||
->modalContentFooter(view('filament.pages.actions.footer-objektemitraeumen'))
|
||||
->label('Objekte')
|
||||
->icon('phosphor-upload')
|
||||
->extraModalFooterActions([
|
||||
Action::make('copy')
|
||||
->tooltip('Kopiert die Spaltenname für die erste Zeile')
|
||||
->color('success')
|
||||
->label('Spalten Namen')
|
||||
->action(function ($livewire) {
|
||||
$livewire->js('window.navigator.clipboard.writeText("Top Nummer|Geschoss|Raumart|Fläche");');
|
||||
|
||||
Notification::make()
|
||||
->title('Spaltenname kopiert')
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
Action::make('delete')
|
||||
->tooltip('Löscht alle Objekte für dieses Projekt')
|
||||
->label('Tabellen leeren')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
|
||||
+6
-2
@@ -3,6 +3,7 @@
|
||||
namespace App\Filament\Resources\Projektes\RelationManagers;
|
||||
|
||||
use App\Models\ProjektObjekteImDetail;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
@@ -53,11 +54,11 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
||||
TextInput::make('flaeche')
|
||||
->suffix(new HtmlString(' m²'))
|
||||
->numeric()
|
||||
->inputMode('decimal')
|
||||
->label('Fläche')
|
||||
->rules(['required', 'flaeche' => 'decimal:2'])
|
||||
->rules(['required'])
|
||||
->validationMessages([
|
||||
'required' => 'Die Eingabe einer Fläche ist erforderlich.',
|
||||
'decimal' => 'Für die Fläche sind zwei Dezimalstellen erforderlich.',
|
||||
])
|
||||
->afterStateUpdated(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshProjektAllgemeinflaechen');
|
||||
@@ -142,6 +143,9 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
||||
CreateAction::make()
|
||||
->icon('phosphor-file-plus')
|
||||
->createAnother(false),
|
||||
Action::make('nutzwerte')
|
||||
->label('Nutzwerte')
|
||||
->icon('phosphor-gear'),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()
|
||||
|
||||
Reference in new issue
Block a user