diff --git a/app/Actions/Generate/Tabellen/Nutzwertberechnung.php b/app/Actions/Generate/Tabellen/Nutzwertberechnung.php index 79857e5..9e2e5aa 100644 --- a/app/Actions/Generate/Tabellen/Nutzwertberechnung.php +++ b/app/Actions/Generate/Tabellen/Nutzwertberechnung.php @@ -15,10 +15,12 @@ class Nutzwertberechnung $objekte = LadeProjekt::project($projekte_id, false); - $html = ''; - foreach ($objekte as $methoden) { + // dd($objekte); - $html .= ''; + $html = ''; + foreach ($objekte as $topnr => $methoden) { + + $html .= '
'; $html .= ''; $html .= ''; $html .= ''; @@ -38,7 +40,8 @@ class Nutzwertberechnung $flaeche = 0; foreach ($methoden[1] as $komponente) { $html .= ''; - $html .= Html::td($komponente['top_nummer'], 'bl bg-user-set'); + // $html .= Html::td($komponente['top_nummer'], 'bl bg-user-set'); + $html .= Html::td($topnr, 'bl bg-user-set'); $html .= Html::td($komponente['geschoss'], 'bl'); $html .= Html::td($komponente['orientierung'], 'bl'); $html .= Html::td($komponente['type'], 'bl'); @@ -47,6 +50,7 @@ class Nutzwertberechnung $html .= Html::td('', 'bl br', 7); $flaeche += $komponente['flaeche']; $html .= ''; + $topnr = ''; } $faktor = (100 + $komponente['objekt_nutzwert']) / 100; diff --git a/app/Actions/Validation/GutachtenValidation.php b/app/Actions/Validation/GutachtenValidation.php index 6bd9aac..979b981 100644 --- a/app/Actions/Validation/GutachtenValidation.php +++ b/app/Actions/Validation/GutachtenValidation.php @@ -88,6 +88,43 @@ class GutachtenValidation } } + /** + * ProjektObjekteImDetail + raumart + * -> cosistent + * ProjektMethode + raumart + */ + $raumarts_oid = ProjektObjekteImDetail::where('projekte_id', $record->id)->groupBy('raumart')->pluck('raumart')->toArray(); + $raumarts_meth = ProjektMethode::where('projekte_id', $record->id)->pluck('raumart')->toArray(); + + $extra_oid = array_diff($raumarts_oid, $raumarts_meth); + $extra_meth = array_diff($raumarts_meth, $raumarts_oid); + + if ($extra_oid) { + $titel = \count($extra_oid) == 1 ? 'Für diese "Raumart" aus "Objekte im Detail" ist keine "Raum Methode" definiert' : 'Für diese "Raumarten" aus "Objekte im Detail" sind keine "Raum Methoden" definiert'; + Notification::make() + ->title($titel) + ->icon('heroicon-o-exclamation-triangle') + ->duration(10000) + ->danger() + ->body(implode('
', $extra_oid)) + ->send(); + + return false; + } + + if ($extra_meth) { + $titel = \count($extra_meth) == 1 ? 'Für diese "Raumart" aus "Raum Methode" existiert kein "Objekte im Detail"' : 'Für diese "Raumarten" aus "Raum Methode" existieren kein "Objekte im Detail"'; + Notification::make() + ->title($titel) + ->icon('heroicon-o-exclamation-triangle') + ->duration(10000) + ->danger() + ->body(implode('
', $extra_oid)) + ->send(); + + return false; + } + /** * ProjektObjekte + nicht_in_orientierung */ diff --git a/app/Filament/Resources/Projektes/RelationManagers/ProjektObjekteImDetailRelationManager.php b/app/Filament/Resources/Projektes/RelationManagers/ProjektObjekteImDetailRelationManager.php index 95718eb..a043b64 100644 --- a/app/Filament/Resources/Projektes/RelationManagers/ProjektObjekteImDetailRelationManager.php +++ b/app/Filament/Resources/Projektes/RelationManagers/ProjektObjekteImDetailRelationManager.php @@ -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) { diff --git a/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php b/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php index a692be3..e1e8c0a 100644 --- a/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php +++ b/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php @@ -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') diff --git a/composer.lock b/composer.lock index 917f22b..8f10fd6 100644 --- a/composer.lock +++ b/composer.lock @@ -2725,16 +2725,16 @@ }, { "name": "laravel/framework", - "version": "v12.58.0", + "version": "v12.59.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "6172ae1f44ba5d89e111057ee4a4e7c27f5a610d" + "reference": "70a838b1a6f12abaf5bebb76ea4f28fbd37451fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/6172ae1f44ba5d89e111057ee4a4e7c27f5a610d", - "reference": "6172ae1f44ba5d89e111057ee4a4e7c27f5a610d", + "url": "https://api.github.com/repos/laravel/framework/zipball/70a838b1a6f12abaf5bebb76ea4f28fbd37451fa", + "reference": "70a838b1a6f12abaf5bebb76ea4f28fbd37451fa", "shasum": "" }, "require": { @@ -2943,7 +2943,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2026-04-26T16:42:04+00:00" + "time": "2026-05-14T15:31:40+00:00" }, { "name": "laravel/prompts", @@ -3413,16 +3413,16 @@ }, { "name": "league/flysystem", - "version": "3.33.0", + "version": "3.34.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "570b8871e0ce693764434b29154c54b434905350" + "reference": "2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/570b8871e0ce693764434b29154c54b434905350", - "reference": "570b8871e0ce693764434b29154c54b434905350", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e", + "reference": "2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e", "shasum": "" }, "require": { @@ -3490,9 +3490,9 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.33.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.34.0" }, - "time": "2026-03-25T07:59:30+00:00" + "time": "2026-05-14T10:28:08+00:00" }, { "name": "league/flysystem-local", @@ -4021,16 +4021,16 @@ }, { "name": "mallardduck/blade-lucide-icons", - "version": "1.26.19", + "version": "1.26.20", "source": { "type": "git", "url": "https://github.com/mallardduck/blade-lucide-icons.git", - "reference": "a6e164dca10d29fd67ca332b9ef78bf2b35e0df8" + "reference": "9a1e0525fba0958fd08896fb42972a8ec90cc155" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mallardduck/blade-lucide-icons/zipball/a6e164dca10d29fd67ca332b9ef78bf2b35e0df8", - "reference": "a6e164dca10d29fd67ca332b9ef78bf2b35e0df8", + "url": "https://api.github.com/repos/mallardduck/blade-lucide-icons/zipball/9a1e0525fba0958fd08896fb42972a8ec90cc155", + "reference": "9a1e0525fba0958fd08896fb42972a8ec90cc155", "shasum": "" }, "require": { @@ -4075,9 +4075,9 @@ ], "support": { "issues": "https://github.com/mallardduck/blade-lucide-icons/issues", - "source": "https://github.com/mallardduck/blade-lucide-icons/tree/1.26.19" + "source": "https://github.com/mallardduck/blade-lucide-icons/tree/1.26.20" }, - "time": "2026-04-30T00:36:39+00:00" + "time": "2026-05-15T00:39:05+00:00" }, { "name": "markbaker/complex", @@ -6506,16 +6506,16 @@ }, { "name": "setasign/fpdi", - "version": "v2.6.6", + "version": "v2.6.7", "source": { "type": "git", "url": "https://github.com/Setasign/FPDI.git", - "reference": "de0cf35911be3e9ea63b48e0f307883b1c7c48ac" + "reference": "388c51e69982a3fc16698710b763e8107a49f510" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/de0cf35911be3e9ea63b48e0f307883b1c7c48ac", - "reference": "de0cf35911be3e9ea63b48e0f307883b1c7c48ac", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/388c51e69982a3fc16698710b763e8107a49f510", + "reference": "388c51e69982a3fc16698710b763e8107a49f510", "shasum": "" }, "require": { @@ -6566,7 +6566,7 @@ ], "support": { "issues": "https://github.com/Setasign/FPDI/issues", - "source": "https://github.com/Setasign/FPDI/tree/v2.6.6" + "source": "https://github.com/Setasign/FPDI/tree/v2.6.7" }, "funding": [ { @@ -6574,7 +6574,7 @@ "type": "tidelift" } ], - "time": "2026-03-13T08:38:20+00:00" + "time": "2026-05-13T10:16:22+00:00" }, { "name": "spatie/invade", @@ -7068,16 +7068,16 @@ }, { "name": "symfony/console", - "version": "v7.4.9", + "version": "v7.4.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d7d2b64a45a89d607865927b176fa51c33ddbb58" + "reference": "ed0107e43ab452aa77ae99e005b95e56b556e075" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d7d2b64a45a89d607865927b176fa51c33ddbb58", - "reference": "d7d2b64a45a89d607865927b176fa51c33ddbb58", + "url": "https://api.github.com/repos/symfony/console/zipball/ed0107e43ab452aa77ae99e005b95e56b556e075", + "reference": "ed0107e43ab452aa77ae99e005b95e56b556e075", "shasum": "" }, "require": { @@ -7142,7 +7142,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.9" + "source": "https://github.com/symfony/console/tree/v7.4.11" }, "funding": [ { @@ -7162,7 +7162,7 @@ "type": "tidelift" } ], - "time": "2026-04-22T15:21:55+00:00" + "time": "2026-05-13T12:04:42+00:00" }, { "name": "symfony/css-selector", @@ -7777,16 +7777,16 @@ }, { "name": "symfony/http-kernel", - "version": "v7.4.10", + "version": "v7.4.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "23486f59234c6fd6e8f1bec97124f3829d686627" + "reference": "eb9d68199af3fcfb3fb4d2e227367b68f8c1bb88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/23486f59234c6fd6e8f1bec97124f3829d686627", - "reference": "23486f59234c6fd6e8f1bec97124f3829d686627", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/eb9d68199af3fcfb3fb4d2e227367b68f8c1bb88", + "reference": "eb9d68199af3fcfb3fb4d2e227367b68f8c1bb88", "shasum": "" }, "require": { @@ -7872,7 +7872,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.4.10" + "source": "https://github.com/symfony/http-kernel/tree/v7.4.11" }, "funding": [ { @@ -7892,7 +7892,7 @@ "type": "tidelift" } ], - "time": "2026-05-06T12:07:34+00:00" + "time": "2026-05-13T17:55:00+00:00" }, { "name": "symfony/mailer", @@ -8898,16 +8898,16 @@ }, { "name": "symfony/process", - "version": "v7.4.8", + "version": "v7.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "60f19cd3badc8de688421e21e4305eba50f8089a" + "reference": "d9593c9efa40499eb078b81144de42cbc28a31f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/60f19cd3badc8de688421e21e4305eba50f8089a", - "reference": "60f19cd3badc8de688421e21e4305eba50f8089a", + "url": "https://api.github.com/repos/symfony/process/zipball/d9593c9efa40499eb078b81144de42cbc28a31f0", + "reference": "d9593c9efa40499eb078b81144de42cbc28a31f0", "shasum": "" }, "require": { @@ -8939,7 +8939,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.4.8" + "source": "https://github.com/symfony/process/tree/v7.4.11" }, "funding": [ { @@ -8959,7 +8959,7 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-05-11T16:55:21+00:00" }, { "name": "symfony/routing", @@ -9135,16 +9135,16 @@ }, { "name": "symfony/string", - "version": "v7.4.8", + "version": "v7.4.11", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "114ac57257d75df748eda23dd003878080b8e688" + "reference": "965f7306a43383d02c6aca1e3f3bd2f0ea5dee15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/114ac57257d75df748eda23dd003878080b8e688", - "reference": "114ac57257d75df748eda23dd003878080b8e688", + "url": "https://api.github.com/repos/symfony/string/zipball/965f7306a43383d02c6aca1e3f3bd2f0ea5dee15", + "reference": "965f7306a43383d02c6aca1e3f3bd2f0ea5dee15", "shasum": "" }, "require": { @@ -9202,7 +9202,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.4.8" + "source": "https://github.com/symfony/string/tree/v7.4.11" }, "funding": [ { @@ -9222,7 +9222,7 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-05-13T12:04:42+00:00" }, { "name": "symfony/translation", @@ -9855,16 +9855,16 @@ }, { "name": "ysfkaya/filament-phone-input", - "version": "v4.1.4", + "version": "v4.1.5", "source": { "type": "git", "url": "https://github.com/ysfkaya/filament-phone-input.git", - "reference": "8328285557f5cc07f631b2f40f5b075d986cc9cc" + "reference": "c6cf24522bf73bba4ef101e2b6c4b97f46f9951e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ysfkaya/filament-phone-input/zipball/8328285557f5cc07f631b2f40f5b075d986cc9cc", - "reference": "8328285557f5cc07f631b2f40f5b075d986cc9cc", + "url": "https://api.github.com/repos/ysfkaya/filament-phone-input/zipball/c6cf24522bf73bba4ef101e2b6c4b97f46f9951e", + "reference": "c6cf24522bf73bba4ef101e2b6c4b97f46f9951e", "shasum": "" }, "require": { @@ -9913,9 +9913,9 @@ ], "support": { "issues": "https://github.com/ysfkaya/filament-phone-input/issues", - "source": "https://github.com/ysfkaya/filament-phone-input/tree/v4.1.4" + "source": "https://github.com/ysfkaya/filament-phone-input/tree/v4.1.5" }, - "time": "2026-04-17T10:46:27+00:00" + "time": "2026-05-15T05:23:29+00:00" } ], "packages-dev": [ @@ -10582,16 +10582,16 @@ }, { "name": "laravel/sail", - "version": "v1.58.0", + "version": "v1.59.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "2e5e968138ca52ed87d712449697a8364d73b466" + "reference": "a41abad557e487eaefde6c9873085ed086fdf47a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/2e5e968138ca52ed87d712449697a8364d73b466", - "reference": "2e5e968138ca52ed87d712449697a8364d73b466", + "url": "https://api.github.com/repos/laravel/sail/zipball/a41abad557e487eaefde6c9873085ed086fdf47a", + "reference": "a41abad557e487eaefde6c9873085ed086fdf47a", "shasum": "" }, "require": { @@ -10641,7 +10641,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2026-04-27T13:38:34+00:00" + "time": "2026-05-13T14:02:20+00:00" }, { "name": "mockery/mockery", @@ -12065,23 +12065,23 @@ }, { "name": "sebastian/cli-parser", - "version": "4.2.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04" + "reference": "7d05781b13f7dec9043a629a21d086ed74582a15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7d05781b13f7dec9043a629a21d086ed74582a15", + "reference": "7d05781b13f7dec9043a629a21d086ed74582a15", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -12110,7 +12110,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.1" }, "funding": [ { @@ -12130,7 +12130,7 @@ "type": "tidelift" } ], - "time": "2025-09-14T09:36:45+00:00" + "time": "2026-05-17T05:29:34+00:00" }, { "name": "sebastian/comparator", @@ -13014,16 +13014,16 @@ }, { "name": "symfony/yaml", - "version": "v7.4.10", + "version": "v7.4.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c660d6538545a3e8e65a5621ee3d7a6d352892c7" + "reference": "e2eb64a57763815ccae07ac1c7653d6cc1c326fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c660d6538545a3e8e65a5621ee3d7a6d352892c7", - "reference": "c660d6538545a3e8e65a5621ee3d7a6d352892c7", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e2eb64a57763815ccae07ac1c7653d6cc1c326fd", + "reference": "e2eb64a57763815ccae07ac1c7653d6cc1c326fd", "shasum": "" }, "require": { @@ -13066,7 +13066,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.4.10" + "source": "https://github.com/symfony/yaml/tree/v7.4.11" }, "funding": [ { @@ -13086,7 +13086,7 @@ "type": "tidelift" } ], - "time": "2026-05-05T08:01:55+00:00" + "time": "2026-05-13T12:04:42+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test",
Top Nr.Geschoß