This commit is contained in:
salam committed 2025-11-10 12:59:50 +01:00
1 parent ae6bb58972
commit 054654fb9c
18 files changed
+1325 -85

No files matched your search

+31 -25
View File
@@ -16,7 +16,6 @@ use App\Models\Auftraggeber;
use App\Models\Gutachter;
use App\Models\Projekte;
use App\Models\ProjektInhaltsverzeichnis;
use App\Models\ProjektPlatzhalter;
use Filament\Forms\Components\RichEditor\RichContentRenderer;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Response;
@@ -87,7 +86,7 @@ class Pdf
$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->where('part', $type)->orderBy('sort')->get();
$platzhalter = ProjektPlatzhalter::where('projekte_id', $projekte_id)->pluck('platzhaltertext', 'platzhalter')->toArray();
$platzhalter = Platzhalter::load($projekte_id);
foreach ($inhaltesverzeichnis as $inhalt) {
@@ -95,33 +94,41 @@ class Pdf
$mpdf->AddPage();
}
if ($inhalt->textblock) {
$textblock = Platzhalter::replace($platzhalter, $inhalt->textblock);
$textblock = Format::fix_str($textblock);
}
$html = '';
$html = Ueberschrift::load($inhalt);
if ($inhalt->textblock) {
$textblock = Platzhalter::replace($platzhalter, $inhalt->textblock);
$textblock = Format::fix_str($textblock);
if ($inhalt->inhaltselement_id != '9') {
$html .= $textblock;
}
}
if ($inhalt->textblock2) {
$textblock2 = Platzhalter::replace($platzhalter, $inhalt->textblock2);
$textblock2 = Format::fix_str($textblock2);
}
switch ($inhalt->inhaltselement_id) {
case '9':
$html .= Deckblatt::load($inhalt, $textblock);
$html .= Deckblatt::load($inhalt, $textblock, $textblock2);
break;
case '1':
$html .= Inhalt::load($projekte_id);
break;
// case '3':
// $html .= Paragraph6::load($projekte_id);
// break;
// case '4':
// $html .= Allgemeinflaechen::load($projekte_id);
// break;
// case '5':
// $html .= ZuUndAbschlaege::load($projekte_id);
// break;
// case '7':
// $html .= Zusammenstellung::load($projekte_id);
// break;
case '3':
$html .= Paragraph6::load($projekte_id);
break;
case '4':
$html .= Allgemeinflaechen::load($projekte_id);
break;
case '5':
$html .= ZuUndAbschlaege::load($projekte_id);
break;
case '7':
$html .= Zusammenstellung::load($projekte_id);
break;
case '8':
// AUFTRAGGEBER
$str = RichContentRenderer::make(self::$auftraggeber->referenz_formatting)->toHtml();
@@ -130,11 +137,10 @@ class Pdf
// case '11':
// $html .= DigitaleSignatur::load($projekte_id);
// break;
default:
if ($inhalt->textblock) {
$html .= $textblock;
}
break;
}
if ($inhalt->textblock2 and $inhalt->inhaltselement_id != 9) {
$html .= $textblock2;
}
if ($inhalt->seitenzahl_anzeige == 1) {