This commit is contained in:
salam committed 2025-11-04 04:24:30 +01:00
commit 2aff6e391c
58 files changed
+1244 -922

No files matched your search

@@ -17,12 +17,7 @@ class CreateProjektInhaltsverzeichnis
foreach ($inhaltsverzeichnis as $key => $value) {
$key++;
$textblock = '';
if ($value->textblock_id > 0) {
$textblock = Textblock::where('id', $value->textblock_id)->pluck('textblock')->first();
}
$text = Textblock::where('id', $value->textblock_id)->first();
$inhalt = new ProjektInhaltsverzeichnis;
$inhalt->projekte_id = $record->id;
$inhalt->sort = $key;
@@ -30,14 +25,15 @@ class CreateProjektInhaltsverzeichnis
$inhalt->name = $value->name;
$inhalt->name2 = $value->name2;
$inhalt->ueberschrift_anzeigen = $value->ueberschrift_anzeigen;
$inhalt->tabellen_id = $value->tabellen_id;
$inhalt->textblock_id = $value->textblock_id;
$inhalt->inhaltselement_id = $value->inhaltselement_id;
$inhalt->part = $value->part;
$inhalt->seite = $value->seite;
$inhalt->neue_seite = $value->neue_seite;
$inhalt->seitenzahl_anzeige = $value->seitenzahl_anzeige;
$inhalt->no_edit = $value->no_edit;
$inhalt->textblock = $textblock;
$inhalt->textblock_name = $text->name ?? '';
$inhalt->textblock = $text->textblock ?? '';
$inhalt->textblock2 = $text->textblock2 ?? '';
$inhalt->save();
}
+34 -32
View File
@@ -100,39 +100,41 @@ class Pdf
$textblock = Format::fix_str($textblock);
}
$html = Ueberschrift::create($inhalt);
$html = '';
// $html = Ueberschrift::load($inhalt);
if ($inhalt->name == 'DECKBLATT') {
$html .= Deckblatt::create($textblock);
} elseif ($inhalt->name == 'INHALTSVERZEICHNIS') {
$html .= Inhalt::create($projekte_id);
} else {
if ($inhalt->textblock) {
$html .= $textblock;
}
switch ($inhalt->tabellen_id) {
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':
$str = RichContentRenderer::make(self::$auftraggeber->referenz_formatting)->toHtml();
$html .= Format::fix_str($str);
break;
case '11':
$html .= DigitaleSignatur::load($projekte_id);
break;
}
switch ($inhalt->inhaltselement_id) {
case '9':
$html .= Deckblatt::load($inhalt, $textblock);
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 '8':
// $str = RichContentRenderer::make(self::$auftraggeber->referenz_formatting)->toHtml();
// $html .= Format::fix_str($str);
// break;
// case '11':
// $html .= DigitaleSignatur::load($projekte_id);
// break;
// default:
// $html = Ueberschrift::load($inhalt);
// if ($inhalt->textblock) {
// $html .= $textblock;
// }
// break;
}
if ($inhalt->seitenzahl_anzeige == 1) {
+8 -7
View File
@@ -8,7 +8,7 @@ use Filament\Forms\Components\RichEditor\RichContentRenderer;
class Deckblatt
{
public static function create($textblock)
public static function load($inhalt, $textblock)
{
// GUTACHTER
$html = '<div id="deckblatt-gutachter">';
@@ -22,15 +22,15 @@ class Deckblatt
$html .= '</div>';
// PROJEKT
$html .= '<div id="deckblatt-gutachten">';
$html .= '<h1 style="font-size:28px;">Gutachten</h1>';
$html .= '<div class="base ml-1">'.trim(Pdf::$projekt->interner_name).'</div>';
$html .= '<div id="deckblatt-projekt">';
$html .= '<h1>'.trim($inhalt->name).'</h1>';
$html .= '<p>'.trim(Pdf::$projekt->interner_name).'</p>';
$html .= '</div>';
$html .= '<div id="deckblatt-festsetzung">';
$html .= '<h2>ZUR FESTSETZUNG DER NUTZWERTE</h2>';
$html .= '<div class="base">'.trim(Pdf::$projekt->offizieller_name).'</div>';
$html .= '<div class="base">'.trim($textblock).'</div>';
$html .= '<h3>ZUR FESTSETZUNG DER NUTZWERTE</h3>';
$html .= '<p>'.trim(Pdf::$projekt->offizieller_name).'</p>';
$html .= '<p>'.trim($textblock).'</p>';
$html .= '</div>';
// AUFTRAGGEBER
@@ -38,6 +38,7 @@ class Deckblatt
if (Pdf::$auftraggeber->logo && Pdf::$auftraggeber->logo_anzeigen) {
$html .= '<div id="deckblatt-logo-auftraggeber" style="background-image: url(\''.public_path().'/storage/'.Pdf::$auftraggeber->logo.'\');"></div>';
}
if (Pdf::$auftraggeber->referenz_formatting && Pdf::$auftraggeber->text_anzeigen) {
$str = RichContentRenderer::make(Pdf::$auftraggeber->referenz_formatting)->toHtml();
$html .= Format::fix_str($str);
+1 -1
View File
@@ -8,7 +8,7 @@ use App\Models\ProjektInhaltsverzeichnis;
class Inhalt
{
public static function create($projekte_id)
public static function load($projekte_id)
{
$html = '<table class="inhalt">';
$inhalte = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->orderBy('sort')->get();
+1 -1
View File
@@ -6,7 +6,7 @@ use App\Actions\Generate\Utilities\Format;
class Ueberschrift
{
public static function create($inhalt)
public static function load($inhalt)
{
if ($inhalt->ueberschrift_anzeigen) {
if ($inhalt->ordnungszahl * 1 > 0) {