agp zusaztfläache lager un 2. abstellplatz, desing color default an per projekt

This commit is contained in:
salam committed 2026-02-18 13:55:57 +01:00
1 parent 7c25584f33
commit 8562eb0f04
11 files changed
+84 -57

No files matched your search

+14 -5
View File
@@ -77,11 +77,20 @@ class PdfGenerator
$stylesheet = file_get_contents(__DIR__.'/../../../resources/css/pdf-download.css'); $stylesheet = file_get_contents(__DIR__.'/../../../resources/css/pdf-download.css');
$bgcolors = []; $colors = [];
$bgcolors["'###BG_DECKBLATT###'"] = self::$projekt->deckblatt_bg; if (self::$projekt->projekt_farben_verwenden) {
$bgcolors["'###BG_HEADER###'"] = self::$projekt->schmuckfarbe_header; $colors["'###BG_DECKBLATT###'"] = self::$projekt->deckblatt_bg;
$bgcolors["'###FARBE_RAHMEN###'"] = self::$projekt->farbe_borders; $colors["'###BG_HEADER###'"] = self::$projekt->schmuckfarbe_header;
$stylesheet = Platzhalter::replace($bgcolors, $stylesheet); $colors["'###FARBE_RAHMEN###'"] = self::$projekt->farbe_borders;
} else {
$colors["'###BG_DECKBLATT###'"] = self::$gutachter->deckblatt_bg;
$colors["'###BG_HEADER###'"] = self::$gutachter->schmuckfarbe_header;
$colors["'###FARBE_RAHMEN###'"] = self::$gutachter->farbe_borders;
}
$stylesheet = Platzhalter::replace($colors, $stylesheet);
// dd($stylesheet);
$mpdf->WriteHTML($stylesheet, HTMLParserMode::HEADER_CSS); $mpdf->WriteHTML($stylesheet, HTMLParserMode::HEADER_CSS);
$mpdf->SetTitle($filename); $mpdf->SetTitle($filename);
@@ -21,13 +21,13 @@ class Nutzwertberechnung
$html .= '<table autosize="1" style="page-break-inside:avoid;">'; $html .= '<table autosize="1" style="page-break-inside:avoid;">';
$html .= '<thead><tr>'; $html .= '<thead><tr>';
$html .= '<th class="bl bt bg-user-set">Top Nr.</th>'; $html .= '<th class="bl bt bg-user-set">Top Nr.</th>';
$html .= '<th class="bl bt bg-user-set">Geschoß</th>'; $html .= '<th class="bt bb bg-user-set">Geschoß</th>';
$html .= '<th class="bl bt bg-user-set">Orientierung</th>'; $html .= '<th class="bt bb bg-user-set">Orientierung</th>';
$html .= '<th class="bl bt bg-user-set">Typ</th>'; $html .= '<th class="bt bb bg-user-set">Typ</th>';
$html .= '<th class="bl bt bg-user-set">Raumart</th>'; $html .= '<th class="bt bb bg-user-set">Raumart</th>';
$html .= '<th class="bl bt bg-user-set">Fläche</th>'; $html .= '<th class="bt bb bg-user-set">Fläche</th>';
$html .= '<th class="bl bt bg-user-set" colspan="6"></th>'; $html .= '<th class="bt bb bg-user-set" colspan="6"></th>';
$html .= '<th class="bl bt br bg-user-set">Nutzwert</th>'; $html .= '<th class="bt br bb bg-user-set">Nutzwert</th>';
$html .= '</tr></thead>'; $html .= '</tr></thead>';
$summe_nutzwert = 0; $summe_nutzwert = 0;
@@ -38,7 +38,7 @@ class Nutzwertberechnung
$flaeche = 0; $flaeche = 0;
foreach ($methoden[1] as $komponente) { foreach ($methoden[1] as $komponente) {
$html .= '<tr>'; $html .= '<tr>';
$html .= Html::td($komponente['top_nummer'], 'bg-user-set'); $html .= Html::td($komponente['top_nummer'], 'bl bg-user-set');
$html .= Html::td($komponente['geschoss'], 'bl'); $html .= Html::td($komponente['geschoss'], 'bl');
$html .= Html::td($komponente['orientierung'], 'bl'); $html .= Html::td($komponente['orientierung'], 'bl');
$html .= Html::td($komponente['type'], 'bl'); $html .= Html::td($komponente['type'], 'bl');
@@ -180,11 +180,11 @@ class Nutzwertberechnung
$html .= '<table autosize="1" style="page-break-inside:avoid;">'; $html .= '<table autosize="1" style="page-break-inside:avoid;">';
$html .= '<thead><tr>'; $html .= '<thead><tr>';
$html .= '<th class="bl bt bg-user-set">Top Nr.</th>'; $html .= '<th class="bl bt bg-user-set">Top Nr.</th>';
$html .= '<th class="bl bt bg-user-set">Geschoß</th>'; $html .= '<th class="bt bb bg-user-set">Geschoß</th>';
$html .= '<th class="bl bt bg-user-set">Raumart</th>'; $html .= '<th class="bt bb bg-user-set">Raumart</th>';
$html .= '<th class="bl bt bg-user-set">Fläche</th>'; $html .= '<th class="bt bb bg-user-set">Fläche</th>';
$html .= '<th class="bl bt bg-user-set" colspan="4"></th>'; $html .= '<th class="bt bb bg-user-set" colspan="4"></th>';
$html .= '<th class="bl bt br bg-user-set">Nutzwert</th>'; $html .= '<th class="bt bb br bg-user-set">Nutzwert</th>';
$html .= '</tr></thead>'; $html .= '</tr></thead>';
$nutzwert = 0; $nutzwert = 0;
@@ -199,10 +199,11 @@ class Nutzwertberechnung
$html .= Html::td('x', 'center bl'); $html .= Html::td('x', 'center bl');
$html .= Html::td(number_format($komponente['faktor'], 3), 'center bl'); $html .= Html::td(number_format($komponente['faktor'], 3), 'center bl');
$html .= Html::td('=', 'center bl'); $html .= Html::td('=', 'center bl');
$nutzwert = $komponente['flaeche'] * $komponente['faktor']; $flaeche = $komponente['flaeche'] * $komponente['faktor'];
$html .= Html::td(number_format($nutzwert, 3, ',', '.'), 'right bl'); $html .= Html::td(number_format($flaeche, 3, ',', '.'), 'right bl');
$nutzwert = round($nutzwert) < 1 ? 1 : round($nutzwert); $tmp = round($flaeche) < 1 ? 1 : round($flaeche);
$html .= Html::td($nutzwert, 'center bl br'); $html .= Html::td($tmp, 'center bl br');
$nutzwert += $tmp;
$html .= '</tr>'; $html .= '</tr>';
} }
} }
+3 -1
View File
@@ -19,8 +19,10 @@ class Html
public static function table_footer($nutzwert_summe, $colspan = 12) public static function table_footer($nutzwert_summe, $colspan = 12)
{ {
$colspan--;
$html = '<tfooter><tr>'; $html = '<tfooter><tr>';
$html .= '<th colspan="'.$colspan.'" class="bl bb right bg-user-set">Nutzwert gerundet</th>'; $html .= '<th class="bl bb bg-user-set"></th>';
$html .= '<th colspan="'.$colspan.'" class="bt bb right bg-user-set">Nutzwert gerundet</th>';
$html .= '<th class="bt br bb center bg-user-set">'.$nutzwert_summe.'</th>'; $html .= '<th class="bt br bb center bg-user-set">'.$nutzwert_summe.'</th>';
$html .= '</tr></tfooter>'; $html .= '</tr></tfooter>';
@@ -11,6 +11,7 @@ use Filament\Forms\Components\Radio;
use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Select; use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Components\Section; use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Tabs; use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab; use Filament\Schemas\Components\Tabs\Tab;
@@ -112,13 +113,24 @@ class ProjekteForm
Tab::make('Farben') Tab::make('Farben')
->icon('phosphor-palette') ->icon('phosphor-palette')
->schema([ ->schema([
Toggle::make('projekt_farben_verwenden')
->label('Eigene Farben verwenden')
->afterStateUpdated(function ($record, ?string $state) {
$state = $state ? 0 : 1;
Projekte::where('id', $record->id)->update(['projekt_farben_verwenden' => $state]);
})
->belowContent('Die standard Farben können unter Verwaltung/Gutachter definiert werden.')
->live(),
ColorPicker::make('deckblatt_bg')->label('Deckblatt') ColorPicker::make('deckblatt_bg')->label('Deckblatt')
->disabled(fn ($record) => ! $record->projekt_farben_verwenden)
->belowContent('Farbe des Hintergrundes am Deckblatt.'), ->belowContent('Farbe des Hintergrundes am Deckblatt.'),
ColorPicker::make('schmuckfarbe_header')->label('Überschriften') ColorPicker::make('schmuckfarbe_header')->label('Überschriften')
->disabled(fn ($record) => ! $record->projekt_farben_verwenden)
->belowContent('Farbe des Hintergrundes bei Überschriften.'), ->belowContent('Farbe des Hintergrundes bei Überschriften.'),
ColorPicker::make('farbe_borders')->label('Rahmen') ColorPicker::make('farbe_borders')->label('Rahmen')
->disabled(fn ($record) => ! $record->projekt_farben_verwenden)
->belowContent('Farbe von Rahmen und Rändern bei Tabellen und Boxen.'), ->belowContent('Farbe von Rahmen und Rändern bei Tabellen und Boxen.'),
])->columns(3) ])->columns(4)
->columnSpanFull(), ->columnSpanFull(),
]), ]),
+3
View File
@@ -23,6 +23,9 @@ class Gutachter extends Model
'logo', 'logo',
'logo_align', 'logo_align',
'logo_height', 'logo_height',
'deckblatt_bg',
'schmuckfarbe_header',
'farbe_borders',
'referenz_formatting', 'referenz_formatting',
'digitale_signatur_stempel', 'digitale_signatur_stempel',
'logo_anzeigen', 'logo_anzeigen',
+2
View File
@@ -17,6 +17,7 @@ class Projekte extends Model
'beschreibung', 'beschreibung',
'erstellung', 'erstellung',
'status', 'status',
'projekt_farben_verwenden',
'deckblatt_bg', 'deckblatt_bg',
'schmuckfarbe_header', 'schmuckfarbe_header',
'farbe_borders', 'farbe_borders',
@@ -34,6 +35,7 @@ class Projekte extends Model
return [ return [
'bezahlt_am' => 'datetime', 'bezahlt_am' => 'datetime',
'evaluation_gutachten' => 'boolean', 'evaluation_gutachten' => 'boolean',
'projekt_farben_verwenden' => 'boolean',
]; ];
} }
+1 -1
View File
@@ -45,7 +45,7 @@ class AppServiceProvider extends ServiceProvider
'primary' => Color::Blue, 'primary' => Color::Blue,
'success' => Color::Green, 'success' => Color::Green,
'warning' => Color::Yellow, 'warning' => Color::Yellow,
'info' => Color::Indigo, 'info' => Color::Gray,
]); ]);
FilamentView::registerRenderHook( FilamentView::registerRenderHook(
+21 -21
View File
@@ -531,7 +531,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::gyuOkwPzWA9uKnmQ', '_route' => 'generated::5BJWNQ8gpVm7tDhl',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -551,7 +551,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::F2qfHMTG8Dbgmj2K', '_route' => 'generated::W9u3yRB1LqoJQS2J',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -609,7 +609,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::D3qvVMn2AokSMqDW', '_route' => 'generated::fkCjP31YGbY5G6dv',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -629,7 +629,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::NiBxfTXvQWugg7Fc', '_route' => 'generated::yEt0equZ5XgruA0H',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -649,7 +649,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::a3qQSrhLLVMANh6r', '_route' => 'generated::OISNadFLEyszoJW4',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -669,7 +669,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::hyfx57nLCUeXXZF4', '_route' => 'generated::B6UAPlq6gj1zObUV',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -689,7 +689,7 @@ app('router')->setCompiledRoutes(
array ( array (
0 => 0 =>
array ( array (
'_route' => 'generated::57sy5sfX1bMcy03J', '_route' => 'generated::UQXbzaRGtwxEyPnS',
), ),
1 => NULL, 1 => NULL,
2 => 2 =>
@@ -2757,7 +2757,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::gyuOkwPzWA9uKnmQ' => 'generated::5BJWNQ8gpVm7tDhl' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2769,7 +2769,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::gyuOkwPzWA9uKnmQ', 'as' => 'generated::5BJWNQ8gpVm7tDhl',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2785,7 +2785,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::F2qfHMTG8Dbgmj2K' => 'generated::W9u3yRB1LqoJQS2J' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2797,7 +2797,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::F2qfHMTG8Dbgmj2K', 'as' => 'generated::W9u3yRB1LqoJQS2J',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2899,7 +2899,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::D3qvVMn2AokSMqDW' => 'generated::fkCjP31YGbY5G6dv' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2928,7 +2928,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:"0000000000002af60000000000000000";}}', }";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000002af60000000000000000";}}',
'as' => 'generated::D3qvVMn2AokSMqDW', 'as' => 'generated::fkCjP31YGbY5G6dv',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2944,7 +2944,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::NiBxfTXvQWugg7Fc' => 'generated::yEt0equZ5XgruA0H' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -2966,7 +2966,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::NiBxfTXvQWugg7Fc', 'as' => 'generated::yEt0equZ5XgruA0H',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -2982,7 +2982,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::a3qQSrhLLVMANh6r' => 'generated::OISNadFLEyszoJW4' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -3004,7 +3004,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::a3qQSrhLLVMANh6r', 'as' => 'generated::OISNadFLEyszoJW4',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -3020,7 +3020,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::hyfx57nLCUeXXZF4' => 'generated::B6UAPlq6gj1zObUV' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -3042,7 +3042,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::hyfx57nLCUeXXZF4', 'as' => 'generated::B6UAPlq6gj1zObUV',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -3058,7 +3058,7 @@ app('router')->setCompiledRoutes(
'waitSeconds' => NULL, 'waitSeconds' => NULL,
'withTrashed' => false, 'withTrashed' => false,
), ),
'generated::57sy5sfX1bMcy03J' => 'generated::UQXbzaRGtwxEyPnS' =>
array ( array (
'methods' => 'methods' =>
array ( array (
@@ -3080,7 +3080,7 @@ app('router')->setCompiledRoutes(
'where' => 'where' =>
array ( array (
), ),
'as' => 'generated::57sy5sfX1bMcy03J', 'as' => 'generated::UQXbzaRGtwxEyPnS',
), ),
'fallback' => false, 'fallback' => false,
'defaults' => 'defaults' =>
@@ -22,6 +22,7 @@ return new class extends Migration
$table->text('beschreibung')->nullable(); $table->text('beschreibung')->nullable();
$table->string('erstellung')->nullable(); $table->string('erstellung')->nullable();
$table->string('status')->default('entwurf'); $table->string('status')->default('entwurf');
$table->boolean('projekt_farben_verwenden')->default(0)->nullable();
$table->string('deckblatt_bg')->nullable(); $table->string('deckblatt_bg')->nullable();
$table->string('schmuckfarbe_header')->nullable(); $table->string('schmuckfarbe_header')->nullable();
$table->string('farbe_borders')->nullable(); $table->string('farbe_borders')->nullable();
+1 -1
View File
@@ -1 +1 @@
/Users/salam/Sites/nutzwerte_fi4/storage/app/public /Users/hermanntelser/Sites/nutzwerte_fi4/storage/app/public
+7 -10
View File
@@ -56,16 +56,13 @@ body {
overflow: hidden; overflow: hidden;
} }
/** FORMATTING */ /** FORMATTING */
.header { .header {
padding: 1.5mm 3mm; padding: 1.5mm 3mm;
margin: 11mm auto 5mm; margin: 11mm auto 5mm;
font-size: 14px; font-size: 14px;
border: 0.3mm solid '###FARBE_RAHMEN###'; border: 0.1mm solid '###FARBE_RAHMEN###';
background-color: '###BG_HEADER###'; background: '###BG_HEADER###';
font-size: 11.5pt; font-size: 11.5pt;
} }
@@ -234,21 +231,21 @@ th {
} }
.border { .border {
border: 0.3mm solid '###FARBE_RAHMEN###'; border: 0.1mm solid '###FARBE_RAHMEN###';
} }
.bt { .bt {
border-top: 0.3mm solid '###FARBE_RAHMEN###'; border-top: 0.1mm solid '###FARBE_RAHMEN###';
} }
.bb { .bb {
border-bottom: 0.3mm solid '###FARBE_RAHMEN###'; border-bottom: 0.1mm solid '###FARBE_RAHMEN###';
} }
.bl { .bl {
border-left: 0.3mm solid '###FARBE_RAHMEN###'; border-left: 0.1mm solid '###FARBE_RAHMEN###';
} }
.br { .br {
border-right: 0.3mm solid '###FARBE_RAHMEN###'; border-right: 0.1mm solid '###FARBE_RAHMEN###';
} }