import table make raumealle table depending on orientierung
This commit is contained in:
1 parent
92bdc77eee
commit
7343c26955
14 files changed
+182
-108
No files matched your search
-16
@@ -2,13 +2,11 @@
|
||||
|
||||
namespace App\Filament\Resources\Projektes\RelationManagers;
|
||||
|
||||
use App\Filament\Imports\ProjektAllgemeinflaechenImporter;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\ImportAction;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Schemas\Schema;
|
||||
@@ -17,7 +15,6 @@ use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\TextInputColumn;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Validation\Rules\File;
|
||||
use Livewire\Component;
|
||||
|
||||
class ProjektAllgemeinflaechensRelationManager extends RelationManager
|
||||
@@ -87,19 +84,6 @@ class ProjektAllgemeinflaechensRelationManager extends RelationManager
|
||||
CreateAction::make()
|
||||
->icon('phosphor-file-plus')
|
||||
->createAnother(false),
|
||||
ImportAction::make()
|
||||
->importer(ProjektAllgemeinflaechenImporter::class)
|
||||
->modalHeading('Allgemeinflächen Import')
|
||||
// ->modalSubmitActionLabel('Yes, delete it')
|
||||
->label('Hochladen')
|
||||
->icon('phosphor-upload')
|
||||
->color('info')
|
||||
->options([
|
||||
'projekte_id' => $this->getOwnerRecord()->id,
|
||||
])
|
||||
->fileRules([
|
||||
File::types(['csv', 'txt'])->max(1024),
|
||||
]),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()
|
||||
|
||||
+6
-6
@@ -29,13 +29,13 @@ class ProjektOrientierungZuAbschlaegesRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'projekt_orientierung_zu_abschlaeges';
|
||||
|
||||
protected static ?string $title = 'Orientierung Zu/Abschläge';
|
||||
protected static ?string $title = 'Objekte';
|
||||
|
||||
protected static ?string $navigationLabel = 'Orientierung Zu/Abschläge';
|
||||
protected static ?string $navigationLabel = 'Objekte';
|
||||
|
||||
protected static ?string $modelLabel = 'Orientierung Zu/Abschläge';
|
||||
protected static ?string $modelLabel = 'Objekte';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Orientierung Zu/Abschläge';
|
||||
protected static ?string $pluralModelLabel = 'Objekte';
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
@@ -45,7 +45,7 @@ class ProjektOrientierungZuAbschlaegesRelationManager extends RelationManager
|
||||
return $table
|
||||
// ->striped()
|
||||
->recordTitleAttribute('top_nummer')
|
||||
->description('Objekte "NiO" (Nicht in Orientierung) sind auch ohne "Type"')
|
||||
->description('Orientierungen, Zu- und Abschläge')
|
||||
->columns([
|
||||
TextColumn::make('top_nummer')
|
||||
->alignCenter()
|
||||
@@ -232,7 +232,7 @@ class ProjektOrientierungZuAbschlaegesRelationManager extends RelationManager
|
||||
Action::make('erstellen')
|
||||
->action(fn (CreateProjektOrientierungZuAbschlaege $createProjektOrientierungZuAbschlaege) => $createProjektOrientierungZuAbschlaege->create($this->ownerRecord))
|
||||
->requiresConfirmation()
|
||||
->modalHeading('Orientierung Zu/Abschläge erstellen')
|
||||
->modalHeading('Objekte erstellen')
|
||||
->modalDescription('Alle bestehenden Daten in dieser Tabelle werden vorher gelöscht.')
|
||||
->modalSubmitActionLabel('Generieren')
|
||||
->label('Generieren')
|
||||
|
||||
+4
-18
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Filament\Resources\Projektes\RelationManagers;
|
||||
|
||||
use App\Filament\Imports\ProjektRaeumealleImporter;
|
||||
use App\Models\ProjektRaeumealle;
|
||||
use Filament\Actions\BulkAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
@@ -10,7 +9,6 @@ use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\ImportAction;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Schemas\Schema;
|
||||
@@ -22,20 +20,19 @@ use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Validation\Rules\File;
|
||||
use Livewire\Component;
|
||||
|
||||
class ProjektRaeumeallesRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'projekt_raeumealles';
|
||||
|
||||
protected static ?string $title = 'Räume Alle';
|
||||
protected static ?string $title = 'Objekte im Detail';
|
||||
|
||||
protected static ?string $navigationLabel = 'Räume';
|
||||
protected static ?string $navigationLabel = 'Objekte im Detail';
|
||||
|
||||
protected static ?string $modelLabel = 'Raum';
|
||||
protected static ?string $modelLabel = 'Objekt im Detail';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Räume';
|
||||
protected static ?string $pluralModelLabel = 'Objekte';
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -140,17 +137,6 @@ class ProjektRaeumeallesRelationManager extends RelationManager
|
||||
CreateAction::make()
|
||||
->icon('phosphor-file-plus')
|
||||
->createAnother(false),
|
||||
ImportAction::make()
|
||||
->importer(ProjektRaeumealleImporter::class)
|
||||
->label('Hochladen')
|
||||
->icon('phosphor-upload')
|
||||
->color('info')
|
||||
->options([
|
||||
'projekte_id' => $this->getOwnerRecord()->id,
|
||||
])
|
||||
->fileRules([
|
||||
File::types(['csv', 'txt'])->max(1024),
|
||||
]),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()
|
||||
|
||||
Reference in new issue
Block a user