This commit is contained in:
salam committed 2025-10-14 18:41:34 +02:00
1 parent d827231e92
commit 570ea29952
22 files changed
+260 -209

No files matched your search

+18 -17
View File
@@ -9,25 +9,26 @@ class Deckblatt
{
public static function create()
{
dd(MakeGutachten::$gutachter);
// dd(MakeGutachten::$gutachter->kopf);
// GUTACHTER
switch (MakeGutachten::$gutachter['kopf']) {
case 'logo':
$filepath = Storage::disk('public')->path("/download/$projekts_id/gutachter-logo/");
->directory('gutachter-logo')
break;
case 'firma':
break;
case 'gutachter':
break;
}
$html = '<div class="right">';
$html .= '<p class="big">'.MakeGutachten::$gutachter->company.'</p>';
$html .= '<p class="gray small">'.nl2br(MakeGutachten::$gutachter->address).'</p>';
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 'firma':
$html .= '<p class="big">'.MakeGutachten::$gutachter->company.'</p>';
break;
case 'adresse':
$html .= '<p class="gray small">'.nl2br(MakeGutachten::$gutachter->address).'</p>';
break;
case 'name':
$html .= '<p class="gray bold py-1">'.MakeGutachten::$gutachter->title.' '.MakeGutachten::$gutachter->gender.' '.MakeGutachten::$gutachter->name.'</p>';
break;
}
}
$html .= '</div>';
// if (MakeGutachten::$gutachter->kopf == 'adressenblock') {
+2 -2
View File
@@ -29,9 +29,9 @@ class MakeGutachten
public static function generate($filepath, $projekts_id)
{
self::$projekt = Projekte::where('id', $projekts_id)->get()->first();
self::$projekt = Projekte::where('id', $projekts_id)->first();
self::$gutachter = Gutachter::where('id', self::$projekt->gutachter_id)->get()->first();
self::$gutachter = Gutachter::where('id', self::$projekt->gutachter_id)->first();
self::$auftraggeber = Auftraggeber::where('id', self::$projekt->auftraggeber_id)->get()->first();
@@ -71,7 +71,9 @@ class GutachterForm
'4:3',
'1:1',
])
->disk('public')
->directory('gutachter-logo')
->visibility('public')
->label('Logo'),
]),
Tab::make('Anzeige Im Gutachten')
@@ -81,8 +83,9 @@ class GutachterForm
CheckboxList::make('kopf')
->Label('Bitte auswählen')
->options([
'logo' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" fill="currentColor" viewBox="0 0 256 256"><path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"></path></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> Firma mit Adresse</div>',
'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()
@@ -13,8 +13,8 @@ class GutachtersTable
{
return $table
->columns([
ImageColumn::make('logo'),
TextColumn::make('company')->label('Firma')->searchable(),
ImageColumn::make('logo')->disk('public'),
TextColumn::make('company')->label('Firmenmame')->searchable(),
// TextColumn::make('gender')->label('Geschlecht'),
// TextColumn::make('title')->label('Title'),
// TextColumn::make('name')->searchable(),