Räume Alle wip

This commit is contained in:
salam committed 2025-10-04 18:22:44 +02:00
1 parent 63e4fdfee6
commit b6871df3bf
21 files changed
+501 -231

No files matched your search

+5 -5
View File
@@ -12,16 +12,13 @@ a make:factory GutachterFactory
https://fakerphp.org/ https://fakerphp.org/
Thomas Schranz
Adamgasse 9a
2.Stock
a make:mode ProjekteImport -ms a make:mode ProjekteImport -ms
a make:filament-resource ProjekteImport --nested a make:filament-resource ProjekteImport --nested
a make:filament-relation-manager ProjekteResource ProjekteImports name a make:filament-relation-manager ProjekteResource ProjekteImports name
a make:filament-relation-manager AllgemeinflaechenResource allgemeinflaechens geschoss a make:filament-relation-manager RaeumealleResource Raeumealles geschoss
a make:model Allgemeinflaechen -ms a make:model Allgemeinflaechen -ms
@@ -30,6 +27,9 @@ a make:model Raeumealle -ms
A make:filament-resource Allgemeinflaechen --nested A make:filament-resource Allgemeinflaechen --nested
php artisan make:filament-relation-manager Raeumealle lessons title
php artisan make:filament-relation-manager CourseResource lessons title
for import in prod run
a queue:listen
in supervisord
@@ -0,0 +1,73 @@
<?php
namespace App\Filament\Imports;
use App\Models\Allgemeinflaechen;
use Filament\Actions\Imports\ImportColumn;
use Filament\Actions\Imports\Importer;
use Filament\Actions\Imports\Models\Import;
use Illuminate\Support\Number;
class AllgemeinflaechenImporter extends Importer
{
protected static ?string $model = Allgemeinflaechen::class;
public function resolveRecord(): Allgemeinflaechen
{
$allgemeinflaechen = new Allgemeinflaechen;
$allgemeinflaechen->projekte_id = $this->options['projekte_id'];
return $allgemeinflaechen;
}
public static function getColumns(): array
{
return [
ImportColumn::make('geschoss')
->validationAttribute('Geschoss')
->requiredMapping()
->example('EG')
->rules(['required', 'max:255'])
->castStateUsing(function (string $state) {
$state = trim($state);
return iconv(mb_detect_encoding($state, mb_detect_order(), true), 'UTF-8', $state);
}),
ImportColumn::make('raumart')
->validationAttribute('Raumart')
->requiredMapping()
->example('Stiegenhaus')
->rules(['required', 'max:32'])
->castStateUsing(function (string $state) {
$state = trim($state);
return iconv(mb_detect_encoding($state, mb_detect_order(), true), 'UTF-8', $state);
}),
ImportColumn::make('flaeche')
->validationAttribute('Fläche')
->rules(['required'])
->example('52,75')
->castStateUsing(function (string $state): ?float {
if (blank($state)) {
return '0.00';
}
$state = str_replace(',', '.', $state);
$state = preg_replace('/[^0-9.]/', '', $state);
return round($state, precision: 2);
}),
];
}
public static function getCompletedNotificationBody(Import $import): string
{
$body = ' Der Import der Allgemeinflächen ist abgeschlossen. Es wurden '.Number::format($import->successful_rows).' '.str('row')->plural($import->successful_rows).' importiert.';
if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' Bei '.Number::format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' ist der Import fehlgeschlagen.';
}
return $body;
}
}
@@ -7,6 +7,7 @@ use App\Filament\Resources\Projektes\Pages\CreateProjekte;
use App\Filament\Resources\Projektes\Pages\EditProjekte; use App\Filament\Resources\Projektes\Pages\EditProjekte;
use App\Filament\Resources\Projektes\Pages\ListProjektes; use App\Filament\Resources\Projektes\Pages\ListProjektes;
use App\Filament\Resources\Projektes\RelationManagers\AllgemeinflaechensRelationManager; use App\Filament\Resources\Projektes\RelationManagers\AllgemeinflaechensRelationManager;
use App\Filament\Resources\Projektes\RelationManagers\RaeumeallesRelationManager;
use App\Filament\Resources\Projektes\Schemas\ProjekteForm; use App\Filament\Resources\Projektes\Schemas\ProjekteForm;
use App\Filament\Resources\Projektes\Tables\ProjektesTable; use App\Filament\Resources\Projektes\Tables\ProjektesTable;
use App\Models\Projekte; use App\Models\Projekte;
@@ -47,6 +48,7 @@ class ProjekteResource extends Resource
{ {
return [ return [
AllgemeinflaechensRelationManager::class, AllgemeinflaechensRelationManager::class,
RaeumeallesRelationManager::class,
]; ];
} }
@@ -2,24 +2,26 @@
namespace App\Filament\Resources\Projektes\RelationManagers; namespace App\Filament\Resources\Projektes\RelationManagers;
use Filament\Actions\AssociateAction; use App\Filament\Imports\AllgemeinflaechenImporter;
use Filament\Actions\BulkActionGroup; use Filament\Actions\BulkActionGroup;
use Filament\Actions\CreateAction; use Filament\Actions\CreateAction;
use Filament\Actions\DeleteAction; use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction; use Filament\Actions\DeleteBulkAction;
use Filament\Actions\DissociateAction;
use Filament\Actions\DissociateBulkAction;
use Filament\Actions\EditAction; use Filament\Actions\EditAction;
use Filament\Actions\ImportAction;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Resources\RelationManagers\RelationManager; use Filament\Resources\RelationManagers\RelationManager;
use Filament\Schemas\Schema; use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table; use Filament\Tables\Table;
use Illuminate\Validation\Rules\File;
class AllgemeinflaechensRelationManager extends RelationManager class AllgemeinflaechensRelationManager extends RelationManager
{ {
protected static string $relationship = 'allgemeinflaechens'; protected static string $relationship = 'allgemeinflaechens';
protected static ?string $title = 'Allgemeinflächen';
public function form(Schema $schema): Schema public function form(Schema $schema): Schema
{ {
return $schema return $schema
@@ -35,7 +37,13 @@ class AllgemeinflaechensRelationManager extends RelationManager
return $table return $table
->recordTitleAttribute('geschoss') ->recordTitleAttribute('geschoss')
->columns([ ->columns([
TextColumn::make('geschoss') TextColumn::make('geschoss')->searchable(),
TextColumn::make('raumart')->searchable(),
TextColumn::make('flaeche')
->alignment('right')
->formatStateUsing(fn ($state) => "{$state} m²")
->label('Fläche')
// ->numeric(decimalPlaces: 2)
->searchable(), ->searchable(),
]) ])
->filters([ ->filters([
@@ -43,16 +51,24 @@ class AllgemeinflaechensRelationManager extends RelationManager
]) ])
->headerActions([ ->headerActions([
CreateAction::make(), CreateAction::make(),
AssociateAction::make(), ImportAction::make()
->importer(AllgemeinflaechenImporter::class)
->label('Hochladen')
->icon('phosphor-upload')
->color('info')
->options([
'projekte_id' => $this->getOwnerRecord()->id,
])
->fileRules([
File::types(['csv', 'txt'])->max(1024),
]),
]) ])
->recordActions([ ->recordActions([
EditAction::make(), EditAction::make()->iconButton()->color('gray'),
DissociateAction::make(), DeleteAction::make()->iconButton(),
DeleteAction::make(),
]) ])
->toolbarActions([ ->toolbarActions([
BulkActionGroup::make([ BulkActionGroup::make([
DissociateBulkAction::make(),
DeleteBulkAction::make(), DeleteBulkAction::make(),
]), ]),
]); ]);
@@ -0,0 +1,62 @@
<?php
namespace App\Filament\Resources\Projektes\RelationManagers;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\CreateAction;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Forms\Components\TextInput;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class RaeumeallesRelationManager extends RelationManager
{
protected static string $relationship = 'raeumealles';
protected static ?string $title = 'Räume Alle';
protected static ?string $navigationLabel = 'Räume';
protected static ?string $modelLabel = 'Raum';
protected static ?string $pluralModelLabel = 'Räume';
public function form(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('geschoss')
->required()
->maxLength(255),
]);
}
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('geschoss')
->columns([
TextColumn::make('geschoss')
->searchable(),
])
->filters([
//
])
->headerActions([
CreateAction::make(),
])
->recordActions([
EditAction::make(),
DeleteAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
]);
}
}
+1
View File
@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
class Allgemeinflaechen extends Model class Allgemeinflaechen extends Model
{ {
protected $fillable = [ protected $fillable = [
'projekte_id',
'geschoss', 'geschoss',
'raumart', 'raumart',
'flaeche', 'flaeche',
+5
View File
@@ -31,4 +31,9 @@ class Projekte extends Model
{ {
return $this->hasMany(Allgemeinflaechen::class); return $this->hasMany(Allgemeinflaechen::class);
} }
public function raeumealles()
{
return $this->hasMany(Raeumealle::class);
}
} }
@@ -42,6 +42,7 @@ class AdminPanelProvider extends PanelProvider
->passwordReset() ->passwordReset()
->emailVerification() ->emailVerification()
->emailChangeVerification() ->emailChangeVerification()
->databaseNotifications()
->profile(isSimple: false) ->profile(isSimple: false)
->default() ->default()
->registration(Register::class) ->registration(Register::class)
+1
View File
@@ -29,6 +29,7 @@
'app.filament.resources.projektes.pages.edit-projekte' => 'App\\Filament\\Resources\\Projektes\\Pages\\EditProjekte', 'app.filament.resources.projektes.pages.edit-projekte' => 'App\\Filament\\Resources\\Projektes\\Pages\\EditProjekte',
'app.filament.resources.projektes.pages.list-projektes' => 'App\\Filament\\Resources\\Projektes\\Pages\\ListProjektes', 'app.filament.resources.projektes.pages.list-projektes' => 'App\\Filament\\Resources\\Projektes\\Pages\\ListProjektes',
'app.filament.resources.projektes.relation-managers.allgemeinflaechens-relation-manager' => 'App\\Filament\\Resources\\Projektes\\RelationManagers\\AllgemeinflaechensRelationManager', 'app.filament.resources.projektes.relation-managers.allgemeinflaechens-relation-manager' => 'App\\Filament\\Resources\\Projektes\\RelationManagers\\AllgemeinflaechensRelationManager',
'app.filament.resources.projektes.relation-managers.raeumealles-relation-manager' => 'App\\Filament\\Resources\\Projektes\\RelationManagers\\RaeumeallesRelationManager',
'app.filament.resources.textblocks.pages.create-textblock' => 'App\\Filament\\Resources\\Textblocks\\Pages\\CreateTextblock', 'app.filament.resources.textblocks.pages.create-textblock' => 'App\\Filament\\Resources\\Textblocks\\Pages\\CreateTextblock',
'app.filament.resources.textblocks.pages.edit-textblock' => 'App\\Filament\\Resources\\Textblocks\\Pages\\EditTextblock', 'app.filament.resources.textblocks.pages.edit-textblock' => 'App\\Filament\\Resources\\Textblocks\\Pages\\EditTextblock',
'app.filament.resources.textblocks.pages.list-textblocks' => 'App\\Filament\\Resources\\Textblocks\\Pages\\ListTextblocks', 'app.filament.resources.textblocks.pages.list-textblocks' => 'App\\Filament\\Resources\\Textblocks\\Pages\\ListTextblocks',
+21 -21
View File
@@ -511,7 +511,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::HOWCkOTiX3xEetvh', '_route' => 'generated::fRgalZgdgLutYooA',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -531,7 +531,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::78HgTUSPeu1dgt2O', '_route' => 'generated::ehGEtdVA59MvLnTN',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -589,7 +589,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::yW0VncmgKb6iy7Da', '_route' => 'generated::t8jqNF3M4FSM7iYY',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -609,7 +609,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::jPsFyYpvjP2gCTdD', '_route' => 'generated::ofL3RQiGDD5QTkU1',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -629,7 +629,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::NnWxDqihf6rtT4sP', '_route' => 'generated::dp8f68KJns4OcFMw',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -649,7 +649,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::zRwWsHyW6pLwmIAb', '_route' => 'generated::PWm6NXGdwH5Nl0zY',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -669,7 +669,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::6xZk6tZY1pg2BE87', '_route' => 'generated::rdH5yu4CuBT2btx2',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -2595,7 +2595,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::HOWCkOTiX3xEetvh' => 'generated::fRgalZgdgLutYooA' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2607,7 +2607,7 @@ app('router')->setCompiledRoutes(
array ( array (
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile', 'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile', 'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
'as' => 'generated::HOWCkOTiX3xEetvh', 'as' => 'generated::fRgalZgdgLutYooA',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2623,7 +2623,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::78HgTUSPeu1dgt2O' => 'generated::ehGEtdVA59MvLnTN' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2635,7 +2635,7 @@ app('router')->setCompiledRoutes(
array ( array (
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps', 'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps', 'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
'as' => 'generated::78HgTUSPeu1dgt2O', 'as' => 'generated::ehGEtdVA59MvLnTN',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2737,7 +2737,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::yW0VncmgKb6iy7Da' => 'generated::t8jqNF3M4FSM7iYY' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2766,7 +2766,7 @@ app('router')->setCompiledRoutes(
\'exception\' => $exception, \'exception\' => $exception,
]), status: $exception ? 500 : 200); ]), status: $exception ? 500 : 200);
}";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000f2c0000000000000000";}}', }";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000f2c0000000000000000";}}',
'as' => 'generated::yW0VncmgKb6iy7Da', 'as' => 'generated::t8jqNF3M4FSM7iYY',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2782,7 +2782,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::jPsFyYpvjP2gCTdD' => 'generated::ofL3RQiGDD5QTkU1' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2804,7 +2804,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::jPsFyYpvjP2gCTdD', 'as' => 'generated::ofL3RQiGDD5QTkU1',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2820,7 +2820,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::NnWxDqihf6rtT4sP' => 'generated::dp8f68KJns4OcFMw' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2842,7 +2842,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::NnWxDqihf6rtT4sP', 'as' => 'generated::dp8f68KJns4OcFMw',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2858,7 +2858,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::zRwWsHyW6pLwmIAb' => 'generated::PWm6NXGdwH5Nl0zY' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2880,7 +2880,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::zRwWsHyW6pLwmIAb', 'as' => 'generated::PWm6NXGdwH5Nl0zY',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2896,7 +2896,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::6xZk6tZY1pg2BE87' => 'generated::rdH5yu4CuBT2btx2' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2918,7 +2918,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::6xZk6tZY1pg2BE87', 'as' => 'generated::rdH5yu4CuBT2btx2',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -13,7 +13,7 @@ return new class extends Migration
{ {
Schema::create('users', function (Blueprint $table) { Schema::create('users', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('konto_id')->constrained()->cascadeOnDelete()->default(0); $table->foreignId('konto_id')->constrained()->cascadeOnDelete();
$table->string('gender')->nullable(); $table->string('gender')->nullable();
$table->string('name'); $table->string('name');
$table->string('email')->unique(); $table->string('email')->unique();
@@ -13,10 +13,10 @@ return new class extends Migration
{ {
Schema::create('allgemeinflaechens', function (Blueprint $table) { Schema::create('allgemeinflaechens', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('projekte_id')->constrained()->cascadeOnDelete()->default(0); $table->foreignId('projekte_id')->constrained()->cascadeOnDelete();
$table->string('geschoss')->nullable(); $table->string('geschoss')->nullable();
$table->string('raumart')->nullable(); $table->string('raumart')->nullable();
$table->string('flaeche')->nullable(); $table->decimal('flaeche', 7, 2)->default(0);
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -13,7 +13,7 @@ return new class extends Migration
{ {
Schema::create('raeumealles', function (Blueprint $table) { Schema::create('raeumealles', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('projekte_id')->constrained()->cascadeOnDelete()->default(0); $table->foreignId('projekte_id')->constrained()->cascadeOnDelete();
$table->integer('methode_id')->default(0); $table->integer('methode_id')->default(0);
$table->integer('orientierung_id')->default(0); $table->integer('orientierung_id')->default(0);
$table->string('top_nummer')->nullable(); $table->string('top_nummer')->nullable();
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('notifications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');
$table->timestamp('read_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('notifications');
}
};
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('imports', function (Blueprint $table): void {
$table->id();
$table->timestamp('completed_at')->nullable();
$table->string('file_name');
$table->string('file_path');
$table->string('importer');
$table->unsignedInteger('processed_rows')->default(0);
$table->unsignedInteger('total_rows');
$table->unsignedInteger('successful_rows')->default(0);
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('imports');
}
};
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('exports', function (Blueprint $table): void {
$table->id();
$table->timestamp('completed_at')->nullable();
$table->string('file_disk');
$table->string('file_name')->nullable();
$table->string('exporter');
$table->unsignedInteger('processed_rows')->default(0);
$table->unsignedInteger('total_rows');
$table->unsignedInteger('successful_rows')->default(0);
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('exports');
}
};
@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('failed_import_rows', function (Blueprint $table): void {
$table->id();
$table->json('data');
$table->foreignId('import_id')->constrained()->cascadeOnDelete();
$table->text('validation_error')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('failed_import_rows');
}
};
-1
View File
@@ -21,7 +21,6 @@ class DatabaseSeeder extends Seeder
PlansSeeder::class, PlansSeeder::class,
TextblockSeeder::class, TextblockSeeder::class,
InhaltsverzeichnisSeeder::class, InhaltsverzeichnisSeeder::class,
ProjekteSeeder::class,
]); ]);
if (app()->isLocal()) { if (app()->isLocal()) {
-21
View File
@@ -1,21 +0,0 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ProjekteSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$sql = "INSERT INTO `projektes` (`id`, `konto_id`, `auftraggeber_id`, `gutachter_id`, `interner_name`, `offizieller_name`, `beschreibung`, `erstellung`, `status`, `created_at`, `updated_at`, `deleted_at`)
VALUES
('1', '1', '4', '25', 'P309 nht GE04-07 08 EF_Version B', 'Gerlos Eigentumswohnungen - Häuser 3-6', '<p>dasD</p>', '2025-10-10', 'entwurf', '2025-10-03 15:58:28', '2025-10-03 15:58:28', NULL);
";
DB::unprepared($sql);
}
}
+26 -26
View File
@@ -1,26 +1,26 @@
Allgemein | EG | Dachfläche | 52,75 "EG","Dachfläche"," 52,75"
Allgemein | EG | Freifläche | 116,21 "EG","Freifläche","116,21"
Allgemein | EG | Freifläche/ Gründach | 207,52 "EG","Freifläche/ Gründach","207,52"
Allgemein | EG | Gang | 10,09 "EG","Gang"," 10,09"
Allgemein | EG | Gang | 25,62 "EG","Gang"," 25,62"
Allgemein | EG | Stiegenhaus | 26,20 "EG","Stiegenhaus "," 26,20"
Allgemein | OG1 | Gang | 30,25 "OG1","Gang"," 30,25"
Allgemein | OG1 | Gang | 30,66 "OG1","Gang"," 30,66"
Allgemein | OG1 | Stiegenhaus | 30,19 "OG1","Stiegenhaus "," 30,19"
Allgemein | OG2 | Lüftungszentrale | 20,19 "OG2","Lüftungszentrale"," 20,19"
Allgemein | UG | Einsp. KFZ | 6,83 "UG","Einsp. KFZ","6,83"
Allgemein | UG | Einspurige Fahrzeuge | 16,74 "UG","Einspurige Fahrzeuge"," 16,74"
Allgemein | UG | Erschließung | 78,68 "UG","Erschließung"," 78,68"
Allgemein | UG | ET-Raum | 6,47 "UG","ET-Raum ","6,47"
Allgemein | UG | Fahrradraum | 20,58 "UG","Fahrradraum "," 20,58"
Allgemein | UG | Garage | 180,16 "UG","Garage","180,16"
Allgemein | UG | Hausmeisterr. | 5,83 "UG","Hausmeisterr. ","5,83"
Allgemein | UG | Heizraum/HT | 11,69 "UG","Heizraum/HT "," 11,69"
Allgemein | UG | Müllraum | 13,75 "UG","Müllraum"," 13,75"
Allgemein | UG | Stellplatz 22 | 12,04 "UG","Stellplatz22"," 12,04"
Allgemein | UG | Stellplatz 24 | 15,00 "UG","Stellplatz24"," 15,00"
Allgemein | UG | Stellplatz 25 | 15,00 "UG","Stellplatz25"," 15,00"
Allgemein | UG | Stellplatz 11 H | 18,88 "UG","Stellplatz 11 H "," 18,88"
Allgemein | UG | Stiegenhaus | 36,12 "UG","Stiegenhaus "," 36,12"
Allgemein | UG | VR | 44,88 "UG","VR"," 44,88"
Allgemein | UG | Wasch/Trochenr. | 16,42 "UG","Wasch/Trochenr."," 16,42"
+144 -144
View File
@@ -1,144 +1,144 @@
APG 01 | UG | Stellplatz+ | 14,25 "APG 01","UG ","Stellplatz+ ","14,25"
APG 02 | UG | Stellplatz | 12,94 "APG 02","UG ","Stellplatz","12,94"
APG 03 | UG | Stellplatz | 13,38 "APG 03","UG ","Stellplatz","13,38"
APG 04 | UG | Stellplatz | 12,94 "APG 04","UG ","Stellplatz","12,94"
APG 05 | UG | Stellplatz | 12,50 "APG 05","UG ","Stellplatz","12,50"
APG 06 | UG | Stellplatz | 12,94 "APG 06","UG ","Stellplatz","12,94"
APG 07 | UG | Stellplatz+ | 14,81 "APG 07","UG ","Stellplatz+ ","14,81"
APG 08 | UG | Stellplatz+ | 14,81 "APG 08","UG ","Stellplatz+ ","14,81"
APG 09 | UG | Stellplatz | 12,94 "APG 09","UG ","Stellplatz","12,94"
APG 10 | UG | Stellplatz | 12,94 "APG 10","UG ","Stellplatz","12,94"
APG 11 | UG | Stellplatz | 12,94 "APG 11","UG ","Stellplatz","12,94"
APG 12 | UG | Stellplatz+ | 14,24 "APG 12","UG ","Stellplatz+ ","14,24"
APG 13 | UG | Stellplatz+ | 13,91 "APG 13","UG ","Stellplatz+ ","13,91"
APG 14 | UG | Stellplatz+ | 14,78 "APG 14","UG ","Stellplatz+ ","14,78"
APG 15 | UG | Stellplatz | 13,02 "APG 15","UG ","Stellplatz","13,02"
APG 16 | UG | Stellplatz | 13,02 "APG 16","UG ","Stellplatz","13,02"
APG 17 | UG | Stellplatz | 13,02 "APG 17","UG ","Stellplatz","13,02"
APG 18 | UG | Stellplatz | 12,59 "APG 18","UG ","Stellplatz","12,59"
APG 19 | UG | Stellplatz+ | 14,59 "APG 19","UG ","Stellplatz+ ","14,59"
W01 | EG | Abstellraum | 3,85 "W01","EG ","Abstellraum "," 3,85"
W01 | EG | Bad | 5,92 "W01","EG ","Bad "," 5,92"
W01 | EG | Gang | 7,97 "W01","EG ","Gang"," 7,97"
W01 | EG | Garten G01_1 | 147,72 "W01","EG ","Garten G01_1"," 147,72"
W01 | EG | Garten G01_2 | 7,72 "W01","EG ","Garten G01_2"," 7,72"
W01 | EG | Terrasse | 18,16 "W01","EG ","Terrasse","18,16"
W01 | EG | WC | 2,46 "W01","EG ","WC"," 2,46"
W01 | EG | Wohnen | 25,00 "W01","EG ","Wohnen","25,00"
W01 | EG | Wohnküche | 33,94 "W01","EG ","Wohnküche","33,94"
W01 | EG | Zimmer 1 | 13,40 "W01","EG ","Zimmer 1","13,40"
W01 | EG | Zimmer 2 | 10,66 "W01","EG ","Zimmer 2","10,66"
W01 | UG | KA01 | 5,01 "W01","UG ","KA01"," 5,01"
W02 | EG | Bad | 3,86 "W02","EG ","Bad "," 3,86"
W02 | EG | Bad | 5,54 "W02","EG ","Bad "," 5,54"
W02 | EG | Gang | 10,42 "W02","EG ","Gang","10,42"
W02 | EG | Garten G02 | 37,27 "W02","EG ","Garten G02","37,27"
W02 | EG | Terrasse | 16,25 "W02","EG ","Terrasse","16,25"
W02 | EG | WC | 2,13 "W02","EG ","WC"," 2,13"
W02 | EG | Wohnküche | 27,43 "W02","EG ","Wohnküche","27,43"
W02 | EG | Zimmer 1 | 10,82 "W02","EG ","Zimmer 1","10,82"
W02 | EG | Zimmer 2 | 11,69 "W02","EG ","Zimmer 2","11,69"
W02 | UG | KA02 | 5,01 "W02","UG ","KA02"," 5,01"
W03 | EG | Abstellraum | 3,22 "W03","EG ","Abstellraum "," 3,22"
W03 | EG | Bad | 6,51 "W03","EG ","Bad "," 6,51"
W03 | EG | Gang | 11,73 "W03","EG ","Gang","11,73"
W03 | EG | Garten G03 | 232,99 "W03","EG ","Garten G03"," 232,99"
W03 | EG | Terrasse | 22,64 "W03","EG ","Terrasse","22,64"
W03 | EG | WC | 2,46 "W03","EG ","WC"," 2,46"
W03 | EG | Wohnküche | 35,69 "W03","EG ","Wohnküche","35,69"
W03 | EG | Zimmer 1 | 14,70 "W03","EG ","Zimmer 1","14,70"
W03 | EG | Zimmer 2 | 10,89 "W03","EG ","Zimmer 2","10,89"
W03 | EG | Zimmer 3 | 11,52 "W03","EG ","Zimmer 3","11,52"
W03 | UG | KA03 | 5,01 "W03","UG ","KA03"," 5,01"
W04 | OG1 | Abstellraum | 3,09 "W04","OG1","Abstellraum "," 3,09"
W04 | OG1 | Bad | 5,92 "W04","OG1","Bad "," 5,92"
W04 | OG1 | Balkon | 21,98 "W04","OG1","Balkon","21,98"
W04 | OG1 | Gang | 11,50 "W04","OG1","Gang","11,50"
W04 | OG1 | WC | 2,46 "W04","OG1","WC"," 2,46"
W04 | OG1 | Wohnküche | 33,93 "W04","OG1","Wohnküche","33,93"
W04 | OG1 | Zimmer 1 | 10,88 "W04","OG1","Zimmer 1","10,88"
W04 | OG1 | Zimmer 2 | 10,86 "W04","OG1","Zimmer 2","10,86"
W04 | OG1 | Zimmer 3 | 14,67 "W04","OG1","Zimmer 3","14,67"
W04 | UG | KA04 | 5,01 "W04","UG ","KA04"," 5,01"
W05 | OG1 | Bad | 7,19 "W05","OG1","Bad "," 7,19"
W05 | OG1 | Balkon | 11,34 "W05","OG1","Balkon","11,34"
W05 | OG1 | Wohnküche | 27,83 "W05","OG1","Wohnküche","27,83"
W05 | OG1 | Zimmer | 13,62 "W05","OG1","Zimmer","13,62"
W05 | UG | KA05 | 5,01 "W05","UG ","KA05"," 5,01"
W06 | OG1 | Abstellraum | 4,11 "W06","OG1","Abstellraum "," 4,11"
W06 | OG1 | Bad | 5,54 "W06","OG1","Bad "," 5,54"
W06 | OG1 | Balkon | 16,71 "W06","OG1","Balkon","16,71"
W06 | OG1 | Gang | 10,42 "W06","OG1","Gang","10,42"
W06 | OG1 | WC | 2,13 "W06","OG1","WC"," 2,13"
W06 | OG1 | Wohnküche | 27,43 "W06","OG1","Wohnküche","27,43"
W06 | OG1 | Zimmer 1 | 10,97 "W06","OG1","Zimmer 1","10,97"
W06 | OG1 | Zimmer 2 | 12,08 "W06","OG1","Zimmer 2","12,08"
W06 | UG | KA06 | 5,13 "W06","UG ","KA06"," 5,13"
W07 | OG1 | Abstellraum | 3,22 "W07","OG1","Abstellraum "," 3,22"
W07 | OG1 | Bad | 6,51 "W07","OG1","Bad "," 6,51"
W07 | OG1 | Balkon | 22,46 "W07","OG1","Balkon","22,46"
W07 | OG1 | Gang | 11,73 "W07","OG1","Gang","11,73"
W07 | OG1 | WC | 2,46 "W07","OG1","WC"," 2,46"
W07 | OG1 | Wohnküche | 35,68 "W07","OG1","Wohnküche","35,68"
W07 | OG1 | Zimmer 1 | 14,70 "W07","OG1","Zimmer 1","14,70"
W07 | OG1 | Zimmer 2 | 10,89 "W07","OG1","Zimmer 2","10,89"
W07 | OG1 | Zimmer 3 | 11,52 "W07","OG1","Zimmer 3","11,52"
W07 | UG | KA07 | 5,13 "W07","UG ","KA07"," 5,13"
W08 | OG2 | Abstellraum | 3,09 "W08","OG2","Abstellraum "," 3,09"
W08 | OG2 | Bad | 5,92 "W08","OG2","Bad "," 5,92"
W08 | OG2 | Balkon | 21,98 "W08","OG2","Balkon","21,98"
W08 | OG2 | Gang | 11,50 "W08","OG2","Gang","11,50"
W08 | OG2 | WC | 2,46 "W08","OG2","WC"," 2,46"
W08 | OG2 | Wohnküche | 33,93 "W08","OG2","Wohnküche","33,93"
W08 | OG2 | Zimmer 1 | 10,88 "W08","OG2","Zimmer 1","10,88"
W08 | OG2 | Zimmer 2 | 10,86 "W08","OG2","Zimmer 2","10,86"
W08 | OG2 | Zimmer 3 | 14,67 "W08","OG2","Zimmer 3","14,67"
W08 | UG | KA08 | 5,13 "W08","UG ","KA08"," 5,13"
W09 | OG2 | Bad | 7,19 "W09","OG2","Bad "," 7,19"
W09 | OG2 | Balkon | 11,34 "W09","OG2","Balkon","11,34"
W09 | OG2 | Wohnküche | 27,83 "W09","OG2","Wohnküche","27,83"
W09 | OG2 | Zimmer | 13,62 "W09","OG2","Zimmer","13,62"
W09 | UG | KA09 | 5,13 "W09","UG ","KA09"," 5,13"
W10 | OG2 | Abstellraum | 4,11 "W10","OG2","Abstellraum "," 4,11"
W10 | OG2 | Bad | 5,54 "W10","OG2","Bad "," 5,54"
W10 | OG2 | Balkon | 16,70 "W10","OG2","Balkon","16,70"
W10 | OG2 | Gang | 10,42 "W10","OG2","Gang","10,42"
W10 | OG2 | WC | 2,13 "W10","OG2","WC"," 2,13"
W10 | OG2 | Wohnküche | 27,43 "W10","OG2","Wohnküche","27,43"
W10 | OG2 | Zimmer 1 | 10,97 "W10","OG2","Zimmer 1","10,97"
W10 | OG2 | Zimmer 2 | 12,08 "W10","OG2","Zimmer 2","12,08"
W10 | UG | KA10 | 5,13 "W10","UG ","KA10"," 5,13"
W11 | OG2 | Abstellraum | 3,22 "W11","OG2","Abstellraum "," 3,22"
W11 | OG2 | Bad | 6,51 "W11","OG2","Bad "," 6,51"
W11 | OG2 | Balkon | 22,46 "W11","OG2","Balkon","22,46"
W11 | OG2 | Gang | 11,73 "W11","OG2","Gang","11,73"
W11 | OG2 | WC | 2,46 "W11","OG2","WC"," 2,46"
W11 | OG2 | Wohnküche | 35,68 "W11","OG2","Wohnküche","35,68"
W11 | OG2 | Zimmer 1 | 14,70 "W11","OG2","Zimmer 1","14,70"
W11 | OG2 | Zimmer 2 | 10,89 "W11","OG2","Zimmer 2","10,89"
W11 | OG2 | Zimmer 3 | 11,52 "W11","OG2","Zimmer 3","11,52"
W11 | UG | KA11 | 4,06 "W11","UG ","KA11"," 4,06"
W12 | OG3 | Abstellraum | 3,09 "W12","OG3","Abstellraum "," 3,09"
W12 | OG3 | Bad | 5,92 "W12","OG3","Bad "," 5,92"
W12 | OG3 | Balkon | 21,97 "W12","OG3","Balkon","21,97"
W12 | OG3 | Gang | 11,50 "W12","OG3","Gang","11,50"
W12 | OG3 | WC | 2,46 "W12","OG3","WC"," 2,46"
W12 | OG3 | Wohnküche | 33,93 "W12","OG3","Wohnküche","33,93"
W12 | OG3 | Zimmer 1 | 10,88 "W12","OG3","Zimmer 1","10,88"
W12 | OG3 | Zimmer 2 | 10,86 "W12","OG3","Zimmer 2","10,86"
W12 | OG3 | Zimmer 3 | 14,67 "W12","OG3","Zimmer 3","14,67"
W12 | UG | KA12 | 4,06 "W12","UG ","KA12"," 4,06"
W13 | OG3 | Bad | 7,19 "W13","OG3","Bad "," 7,19"
W13 | OG3 | Balkon | 11,34 "W13","OG3","Balkon","11,34"
W13 | OG3 | Wohnküche | 27,83 "W13","OG3","Wohnküche","27,83"
W13 | OG3 | Zimmer | 13,62 "W13","OG3","Zimmer","13,62"
W13 | UG | KA13 | 4,06 "W13","UG ","KA13"," 4,06"
W14 | OG3 | Abstellraum | 4,11 "W14","OG3","Abstellraum "," 4,11"
W14 | OG3 | Bad | 5,54 "W14","OG3","Bad "," 5,54"
W14 | OG3 | Balkon | 17,20 "W14","OG3","Balkon","17,20"
W14 | OG3 | Gang | 10,42 "W14","OG3","Gang","10,42"
W14 | OG3 | WC | 2,13 "W14","OG3","WC"," 2,13"
W14 | OG3 | Wohnküche | 27,08 "W14","OG3","Wohnküche","27,08"
W14 | OG3 | Zimmer 1 | 10,97 "W14","OG3","Zimmer 1","10,97"
W14 | OG3 | Zimmer 2 | 12,08 "W14","OG3","Zimmer 2","12,08"
W14 | UG | KA14 | 4,06 "W14","UG ","KA14"," 4,06"