diff --git a/app/Actions/Generate/Gutachten/Deckblatt.php b/app/Actions/Generate/Gutachten/Deckblatt.php index b5e535a..f30667e 100644 --- a/app/Actions/Generate/Gutachten/Deckblatt.php +++ b/app/Actions/Generate/Gutachten/Deckblatt.php @@ -4,51 +4,37 @@ namespace App\Actions\Generate\Gutachten; use App\Actions\Generate\MakeGutachten; use Filament\Forms\Components\RichEditor\RichContentRenderer; -use Illuminate\Support\Facades\Storage; class Deckblatt { public static function create() { - // dd(MakeGutachten::$gutachter->kopf); // GUTACHTER - - $html = '
'; - foreach (MakeGutachten::$gutachter->kopf as $component) { - switch ($component) { - case 'logo': - $imgUrl = Storage::disk('public')->url(MakeGutachten::$gutachter->logo); - $html .= ''; - break; - case 'adresse': - $from = ['--', 'text-align: end;']; - $to = ['', 'text-align: right;']; - $html .= str_replace($from, $to, RichContentRenderer::make(MakeGutachten::$gutachter->address)->toHtml()); - break; - } + $html = '
'; + $html .= '
'; + if (MakeGutachten::$gutachter->logo) { + $html = '
'; } + $from = ['--', 'text-align: end;']; + $to = ['', 'text-align: right;']; + $str = RichContentRenderer::make(MakeGutachten::$gutachter->gutachten_layout)->toHtml(); + $html .= str_replace($from, $to, $str); $html .= '
'; - // if (MakeGutachten::$gutachter->kopf == 'adressenblock') { - // $html .= '
'.MakeGutachten::$gutachter->adressenblock.'
'; - // } elseif (MakeGutachten::$gutachter->kopf == 'logo') { - // $html .= '
'; - // $html .= ''; - // $html .= '
'; - // } - // $html .= '
'; - - $html .= '
Gutachten'; - $html .= '
'.trim(MakeGutachten::$projekt->interner_name).'
'; + $html .= '
'; + $html .= '

Gutachten

'; + $html .= '
'.trim(MakeGutachten::$projekt->interner_name).'
'; $html .= '
'; - $html .= '
Zur Festsetzung der Nutzwerte'; - $html .= '
'.trim(MakeGutachten::$projekt->offizieller_name).'
'; + $html .= '
'; + $html .= '

Zur Festsetzung der Nutzwerte'; + $html .= '
'.trim(MakeGutachten::$projekt->offizieller_name).'
'; + $html .= '

'; $html .= '
'; - // // AUFTRAGGEBER - // $html .= '
'; + // $html .= '

'; // $html .= MakeGutachten::$auftraggeber->adressenblock; + // $html .= '

'; return $html; } diff --git a/app/Filament/Resources/Gutachters/Schemas/GutachterForm.php b/app/Filament/Resources/Gutachters/Schemas/GutachterForm.php index 90793b1..51f2b82 100644 --- a/app/Filament/Resources/Gutachters/Schemas/GutachterForm.php +++ b/app/Filament/Resources/Gutachters/Schemas/GutachterForm.php @@ -2,8 +2,8 @@ namespace App\Filament\Resources\Gutachters\Schemas; -use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\FileUpload; +use Filament\Forms\Components\Radio; use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; @@ -21,18 +21,52 @@ class GutachterForm ->components([ Tabs::make('Tabs') ->tabs([ - Tab::make('Firmenname') + + Tab::make('Gutachter') ->icon('lucide-stamp') + ->inlineLabel() ->schema([ TextInput::make('company') ->label('Firma') ->required(), - RichEditor::make('address') - ->extraInputAttributes(['id' => 'gutrte', 'style' => 'min-height: 20rem; max-height: 50vh; overflow-y: auto;']) + TextInput::make('title') + ->label('Title') + ->required(), + Select::make('gender') + ->label('Geschlecht') + ->options([ + 'Herr' => 'Herr', + 'Frau' => 'Frau', + 'Non-binary' => 'Non-binary', + ]) + ->required(), + TextInput::make('name') + ->label('Name') + ->required(), + TextInput::make('email') + ->label('E-Mail') + ->required() + ->prefixIcon(Heroicon::Envelope), + PhoneInput::make('phone') + ->label('Telefon') + ->defaultCountry('AT'), + ]), + Tab::make('Anzeige') + ->icon('lucide-contact') + ->schema([ + RichEditor::make('gutachten_layout') + ->json() + ->extraInputAttributes(['style' => 'min-height: 20rem; max-height: 50vh; overflow-y: auto;']) ->toolbarButtons([ ['bold', 'italic', 'underline', 'horizontalRule', 'clearFormatting'], - ['h1', 'h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd', 'alignJustify'], - ['undo', 'redo', 'textColor'], + ['h1', 'h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd', 'textColor'], + ])->floatingToolbars([ + 'paragraph' => [ + 'bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', + ], + 'heading' => [ + 'h1', 'h2', 'h3', + ], ]) ->textColors([ '#fb2c36' => 'Rot', @@ -60,35 +94,8 @@ class GutachterForm ->label('Adresse') ->required(), ]), - Tab::make('Gutachter') - ->icon('lucide-contact') - ->inlineLabel() - ->schema([ - TextInput::make('title') - ->label('Title') - ->required(), - Select::make('gender') - ->label('Geschlecht') - ->options([ - 'Herr' => 'Herr', - 'Frau' => 'Frau', - 'Non-binary' => 'Non-binary', - ]) - ->required(), - TextInput::make('name') - ->label('Name') - ->required(), - TextInput::make('email') - ->label('E-Mail') - ->required() - ->prefixIcon(Heroicon::Envelope), - PhoneInput::make('phone') - ->label('Telefon') - ->defaultCountry('AT'), - ]), Tab::make('Logo') - ->icon('phosphor-squares-four') - ->inlineLabel() + ->icon('phosphor-image') ->schema([ FileUpload::make('logo') ->image() @@ -103,22 +110,15 @@ class GutachterForm ->directory('gutachter-logo') ->visibility('public') ->label('Logo'), - ]), - Tab::make('Anzeige Im Gutachten') - ->icon('phosphor-eye') - ->inlineLabel() - ->schema([ - CheckboxList::make('kopf') - ->Label('Bitte auswählen') + Radio::make('logo_align') + ->Label('Position') + ->default('right') ->options([ - 'logo' => '
Logo
', - 'firma' => '
Firmename
', - 'adresse' => '
Adresse
', - 'name' => '
Gutachter
', - ]) - ->allowHtml() - ->columnSpanFull(), - ]), + 'left' => 'Links', + 'center' => 'Zentriert', + 'right' => 'Rechts', + ]), + ])->columns(2), ])->columnSpanFull(), ]); } diff --git a/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php b/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php index d458e04..b0318b6 100644 --- a/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php +++ b/app/Filament/Resources/Projektes/Schemas/ProjekteForm.php @@ -37,8 +37,8 @@ class ProjekteForm ])->columns(2), Tab::make('Zuordnung') ->schema([ - Select::make('auftraggeber_id')->relationship(name: 'auftraggeber', titleAttribute: 'company')->required(), Select::make('gutachter_id')->relationship(name: 'gutachter', titleAttribute: 'company')->required(), + Select::make('auftraggeber_id')->relationship(name: 'auftraggeber', titleAttribute: 'company')->required(), Radio::make('status')->options(ProjektStatus::class)->required(), ]), Tab::make('Beschreibung') diff --git a/app/Models/Gutachter.php b/app/Models/Gutachter.php index 1f1c2b5..ddb3a94 100644 --- a/app/Models/Gutachter.php +++ b/app/Models/Gutachter.php @@ -18,12 +18,11 @@ class Gutachter extends Model 'gender', 'name', 'company', - 'logo', - 'address', 'email', 'phone', - 'use_logo', - 'kopf', + 'logo', + 'logo_align', + 'gutachten_layout', ]; /** @@ -32,7 +31,7 @@ class Gutachter extends Model protected function casts(): array { return [ - 'kopf' => 'array', + 'gutachten_layout' => 'array', ]; } diff --git a/bootstrap/cache/blade-icons.php b/bootstrap/cache/blade-icons.php index 385d75b..d154e2d 100755 --- a/bootstrap/cache/blade-icons.php +++ b/bootstrap/cache/blade-icons.php @@ -1,7 +1,7 @@ array ( - '/Users/hermanntelser/Sites/nutzwerte_fi4/resources/svg' => + '/Users/salam/Sites/nutzwerte_fi4/resources/svg' => array ( 0 => 'excel', 1 => 'logo', @@ -10,7 +10,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', @@ -1304,7 +1304,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', @@ -10382,7 +10382,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', @@ -10419,7 +10419,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', diff --git a/bootstrap/cache/config.php b/bootstrap/cache/config.php index f053558..38fdf7f 100644 --- a/bootstrap/cache/config.php +++ b/bootstrap/cache/config.php @@ -81,9 +81,9 @@ array ( 'paths' => array ( - 0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/resources/views', + 0 => '/Users/salam/Sites/nutzwerte_fi4/resources/views', ), - 'compiled' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/framework/views', + 'compiled' => '/Users/salam/Sites/nutzwerte_fi4/storage/framework/views', ), 'cors' => array ( @@ -124,9 +124,9 @@ 'timezone' => 'UTC', 'locale' => 'de', 'fallback_locale' => 'en', - 'faker_locale' => 'at_AT', + 'faker_locale' => 'de_AT', 'cipher' => 'AES-256-CBC', - 'key' => 'base64:yRi9h21i7xAkGpeF7JoArovQJU1w6xwczQ6ijpYpJrs=', + 'key' => 'base64:zrVnUcBmUGjEV/EoAKnZCm/1FWplKu79kYBvevE2/ek=', 'previous_keys' => array ( ), @@ -301,8 +301,8 @@ 'file' => array ( 'driver' => 'file', - 'path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/framework/cache/data', - 'lock_path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/framework/cache/data', + 'path' => '/Users/salam/Sites/nutzwerte_fi4/storage/framework/cache/data', + 'lock_path' => '/Users/salam/Sites/nutzwerte_fi4/storage/framework/cache/data', ), 'memcached' => array ( @@ -513,7 +513,7 @@ ), 'policies' => array ( - 'path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/app/Policies', + 'path' => '/Users/salam/Sites/nutzwerte_fi4/app/Policies', 'merge' => true, 'generate' => true, 'methods' => @@ -601,7 +601,7 @@ 'local' => array ( 'driver' => 'local', - 'root' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/app/private', + 'root' => '/Users/salam/Sites/nutzwerte_fi4/storage/app/private', 'serve' => true, 'throw' => false, 'report' => false, @@ -609,7 +609,7 @@ 'public' => array ( 'driver' => 'local', - 'root' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/app/public', + 'root' => '/Users/salam/Sites/nutzwerte_fi4/storage/app/public', 'url' => 'http://nutzwerte_fi4.test/storage', 'visibility' => 'public', 'throw' => false, @@ -631,7 +631,7 @@ 'promotion' => array ( 'driver' => 'local', - 'root' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/app/public/promotion', + 'root' => '/Users/salam/Sites/nutzwerte_fi4/storage/app/public/promotion', 'url' => 'http://nutzwerte_fi4.test/storage/promotion', 'visibility' => 'public', 'throw' => false, @@ -639,7 +639,7 @@ ), 'links' => array ( - '/Users/hermanntelser/Sites/nutzwerte_fi4/public/storage' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/app/public', + '/Users/salam/Sites/nutzwerte_fi4/public/storage' => '/Users/salam/Sites/nutzwerte_fi4/storage/app/public', ), ), 'logging' => @@ -664,14 +664,14 @@ 'single' => array ( 'driver' => 'single', - 'path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/logs/laravel.log', + 'path' => '/Users/salam/Sites/nutzwerte_fi4/storage/logs/laravel.log', 'level' => 'debug', 'replace_placeholders' => true, ), 'daily' => array ( 'driver' => 'daily', - 'path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/logs/laravel.log', + 'path' => '/Users/salam/Sites/nutzwerte_fi4/storage/logs/laravel.log', 'level' => 'debug', 'days' => 14, 'replace_placeholders' => true, @@ -736,7 +736,7 @@ ), 'emergency' => array ( - 'path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/logs/laravel.log', + 'path' => '/Users/salam/Sites/nutzwerte_fi4/storage/logs/laravel.log', ), ), ), @@ -835,7 +835,7 @@ 'theme' => 'default', 'paths' => array ( - 0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/resources/views/vendor/mail', + 0 => '/Users/salam/Sites/nutzwerte_fi4/resources/views/vendor/mail', ), ), ), @@ -1011,7 +1011,7 @@ 'lifetime' => 120, 'expire_on_close' => false, 'encrypt' => false, - 'files' => '/Users/hermanntelser/Sites/nutzwerte_fi4/storage/framework/sessions', + 'files' => '/Users/salam/Sites/nutzwerte_fi4/storage/framework/sessions', 'connection' => NULL, 'table' => 'sessions', 'store' => NULL, @@ -1059,7 +1059,7 @@ ), 'default_filesystem_disk' => 'local', 'assets_path' => NULL, - 'cache_path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/bootstrap/cache/filament', + 'cache_path' => '/Users/salam/Sites/nutzwerte_fi4/bootstrap/cache/filament', 'livewire_loading_delay' => 'default', 'file_generation' => array ( @@ -1072,7 +1072,7 @@ 'livewire' => array ( 'class_namespace' => 'App\\Livewire', - 'view_path' => '/Users/hermanntelser/Sites/nutzwerte_fi4/resources/views/livewire', + 'view_path' => '/Users/salam/Sites/nutzwerte_fi4/resources/views/livewire', 'layout' => 'components.layouts.app', 'lazy_placeholder' => NULL, 'temporary_file_upload' => diff --git a/bootstrap/cache/filament/panels/admin.php b/bootstrap/cache/filament/panels/admin.php index ebc7574..952faf8 100644 --- a/bootstrap/cache/filament/panels/admin.php +++ b/bootstrap/cache/filament/panels/admin.php @@ -68,9 +68,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 ( @@ -95,7 +95,7 @@ ), 'clusterDirectories' => array ( - 0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Clusters', + 0 => '/Users/salam/Sites/nutzwerte_fi4/app/Filament/Clusters', ), 'clusterNamespaces' => array ( @@ -103,14 +103,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 ( @@ -118,23 +118,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/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/Plans/PlanResource.php' => 'App\\Filament\\Resources\\Plans\\PlanResource', - '/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/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/Plans/PlanResource.php' => 'App\\Filament\\Resources\\Plans\\PlanResource', + '/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 ( @@ -147,7 +147,7 @@ ), 'widgetDirectories' => array ( - 0 => '/Users/hermanntelser/Sites/nutzwerte_fi4/app/Filament/Widgets', + 0 => '/Users/salam/Sites/nutzwerte_fi4/app/Filament/Widgets', ), 'widgetNamespaces' => array ( diff --git a/bootstrap/cache/routes-v7.php b/bootstrap/cache/routes-v7.php index d6f54d3..aeb9abb 100644 --- a/bootstrap/cache/routes-v7.php +++ b/bootstrap/cache/routes-v7.php @@ -531,7 +531,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::LS0AO3r24PK1cLwb', + '_route' => 'generated::L7b1YA47T9s0omBA', ), 1 => NULL, 2 => @@ -551,7 +551,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::ICIjNXoEjo0TU0Ey', + '_route' => 'generated::Ygu7hdLXxAya0Jwi', ), 1 => NULL, 2 => @@ -609,7 +609,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::rlpdl1zMqMRAioUR', + '_route' => 'generated::85F3xzxQEWIxq9uv', ), 1 => NULL, 2 => @@ -629,7 +629,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::3MehTYokO6eNMgrN', + '_route' => 'generated::YRUPKy6VVQdAVucX', ), 1 => NULL, 2 => @@ -649,7 +649,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::O6veqbE0VAIicYHD', + '_route' => 'generated::FzMLl3zcZ3kzXDVv', ), 1 => NULL, 2 => @@ -669,7 +669,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::LhkfxiUg0pF2qRyR', + '_route' => 'generated::SLSjfIczvj1yEU9W', ), 1 => NULL, 2 => @@ -689,7 +689,7 @@ app('router')->setCompiledRoutes( array ( 0 => array ( - '_route' => 'generated::FbrtCqIJjaQuQsCC', + '_route' => 'generated::tNOl50sUOeNNDxqh', ), 1 => NULL, 2 => @@ -2740,7 +2740,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::LS0AO3r24PK1cLwb' => + 'generated::L7b1YA47T9s0omBA' => array ( 'methods' => array ( @@ -2752,7 +2752,7 @@ app('router')->setCompiledRoutes( array ( 'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile', 'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile', - 'as' => 'generated::LS0AO3r24PK1cLwb', + 'as' => 'generated::L7b1YA47T9s0omBA', ), 'fallback' => false, 'defaults' => @@ -2768,7 +2768,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::ICIjNXoEjo0TU0Ey' => + 'generated::Ygu7hdLXxAya0Jwi' => array ( 'methods' => array ( @@ -2780,7 +2780,7 @@ app('router')->setCompiledRoutes( array ( 'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps', 'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps', - 'as' => 'generated::ICIjNXoEjo0TU0Ey', + 'as' => 'generated::Ygu7hdLXxAya0Jwi', ), 'fallback' => false, 'defaults' => @@ -2882,7 +2882,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::rlpdl1zMqMRAioUR' => + 'generated::85F3xzxQEWIxq9uv' => array ( 'methods' => array ( @@ -2892,7 +2892,7 @@ app('router')->setCompiledRoutes( 'uri' => 'up', 'action' => array ( - 'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:0:{}s:8:"function";s:834:"function () { + 'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:0:{}s:8:"function";s:826:"function () { $exception = null; try { @@ -2907,11 +2907,11 @@ app('router')->setCompiledRoutes( $exception = $e->getMessage(); } - return response(\\Illuminate\\Support\\Facades\\View::file(\'/Users/hermanntelser/Sites/nutzwerte_fi4/vendor/laravel/framework/src/Illuminate/Foundation/Configuration\'.\'/../resources/health-up.blade.php\', [ + return response(\\Illuminate\\Support\\Facades\\View::file(\'/Users/salam/Sites/nutzwerte_fi4/vendor/laravel/framework/src/Illuminate/Foundation/Configuration\'.\'/../resources/health-up.blade.php\', [ \'exception\' => $exception, ]), status: $exception ? 500 : 200); }";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000f3b0000000000000000";}}', - 'as' => 'generated::rlpdl1zMqMRAioUR', + 'as' => 'generated::85F3xzxQEWIxq9uv', ), 'fallback' => false, 'defaults' => @@ -2927,7 +2927,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::3MehTYokO6eNMgrN' => + 'generated::YRUPKy6VVQdAVucX' => array ( 'methods' => array ( @@ -2949,7 +2949,7 @@ app('router')->setCompiledRoutes( 'where' => array ( ), - 'as' => 'generated::3MehTYokO6eNMgrN', + 'as' => 'generated::YRUPKy6VVQdAVucX', ), 'fallback' => false, 'defaults' => @@ -2965,7 +2965,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::O6veqbE0VAIicYHD' => + 'generated::FzMLl3zcZ3kzXDVv' => array ( 'methods' => array ( @@ -2987,7 +2987,7 @@ app('router')->setCompiledRoutes( 'where' => array ( ), - 'as' => 'generated::O6veqbE0VAIicYHD', + 'as' => 'generated::FzMLl3zcZ3kzXDVv', ), 'fallback' => false, 'defaults' => @@ -3003,7 +3003,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::LhkfxiUg0pF2qRyR' => + 'generated::SLSjfIczvj1yEU9W' => array ( 'methods' => array ( @@ -3025,7 +3025,7 @@ app('router')->setCompiledRoutes( 'where' => array ( ), - 'as' => 'generated::LhkfxiUg0pF2qRyR', + 'as' => 'generated::SLSjfIczvj1yEU9W', ), 'fallback' => false, 'defaults' => @@ -3041,7 +3041,7 @@ app('router')->setCompiledRoutes( 'waitSeconds' => NULL, 'withTrashed' => false, ), - 'generated::FbrtCqIJjaQuQsCC' => + 'generated::tNOl50sUOeNNDxqh' => array ( 'methods' => array ( @@ -3063,7 +3063,7 @@ app('router')->setCompiledRoutes( 'where' => array ( ), - 'as' => 'generated::FbrtCqIJjaQuQsCC', + 'as' => 'generated::tNOl50sUOeNNDxqh', ), 'fallback' => false, 'defaults' => @@ -3203,7 +3203,7 @@ app('router')->setCompiledRoutes( 'uri' => 'storage/{path}', 'action' => array ( - 'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:3:{s:4:"disk";s:5:"local";s:6:"config";a:5:{s:6:"driver";s:5:"local";s:4:"root";s:60:"/Users/hermanntelser/Sites/nutzwerte_fi4/storage/app/private";s:5:"serve";b:1;s:5:"throw";b:0;s:6:"report";b:0;}s:12:"isProduction";b:0;}s:8:"function";s:323:"function (\\Illuminate\\Http\\Request $request, string $path) use ($disk, $config, $isProduction) { + 'uses' => 'O:55:"Laravel\\SerializableClosure\\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\\SerializableClosure\\Serializers\\Native":5:{s:3:"use";a:3:{s:4:"disk";s:5:"local";s:6:"config";a:5:{s:6:"driver";s:5:"local";s:4:"root";s:52:"/Users/salam/Sites/nutzwerte_fi4/storage/app/private";s:5:"serve";b:1;s:5:"throw";b:0;s:6:"report";b:0;}s:12:"isProduction";b:0;}s:8:"function";s:323:"function (\\Illuminate\\Http\\Request $request, string $path) use ($disk, $config, $isProduction) { return (new \\Illuminate\\Filesystem\\ServeFile( $disk, $config, diff --git a/database/factories/GutachterFactory.php b/database/factories/GutachterFactory.php index c45d2d5..6b8a7bc 100644 --- a/database/factories/GutachterFactory.php +++ b/database/factories/GutachterFactory.php @@ -29,9 +29,9 @@ gpetrovic@gmx.at'; 'gender' => fake()->randomElement(['Frau', 'Herr']), 'name' => fake()->name(), 'company' => fake()->Company(), - 'address' => $adress, 'email' => fake()->email(), 'phone' => fake()->PhoneNumber(), + 'gutachten_layout' => $adress, ]; } } diff --git a/database/migrations/2025_09_05_131323_create_gutachter_tables.php b/database/migrations/2025_09_05_131323_create_gutachter_tables.php index 7787c7f..871726b 100644 --- a/database/migrations/2025_09_05_131323_create_gutachter_tables.php +++ b/database/migrations/2025_09_05_131323_create_gutachter_tables.php @@ -19,11 +19,10 @@ return new class extends Migration $table->string('name')->nullable(); $table->string('company')->nullable(); $table->string('logo')->nullable(); - $table->text('address')->nullable(); $table->string('email')->nullable(); $table->string('phone')->nullable(); - $table->boolean('use_logo')->default(false); - $table->string('kopf')->nullable(); + $table->string('logo_align')->default('right'); + $table->text('gutachten_layout')->nullable(); $table->timestamps(); }); } diff --git a/public/images/adler2.jpg b/public/images/adler2.jpg new file mode 100644 index 0000000..3330d98 Binary files /dev/null and b/public/images/adler2.jpg differ diff --git a/public/images/adler4.jpg b/public/images/adler4.jpg new file mode 100644 index 0000000..a9d0c26 Binary files /dev/null and b/public/images/adler4.jpg differ diff --git a/public/images/bundes-adler-grau.jpg b/public/images/bundes-adler-grau.jpg new file mode 100644 index 0000000..b467111 Binary files /dev/null and b/public/images/bundes-adler-grau.jpg differ diff --git a/public/images/bundesadler.png b/public/images/bundesadler.png new file mode 100644 index 0000000..24a8ec3 Binary files /dev/null and b/public/images/bundesadler.png differ diff --git a/resources/css/filament/admin/theme.css b/resources/css/filament/admin/theme.css index 90de96e..12fa708 100644 --- a/resources/css/filament/admin/theme.css +++ b/resources/css/filament/admin/theme.css @@ -56,6 +56,7 @@ } #gutrte { + h1 { font-size: 2rem; line-height: 2.4rem; diff --git a/resources/css/pdf-download.css b/resources/css/pdf-download.css index 83915a3..4425eeb 100644 --- a/resources/css/pdf-download.css +++ b/resources/css/pdf-download.css @@ -1,46 +1,106 @@ -body { +body, +table, +.base { font-family: DejaVuSans; - font-size: 0.8rem; - line-height: 1.5rem; + font-size: 10px; + line-height: 16px; margin: 0; padding: 0; } -.big { - font-size: 1.6rem; - line-height: 2rem; - margin-bottom: .5rem; +body { + /* + mPDF has a custom css property for background images: background-image-resize with custom values from 0-6: + + 0 - No resizing (default) + 1 - Shrink-to-fit w (keep aspect ratio) + 2 - Shrink-to-fit h (keep aspect ratio) + 3 - Shrink-to-fit w and/or h (keep aspect ratio) + 4 - Resize-to-fit w (keep aspect ratio) + 5 - Resize-to-fit h (keep aspect ratio) + 6 - Resize-to-fit w and h + + */ + + background-image: url('images/adler2.jpg'); + background-repeat: no-repeat; + background-position: center; + background-image-resize: 2; } -.base { - font-size: 0.8rem; - line-height: 1.5rem; - font-weight: normal; +/** POSITION FIXED */ +#deckblatt-gutachter { + position: absolute; + top: 12mm; + width: 185mm; } -.small { - font-size: 0.6rem; - line-height: 0.9rem; +#deckblatt-gutachten { + position: absolute; + top: 90mm; + width: 185mm; } +#deckblatt-festsetzung { + position: absolute; + text-align: right; + top: 130mm; + width: 185mm; +} + +#deckblatt-auftraggeber { + position: absolute; + text-align: right; + bottom: 20mm; + right: 15mm; + left: 15mm; +} + +#deckblatt-image { + width: 185mm; + height: 12mm; + background-size: contain; + background-repeat: no-repeat; + margin-bottom: 1mm; +} + +/** FORMATTING */ h1 { - font-size: 2rem; - line-height: 2.4rem; + font-size: 28px; + line-height: 30px; margin: 0; } h2 { - font-size: 1.7rem; - line-height: 2rem; + font-size: 18px; + line-height: 20px; margin: 0; } h3 { - font-size: 1.2rem; - line-height: 1.5rem; + font-size: 14px; + line-height: 16px; margin: 0; } +a { + color: black; + text-decoration: none; +} + +.bold { + font-weight: bold; +} + +.right { + text-align: right; +} + +.center { + text-align: center; +} + +/** FARBEN */ .gray { color: #4a5565; } @@ -49,14 +109,17 @@ h3 { background-color: #f3f4f6; } +.green { + color: green; +} + .red { color: red; } -.bold { - font-weight: bold; -} - +/** +LAYOUT +*/ p { margin: auto 0; } @@ -86,44 +149,9 @@ p { margin-top: 20mm; } -.green { - color: green; -} - -.header { - padding: 1.3mm 3mm; - margin: 2rem 0; - font-size: 1.2rem; - border: 0.3mm solid #e5e7eb; - background-color: #f3f4f6; -} - - - -.title { - position: absolute; - font-weight: bold; - font-size: 2.8rem; - top: 90mm; - width: 185mm; -} - -.festsetzung { - position: absolute; - font-weight: bold; - text-align: right; - font-size: 1.6rem; - top: 130mm; - width: 185mm; -} - -.auftraggeber { - position: absolute; - text-align: right; - bottom: 20mm; - right: 15mm; - left: 15mm; -} +/** + GUTACHTEN TABELLEN +*/ .table-striped tr:nth-child(2n-1) td { background-color: #f3f4f6; @@ -198,12 +226,4 @@ td { .br { border-right: 0.3mm solid #e5e7eb; -} - -.right { - text-align: right; -} - -.center { - text-align: center; } \ No newline at end of file diff --git a/test.html b/test.html index 57fdcd8..6f2e830 100644 --- a/test.html +++ b/test.html @@ -1,36 +1,230 @@ - - - - - -
- - - - - - - - - - - - - - - -
-

nutzwerte.at

-
Software für Architekten
-
+ + +
"<h1 style="text-align: end;"><img src="http://nutzwerte_fi4.test/storage/gutachter-logos/BlmRdvtNg6YnwfYoQawtqkcLQTXGljzH9lXCz4li.png" alt="Logo" data-id="gutachter-logos/BlmRdvtNg6YnwfYoQawtqkcLQTXGljzH9lXCz4li.png"></h1><h1 style="text-align: end;"><span data-color="#2b7fff" class="color" style="--color: #2b7fff; --dark-color: #2b7fff">Nikolic</span></h1><p style="text-align: end;">9170 Bad Leonfelden / Simone-Wittmann-Weg 3</p><p style="text-align: end;">UID: ATU68008336 . Firmenbuchnummer 23456</p><p style="text-align: end;">Telefon: +43 699 4727182 / Fax: +43 699 4727182-3</p><p style="text-align: end;"><a target="_blank" rel="noopener noreferrer nofollow" href="mailto:gpetrovic@gmx.at">gpetrovic@gmx.at</a></p>" // app/Actions/Generate/Gutachten/Deckblatt.php:20
+
+ \ No newline at end of file