dowload gutachten design background adler
This commit is contained in:
1 parent
0342b3eaeb
commit
623131bdb0
17 files changed
+464
-265
No files matched your search
@@ -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 = '<div class="base">';
|
||||
foreach (MakeGutachten::$gutachter->kopf as $component) {
|
||||
switch ($component) {
|
||||
case 'logo':
|
||||
$imgUrl = Storage::disk('public')->url(MakeGutachten::$gutachter->logo);
|
||||
$html .= '<img src="'.$imgUrl.'" width="45%">';
|
||||
break;
|
||||
case 'adresse':
|
||||
$from = ['--', 'text-align: end;'];
|
||||
$to = ['', 'text-align: right;'];
|
||||
$html .= str_replace($from, $to, RichContentRenderer::make(MakeGutachten::$gutachter->address)->toHtml());
|
||||
break;
|
||||
}
|
||||
$html = '<div class="adler"></div>';
|
||||
$html .= '<div id="deckblatt-gutachter">';
|
||||
if (MakeGutachten::$gutachter->logo) {
|
||||
$html = '<div id="deckblatt-image" style="background-position: center '.MakeGutachten::$gutachter->logo_align.'; background-image: url(\''.public_path().'/storage/'.MakeGutachten::$gutachter->logo.'\');"></div>';
|
||||
}
|
||||
$from = ['--', 'text-align: end;'];
|
||||
$to = ['', 'text-align: right;'];
|
||||
$str = RichContentRenderer::make(MakeGutachten::$gutachter->gutachten_layout)->toHtml();
|
||||
$html .= str_replace($from, $to, $str);
|
||||
$html .= '</div>';
|
||||
|
||||
// if (MakeGutachten::$gutachter->kopf == 'adressenblock') {
|
||||
// $html .= '<div class="right">'.MakeGutachten::$gutachter->adressenblock.'</div>';
|
||||
// } elseif (MakeGutachten::$gutachter->kopf == 'logo') {
|
||||
// $html .= '<div class="right">';
|
||||
// $html .= '<img src="'.public_path().'/storage/'.MakeGutachten::$gutachter->clientlogo.'" style="width:'.MakeGutachten::$gutachter->breite.'mm; height: auto;">';
|
||||
// $html .= '</div>';
|
||||
// }
|
||||
// $html .= '</div>';
|
||||
|
||||
$html .= '<div class="title">Gutachten';
|
||||
$html .= '<div class="base ml-1 mt-2">'.trim(MakeGutachten::$projekt->interner_name).'</div>';
|
||||
$html .= '<div id="deckblatt-gutachten">';
|
||||
$html .= '<h1>Gutachten</h1>';
|
||||
$html .= '<div class="base bold ml-1">'.trim(MakeGutachten::$projekt->interner_name).'</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div class="festsetzung">Zur Festsetzung der Nutzwerte';
|
||||
$html .= '<div class="base">'.trim(MakeGutachten::$projekt->offizieller_name).'</div>';
|
||||
$html .= '<div id="deckblatt-festsetzung">';
|
||||
$html .= '<h2>Zur Festsetzung der Nutzwerte';
|
||||
$html .= '<div class="base bold">'.trim(MakeGutachten::$projekt->offizieller_name).'</div>';
|
||||
$html .= '</h2>';
|
||||
$html .= '</div>';
|
||||
|
||||
// // AUFTRAGGEBER
|
||||
// $html .= '<div class="auftraggeber">';
|
||||
// $html .= '<div id="deckblatt-auftraggeber"><h3>';
|
||||
// $html .= MakeGutachten::$auftraggeber->adressenblock;
|
||||
// $html .= '</h3></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -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' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image-icon lucide-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>Logo</div>',
|
||||
'firma' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-stamp-icon lucide-stamp"><path d="M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-6 0c0 2 1 2 1 3.5V13"/><path d="M20 15.5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1z"/><path d="M5 22h14"/></svg>Firmename</div>',
|
||||
'adresse' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-text-icon lucide-notebook-text"><path d="M2 6h4"/><path d="M2 10h4"/><path d="M2 14h4"/><path d="M2 18h4"/><rect width="16" height="20" x="4" y="2" rx="2"/><path d="M9.5 8h5"/><path d="M9.5 12H16"/><path d="M9.5 16H14"/></svg>Adresse</div>',
|
||||
'name' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-contact-icon lucide-contact"><path d="M16 2v2"/><path d="M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2"/><path d="M8 2v2"/><circle cx="12" cy="11" r="3"/><rect x="3" y="4" width="18" height="18" rx="2"/></svg>Gutachter</div>',
|
||||
])
|
||||
->allowHtml()
|
||||
->columnSpanFull(),
|
||||
]),
|
||||
'left' => 'Links',
|
||||
'center' => 'Zentriert',
|
||||
'right' => 'Rechts',
|
||||
]),
|
||||
])->columns(2),
|
||||
])->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user