gutacher kopf farben
This commit is contained in:
1 parent
00cdc5b152
commit
a16cf05a8f
3 files changed
+61
-26
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Actions\Generate\Gutachten;
|
||||
|
||||
use App\Actions\Generate\MakeGutachten;
|
||||
use Filament\Forms\Components\RichEditor\RichContentRenderer;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class Deckblatt
|
||||
@@ -11,21 +12,18 @@ class Deckblatt
|
||||
{
|
||||
// dd(MakeGutachten::$gutachter->kopf);
|
||||
// GUTACHTER
|
||||
$html = '<div class="right">';
|
||||
|
||||
$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 '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>';
|
||||
$from = ['--', 'text-align: end;'];
|
||||
$to = ['', 'text-align: right;'];
|
||||
$html .= str_replace($from, $to, RichContentRenderer::make(MakeGutachten::$gutachter->address)->toHtml());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user