excel aufstellung finale

This commit is contained in:
salam committed 2025-11-18 17:57:58 +01:00
1 parent ebb51923a6
commit ebff82bd0e
19 files changed
+4765 -81

No files matched your search

+184
View File
@@ -0,0 +1,184 @@
<?php
namespace App\Actions\Generate;
use App\Actions\Generate\Tabellen\LadeProjekt;
use App\Models\Aufstellung;
use App\Models\Gutachter;
use App\Models\Projekte;
use App\Models\ProjektMethode;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Style\Border;
use PhpOffice\PhpSpreadsheet\Style\Color;
use PhpOffice\PhpSpreadsheet\Style\Fill;
class ExcelAufstellung
{
public static function make($projekte_id)
{
$black = 'ff000000';
$blue = 'ff162456';
$green = 'ff192e03';
$border = 'ff737373';
$projekt = Projekte::where('id', $projekte_id)->first();
$gutachter = Gutachter::where('id', $projekt->gutachter_id)->first();
$filepath = Storage::disk('public')->path("/download/$projekte_id/");
$filename = 'Aufstellung '.preg_replace("'[^0-9a-zA-Z]'", '', $projekt->interner_name).'.xlsx';
if (! File::isDirectory($filepath)) {
File::makeDirectory($filepath, 0777, true, true);
}
$file = $filepath.$filename;
// SPREADSHEET start
$spreadsheet = new Spreadsheet;
$spreadsheet->getProperties()->setCreator($gutachter->company)
->setLastModifiedBy($gutachter->name)
->setTitle($projekt->offizieller_name)
->setDescription($projekt->interner_name.' - '.date('d-m-Y H:i:s'));
$activeWorksheet = $spreadsheet->getActiveSheet();
$activeWorksheet->getStyle('A1:Z1')->getAlignment()->setTextRotation(90);
$activeWorksheet->getRowDimension('1')->setRowHeight(180);
$activeWorksheet->getStyle('A1:Z3')->getFont()->getColor()->setARGB(Color::COLOR_WHITE);
$activeWorksheet->getStyle('A1:Z3')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
$activeWorksheet->getStyle('A1:D3')->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB($black);
$key = 'A';
$titels = ['Top Nummer', 'Geschoß', 'Orientierung', 'Type'];
foreach ($titels as $titel) {
$activeWorksheet->setCellValue($key.'1', ' '.$titel);
$activeWorksheet->setCellValue($key.'2', ' ');
$activeWorksheet->setCellValue($key.'3', ' ');
$activeWorksheet->getStyle($key.'1:'.$key.'3')->getBorders()->getRight()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->getStyle($key.'3')->getBorders()->getBottom()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->getColumnDimension($key)->setAutoSize(true);
$key++;
}
$raumarten = ProjektMethode::where('projekte_id', $projekte_id)->where('methode_id', 1)->orderBy('raumart')->pluck('raumart');
$raumarten_map = [];
foreach ($raumarten as $raumart) {
$activeWorksheet->getStyle($key.'1:'.$key.'3')->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB($blue);
$activeWorksheet->setCellValue($key.'1', ' '.$raumart);
$raumarten_map[$raumart] = $key;
$activeWorksheet->getStyle($key.'3')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
$activeWorksheet->getStyle($key.'1:'.$key.'3')->getBorders()->getRight()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->getStyle($key.'3')->getBorders()->getBottom()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->setCellValue($key.'3', 'm²');
$activeWorksheet->getColumnDimension($key)->setAutoSize(true);
$key++;
}
$raumarten_map['next'] = $key;
$activeWorksheet->getStyle($key.'1:'.$key.'3')->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB($black);
$activeWorksheet->getStyle($key.'1:'.$key.'3')->getBorders()->getRight()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->setCellValue($key.'1', ' Summe Nutzflächen');
$activeWorksheet->setCellValue($key.'3', 'm²');
$activeWorksheet->getStyle($key.'3')->getBorders()->getBottom()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->getColumnDimension($key)->setAutoSize(true);
$key++;
$titels = Aufstellung::pluck('name', 'id');
foreach ($titels as $k => $titel) {
$activeWorksheet->getStyle($key.'1:'.$key.'3')->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB($green);
$activeWorksheet->setCellValue($key.'1', ' '.$titel);
$activeWorksheet->getStyle($key.'3')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
$activeWorksheet->getStyle($key.'1:'.$key.'3')->getBorders()->getRight()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->getStyle($key.'3')->getBorders()->getBottom()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$activeWorksheet->setCellValue($key.'3', 'm²');
$activeWorksheet->getColumnDimension($key)->setAutoSize(true);
$raumarten_map[$k] = $key;
$key++;
}
$_projekt = LadeProjekt::project($projekte_id, false);
$row = 4;
foreach ($_projekt as $top_number => $value) {
$key = 'A';
$activeWorksheet->setCellValue($key.$row, $top_number);
$activeWorksheet->getStyle($key.$row)->getFont()->getColor()->setARGB(Color::COLOR_WHITE);
$activeWorksheet->getStyle($key.$row)->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB($black);
$activeWorksheet->getStyle($key.$row)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
$activeWorksheet->getStyle($key.$row)->getBorders()->getBottom()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$key++;
$activeWorksheet->setCellValue($key.$row, $value[1][0]['geschoss']);
$key++;
$activeWorksheet->setCellValue($key.$row, $value[1][0]['orientierung']);
$key++;
$activeWorksheet->setCellValue($key.$row, $value[1][0]['type']);
$key++;
$summe_flaechen = 0;
foreach ($value[1] as $raeume) {
$raumart_key = $raumarten_map[$raeume['raumart']];
$activeWorksheet->setCellValue($raumart_key.$row, $raeume['flaeche']);
$activeWorksheet->getStyle($raumart_key.$row)->getNumberFormat()->setFormatCode('0.00');
$summe_flaechen += $raeume['flaeche'];
}
$key = $raumarten_map['next'];
$activeWorksheet->setCellValue($key.$row, $summe_flaechen);
$activeWorksheet->getStyle($key.$row)->getNumberFormat()->setFormatCode('0.00');
$activeWorksheet->getStyle($key.$row)->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB($black);
$activeWorksheet->getStyle($key.$row)->getFont()->getColor()->setARGB(Color::COLOR_WHITE);
$activeWorksheet->getStyle($key.$row)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
$activeWorksheet->getStyle($key.$row)->getBorders()->getBottom()->setBorderStyle(Border::BORDER_HAIR)->setColor(new Color($border));
$key++;
$summen = self::filter_flaechen($value);
foreach ($summen as $k => $value) {
$key = $raumarten_map[$k];
$activeWorksheet->setCellValue($key.$row, $value);
$activeWorksheet->getStyle($key.$row)->getNumberFormat()->setFormatCode('0.00');
}
$row++;
}
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
$spreadsheet->setActiveSheetIndex(0);
$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
// $writer->save('php://output');
$writer->save($file);
$headers = [
'Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'Cache-Control: max-age=0',
'Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT',
'Cache-Control: cache, must-revalidate',
];
return Response::download($file, $filename, $headers);
}
public static function filter_flaechen($arr)
{
$sum = [];
foreach ($arr as $key => $methode) {
if ($key > 1) {
foreach ($methode as $k => $v) {
if (! isset($sum[$v['aufstellung_id']])) {
$sum[$v['aufstellung_id']] = $v['flaeche'];
} else {
$sum[$v['aufstellung_id']] += $v['flaeche'];
}
}
}
}
return $sum;
}
}
@@ -14,7 +14,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Style\Border;
use PhpOffice\PhpSpreadsheet\Style\Fill;
class Excel
class ExcelNutzwerte
{
public static $projekt;
@@ -22,7 +22,7 @@ class Excel
public static $auftraggeber;
public static function make($projekte_id, $part)
public static function make($projekte_id)
{
self::$projekt = Projekte::where('id', $projekte_id)->first();
@@ -32,7 +32,7 @@ class Excel
self::$auftraggeber = Auftraggeber::where('id', self::$projekt->auftraggeber_id)->first();
$filepath = Storage::disk('public')->path("/download/$projekte_id/");
$filename = \ucfirst($part).' '.preg_replace("'[^0-9a-zA-Z]'", '', self::$projekt->interner_name).'.xlsx';
$filename = 'Nutzwerte '.preg_replace("'[^0-9a-zA-Z]'", '', self::$projekt->interner_name).'.xlsx';
if (! File::isDirectory($filepath)) {
File::makeDirectory($filepath, 0777, true, true);
}
@@ -135,7 +135,9 @@ class Excel
$activeWorksheet->setCellValue("C$row", $summe_nutzwert);
$activeWorksheet->setCellValue("D$row", $flaeche);
if ($loggien_flaeche) {
$activeWorksheet->setCellValue("E$row", $loggien_flaeche);
}
$activeWorksheet->setCellValue("F$row", $loggien_flaeche + $flaeche);
$activeWorksheet->setCellValue("AQ$row", $objekt[1][0]['geschoss']);
@@ -49,6 +49,7 @@ class LadeProjekt
$t['top_nummer'] = ! $key ? $objekt->top_nummer : '';
$t['objekt_nutzwert'] = $objekt->nutzwert;
$t['faktor'] = $methode_faktor;
$t['aufstellung_id'] = $methode['aufstellung_id'];
$tmp[$objekt->top_nummer][$methode_id][] = $t;
}
}
@@ -195,13 +195,13 @@ class EditProjekte extends EditRecord
Action::make('excel-nutzwerte')
->label('Nutzfläche & Nutzwerte')
->icon('icon-excel')
->url(fn ($record) => route('excel', ['record' => $record, 'part' => 'nutzwerte']))
->url(fn ($record) => route('excelnutzwerte', ['record' => $record]))
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
->openUrlInNewTab(),
Action::make('excel-aufstellung')
->label('Nutzflächen Aufstellung')
->icon('icon-excel')
->url(fn ($record) => route('excel', ['record' => $record, 'part' => 'aufstellung']))
->url(fn ($record) => route('excelaufstellung', ['record' => $record]))
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
->openUrlInNewTab(),
])->label('Excel')
@@ -3,6 +3,7 @@
namespace App\Filament\Resources\Projektes\RelationManagers;
use App\Actions\Create\CreateProjektMethoden;
use App\Models\Aufstellung;
use App\Models\Methode;
use App\Models\ProjektMethode;
use App\Models\ProjektObjekteImDetail;
@@ -52,6 +53,17 @@ class ProjektMethodesRelationManager extends RelationManager
})->validationMessages([
'required' => 'Die Eingabe einer Methode ist erforderlich.',
]),
SelectColumn::make('aufstellung_id')
->label('Aufstellung')
->optionsRelationship('aufstellung', 'name')
->preloadOptions()
->rules(['required'])
->afterStateUpdated(function (Component $livewire) {
$livewire->dispatch('refreshMethods');
})->validationMessages([
'required' => 'Die Eingabe einer Aufstellung ist erforderlich.',
]),
TextColumn::make('raumart')
->searchable(),
TextInputColumn::make('faktor')
@@ -166,6 +178,28 @@ class ProjektMethodesRelationManager extends RelationManager
})->after(function (Component $livewire) {
$livewire->dispatch('refreshMethods');
}),
BulkAction::make('aufstellung')
->color('primary')
->label('Aufstellung zuweisen')
->schema([
Select::make('aufstellung_id')
->label('Aufstellung')
->prefixIcon('phosphor-finn-the-human')
->options(Aufstellung::pluck('name', 'id'))
->required(),
])
->icon('phosphor-finn-the-human')
->action(function (Collection $records, array $data): void {
foreach ($records as $record) {
/** @var object $record */
ProjektMethode::where('id', '=', $record->id)
->update(
['aufstellung_id' => $data['aufstellung_id']]
);
}
})->after(function (Component $livewire) {
$livewire->dispatch('refreshMethods');
}),
]),
]);
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Aufstellung extends Model
{
//
}
+5
View File
@@ -29,4 +29,9 @@ class ProjektMethode extends Model
{
return $this->hasOne(Methode::class, 'id', 'methode_id');
}
public function aufstellung()
{
return $this->hasOne(Aufstellung::class, 'id', 'aufstellung_id');
}
}
+5 -5
View File
@@ -1,7 +1,7 @@
<?php return array (
'default' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/resources/svg' =>
'/Users/salam/Sites/nutzwerte_fi4/resources/svg' =>
array (
0 => 'excel',
1 => 'logo',
@@ -11,7 +11,7 @@
),
'heroicons' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/vendor/blade-ui-kit/blade-heroicons/src/../resources/svg' =>
'/Users/salam/Sites/nutzwerte_fi4/vendor/blade-ui-kit/blade-heroicons/src/../resources/svg' =>
array (
0 => 'c-academic-cap',
1 => 'c-adjustments-horizontal',
@@ -1305,7 +1305,7 @@
),
'phosphor-icons' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/vendor/codeat3/blade-phosphor-icons/src/../resources/svg' =>
'/Users/salam/Sites/nutzwerte_fi4/vendor/codeat3/blade-phosphor-icons/src/../resources/svg' =>
array (
0 => 'acorn-bold',
1 => 'acorn-duotone',
@@ -10383,7 +10383,7 @@
),
'filament' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/vendor/filament/support/src/../resources/svg' =>
'/Users/salam/Sites/nutzwerte_fi4/vendor/filament/support/src/../resources/svg' =>
array (
0 => 'o-align-center',
1 => 'o-align-end',
@@ -10420,7 +10420,7 @@
),
'lucide' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/vendor/mallardduck/blade-lucide-icons/src/../resources/svg' =>
'/Users/salam/Sites/nutzwerte_fi4/vendor/mallardduck/blade-lucide-icons/src/../resources/svg' =>
array (
0 => 'a-arrow-down',
1 => 'a-arrow-up',
+1161
View File
File diff suppressed because it is too large. Load diff
+22 -22
View File
@@ -70,9 +70,9 @@
),
'clusters' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters/Administration/AdministrationCluster.php' => 'App\\Filament\\Clusters\\Administration\\AdministrationCluster',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters/Projekte/ProjekteCluster.php' => 'App\\Filament\\Clusters\\Projekte\\ProjekteCluster',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters/Verwaltung/VerwaltungCluster.php' => 'App\\Filament\\Clusters\\Verwaltung\\VerwaltungCluster',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters/Administration/AdministrationCluster.php' => 'App\\Filament\\Clusters\\Administration\\AdministrationCluster',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters/Projekte/ProjekteCluster.php' => 'App\\Filament\\Clusters\\Projekte\\ProjekteCluster',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters/Verwaltung/VerwaltungCluster.php' => 'App\\Filament\\Clusters\\Verwaltung\\VerwaltungCluster',
),
'clusteredComponents' =>
array (
@@ -97,7 +97,7 @@
),
'clusterDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters',
0 => '/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters',
),
'clusterNamespaces' =>
array (
@@ -105,14 +105,14 @@
),
'pages' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters/Administration/AdministrationCluster.php' => 'App\\Filament\\Clusters\\Administration\\AdministrationCluster',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters/Projekte/ProjekteCluster.php' => 'App\\Filament\\Clusters\\Projekte\\ProjekteCluster',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters/Verwaltung/VerwaltungCluster.php' => 'App\\Filament\\Clusters\\Verwaltung\\VerwaltungCluster',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters/Administration/AdministrationCluster.php' => 'App\\Filament\\Clusters\\Administration\\AdministrationCluster',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters/Projekte/ProjekteCluster.php' => 'App\\Filament\\Clusters\\Projekte\\ProjekteCluster',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters/Verwaltung/VerwaltungCluster.php' => 'App\\Filament\\Clusters\\Verwaltung\\VerwaltungCluster',
0 => 'Filament\\Pages\\Dashboard',
),
'pageDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Pages',
0 => '/Users/salam/Sites/nutzwerte_fi4/app/Filament/Pages',
),
'pageNamespaces' =>
array (
@@ -120,23 +120,23 @@
),
'resources' =>
array (
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Auftraggebers/AuftraggeberResource.php' => 'App\\Filament\\Resources\\Auftraggebers\\AuftraggeberResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Gutachters/GutachterResource.php' => 'App\\Filament\\Resources\\Gutachters\\GutachterResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Helps/HelpResource.php' => 'App\\Filament\\Resources\\Helps\\HelpResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Inhaltsverzeichnis/InhaltsverzeichnisResource.php' => 'App\\Filament\\Resources\\Inhaltsverzeichnis\\InhaltsverzeichnisResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/KontoTextblocks/KontoTextblockResource.php' => 'App\\Filament\\Resources\\KontoTextblocks\\KontoTextblockResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Kontos/KontoResource.php' => 'App\\Filament\\Resources\\Kontos\\KontoResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Methodes/MethodeResource.php' => 'App\\Filament\\Resources\\Methodes\\MethodeResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Orientierungs/OrientierungResource.php' => 'App\\Filament\\Resources\\Orientierungs\\OrientierungResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Permissions/PermissionResource.php' => 'App\\Filament\\Resources\\Permissions\\PermissionResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Projektes/ProjekteResource.php' => 'App\\Filament\\Resources\\Projektes\\ProjekteResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Textblocks/TextblockResource.php' => 'App\\Filament\\Resources\\Textblocks\\TextblockResource',
'/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources/Users/UserResource.php' => 'App\\Filament\\Resources\\Users\\UserResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Auftraggebers/AuftraggeberResource.php' => 'App\\Filament\\Resources\\Auftraggebers\\AuftraggeberResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Gutachters/GutachterResource.php' => 'App\\Filament\\Resources\\Gutachters\\GutachterResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Helps/HelpResource.php' => 'App\\Filament\\Resources\\Helps\\HelpResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Inhaltsverzeichnis/InhaltsverzeichnisResource.php' => 'App\\Filament\\Resources\\Inhaltsverzeichnis\\InhaltsverzeichnisResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/KontoTextblocks/KontoTextblockResource.php' => 'App\\Filament\\Resources\\KontoTextblocks\\KontoTextblockResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Kontos/KontoResource.php' => 'App\\Filament\\Resources\\Kontos\\KontoResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Methodes/MethodeResource.php' => 'App\\Filament\\Resources\\Methodes\\MethodeResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Orientierungs/OrientierungResource.php' => 'App\\Filament\\Resources\\Orientierungs\\OrientierungResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Permissions/PermissionResource.php' => 'App\\Filament\\Resources\\Permissions\\PermissionResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Projektes/ProjekteResource.php' => 'App\\Filament\\Resources\\Projektes\\ProjekteResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Textblocks/TextblockResource.php' => 'App\\Filament\\Resources\\Textblocks\\TextblockResource',
'/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources/Users/UserResource.php' => 'App\\Filament\\Resources\\Users\\UserResource',
0 => 'BezhanSalleh\\FilamentShield\\Resources\\Roles\\RoleResource',
),
'resourceDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Resources',
0 => '/Users/salam/Sites/nutzwerte_fi4/app/Filament/Resources',
),
'resourceNamespaces' =>
array (
@@ -149,7 +149,7 @@
),
'widgetDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Widgets',
0 => '/Users/salam/Sites/nutzwerte_fi4/app/Filament/Widgets',
),
'widgetNamespaces' =>
array (
+3230
View File
File diff suppressed because it is too large. Load diff
Generated
+12 -12
View File
@@ -11470,16 +11470,16 @@
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.10.0",
"version": "1.10.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a"
"reference": "431c02da15e566adb0ad9c5030fa6f6204d9de9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a",
"reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/431c02da15e566adb0ad9c5030fa6f6204d9de9e",
"reference": "431c02da15e566adb0ad9c5030fa6f6204d9de9e",
"shasum": ""
},
"require": {
@@ -11522,9 +11522,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.1"
},
"time": "2024-11-09T15:12:26+00:00"
"time": "2025-11-18T07:51:16+00:00"
},
{
"name": "phpstan/phpdoc-parser",
@@ -13098,16 +13098,16 @@
},
{
"name": "theseer/tokenizer",
"version": "1.3.0",
"version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "d74205c497bfbca49f34d4bc4c19c17e22db4ebb"
"reference": "b7489ce515e168639d17feec34b8847c326b0b3c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/d74205c497bfbca49f34d4bc4c19c17e22db4ebb",
"reference": "d74205c497bfbca49f34d4bc4c19c17e22db4ebb",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c",
"reference": "b7489ce515e168639d17feec34b8847c326b0b3c",
"shasum": ""
},
"require": {
@@ -13136,7 +13136,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.3.0"
"source": "https://github.com/theseer/tokenizer/tree/1.3.1"
},
"funding": [
{
@@ -13144,7 +13144,7 @@
"type": "github"
}
],
"time": "2025-11-13T13:44:09+00:00"
"time": "2025-11-17T20:03:58+00:00"
},
{
"name": "webmozart/assert",
@@ -15,6 +15,7 @@ return new class extends Migration
$table->id();
$table->foreignId('projekte_id')->constrained()->cascadeOnDelete();
$table->integer('methode_id')->nullable()->default(0);
$table->integer('aufstellung_id')->nullable()->default(0);
$table->string('raumart')->nullable();
$table->decimal('faktor', 5, 2)->default(0);
$table->timestamps();
@@ -0,0 +1,28 @@
<?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('aufstellungs', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('aufstellungs');
}
};
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class AufstellungsSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$sql = "INSERT INTO `aufstellungs` (`id`, `name`, `created_at`, `updated_at`)
VALUES
('1', 'Terrasse (Zuschlag)', NULL, NULL),
('2', 'Garten (Zubehör)', NULL, NULL),
('3', 'Balkon (Zuschlag)', NULL, NULL),
('4', 'Loggia (Zuschlag)', NULL, NULL),
('5', 'KA-Kellerabteil (Zubehör)', NULL, NULL);
";
DB::unprepared($sql);
}
}
+1
View File
@@ -19,6 +19,7 @@ class DatabaseSeeder extends Seeder
MethodeSeeder::class,
OrientierungenSeeder::class,
InhaltselementSeeder::class,
AufstellungsSeeder::class,
TextblockSeeder::class,
InhaltsverzeichnisSeeder::class,
KontoSeeder::class,
+34 -34
View File
@@ -62,41 +62,41 @@ class TestProjektSeeder extends Seeder
DB::unprepared($sql);
$sql = "INSERT INTO `projekt_methodes` (`id`, `projekte_id`, `methode_id`, `raumart`, `faktor`, `created_at`, `updated_at`)
$sql = "INSERT INTO `projekt_methodes` (`id`, `projekte_id`, `methode_id`, `aufstellung_id`, `raumart`, `faktor`, `created_at`, `updated_at`)
VALUES
('1', '3', '5', 'Stellplatz+', '0.50', '2025-11-14 10:43:11', '2025-11-14 11:11:22'),
('2', '3', '5', 'Stellplatz', '0.55', '2025-11-14 10:43:11', '2025-11-14 11:11:39'),
('3', '3', '1', 'Bad', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('4', '3', '4', 'Garten G01', '0.05', '2025-11-14 10:43:11', '2025-11-14 11:14:28'),
('5', '3', '4', 'Keller KA01', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('6', '3', '3', 'Terrasse', '0.25', '2025-11-14 10:43:11', '2025-11-14 11:16:20'),
('7', '3', '1', 'Vorraum', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('8', '3', '1', 'Wohnen/Kochen', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('9', '3', '1', 'Zimmer', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('10', '3', '4', 'Garten G02', '0.05', '2025-11-14 10:43:11', '2025-11-14 11:14:28'),
('11', '3', '4', 'Keller KA02', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('12', '3', '4', 'Garten G03', '0.05', '2025-11-14 10:43:11', '2025-11-14 11:14:28'),
('13', '3', '4', 'Keller KA03', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('14', '3', '4', 'Garten G04', '0.05', '2025-11-14 10:43:11', '2025-11-14 11:14:28'),
('15', '3', '4', 'Keller KA04', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('16', '3', '4', 'Garten G05', '0.05', '2025-11-14 10:43:11', '2025-11-14 11:14:28'),
('17', '3', '4', 'KellerKA05', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('18', '3', '3', 'Balkon', '0.25', '2025-11-14 10:43:11', '2025-11-14 11:16:36'),
('19', '3', '4', 'Keller KA06', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('20', '3', '1', 'Vorraum/Gang', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('21', '3', '4', 'Keller KA07', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('22', '3', '4', 'Keller KA08', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('23', '3', '4', 'Keller KA09', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('24', '3', '4', 'Keller KA10', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('25', '3', '4', 'KellerKA11', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('26', '3', '2', 'Loggia', '0.40', '2025-11-14 10:43:11', '2025-11-14 11:16:46'),
('27', '3', '4', 'Keller KA12', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('28', '3', '4', 'Keller KA13', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('29', '3', '4', 'Keller KA14', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('30', '3', '4', 'Keller KA15', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('31', '3', '4', 'Keller KA16', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15'),
('32', '3', '1', 'AR', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('33', '3', '4', 'Keller KA17', '0.15', '2025-11-14 10:43:11', '2025-11-14 11:13:15');
('1', '3', '5', '0', 'Stellplatz+', '0.50', '2025-11-14 10:43:11', '2025-11-14 11:11:22'),
('2', '3', '5', '0', 'Stellplatz', '0.55', '2025-11-14 10:43:11', '2025-11-14 11:11:39'),
('3', '3', '1', '0', 'Bad', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('4', '3', '4', '2', 'Garten G01', '0.05', '2025-11-14 10:43:11', '2025-11-18 16:18:55'),
('5', '3', '4', '5', 'Keller KA01', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('6', '3', '3', '1', 'Terrasse', '0.25', '2025-11-14 10:43:11', '2025-11-18 16:19:30'),
('7', '3', '1', '0', 'Vorraum', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('8', '3', '1', '0', 'Wohnen/Kochen', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('9', '3', '1', '0', 'Zimmer', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('10', '3', '4', '2', 'Garten G02', '0.05', '2025-11-14 10:43:11', '2025-11-18 16:18:55'),
('11', '3', '4', '5', 'Keller KA02', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('12', '3', '4', '2', 'Garten G03', '0.05', '2025-11-14 10:43:11', '2025-11-18 16:18:55'),
('13', '3', '4', '5', 'Keller KA03', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('14', '3', '4', '2', 'Garten G04', '0.05', '2025-11-14 10:43:11', '2025-11-18 16:18:55'),
('15', '3', '4', '5', 'Keller KA04', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('16', '3', '4', '2', 'Garten G05', '0.05', '2025-11-14 10:43:11', '2025-11-18 16:18:55'),
('17', '3', '4', '5', 'KellerKA05', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('18', '3', '3', '3', 'Balkon', '0.25', '2025-11-14 10:43:11', '2025-11-18 16:19:49'),
('19', '3', '4', '5', 'Keller KA06', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('20', '3', '1', '0', 'Vorraum/Gang', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('21', '3', '4', '5', 'Keller KA07', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('22', '3', '4', '5', 'Keller KA08', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('23', '3', '4', '5', 'Keller KA09', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('24', '3', '4', '5', 'Keller KA10', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('25', '3', '4', '5', 'KellerKA11', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('26', '3', '2', '4', 'Loggia', '0.40', '2025-11-14 10:43:11', '2025-11-18 16:19:35'),
('27', '3', '4', '5', 'Keller KA12', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('28', '3', '4', '5', 'Keller KA13', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('29', '3', '4', '5', 'Keller KA14', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('30', '3', '4', '5', 'Keller KA15', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('31', '3', '4', '5', 'Keller KA16', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21'),
('32', '3', '1', '0', 'AR', '0.00', '2025-11-14 10:43:11', '2025-11-14 11:15:53'),
('33', '3', '4', '5', 'Keller KA17', '0.15', '2025-11-14 10:43:11', '2025-11-18 16:19:21');
";
DB::unprepared($sql);
+1 -1
View File
@@ -1 +1 @@
/Users/hermanntelser/Sites/nutzwerte_fi4/storage/app/public
/Users/salam/Sites/nutzwerte_fi4/storage/app/public
+4 -2
View File
@@ -1,6 +1,7 @@
<?php
use App\Actions\Generate\Excel;
use App\Actions\Generate\ExcelAufstellung;
use App\Actions\Generate\ExcelNutzwerte;
use App\Actions\Generate\PdfGenerator;
use Filament\Http\Middleware\Authenticate;
use Illuminate\Support\Facades\Route;
@@ -19,4 +20,5 @@ Route::get('/impressum', function () {
});
Route::middleware(Authenticate::class)->get('/app/pdf/{record}/{part}', [PdfGenerator::class, 'make'])->name('pdf');
Route::middleware(Authenticate::class)->get('/app/excel/{record}/{part}', [Excel::class, 'make'])->name('excel');
Route::middleware(Authenticate::class)->get('/app/excelnutzwerte/{record}', [ExcelNutzwerte::class, 'make'])->name('excelnutzwerte');
Route::middleware(Authenticate::class)->get('/app/excelaufstellung/{record}', [ExcelAufstellung::class, 'make'])->name('excelaufstellung');