wip Nutzwerte pdf

This commit is contained in:
salam committed 2025-10-23 12:07:56 +02:00
1 parent 4ad27d8c19
commit 2296b708eb
31 files changed
+528 -1656

No files matched your search

@@ -2,19 +2,24 @@
namespace App\Actions\Generate\Gutachten;
use App\Actions\Generate\Utilities\Html;
use App\Models\Allgemeinflaechen;
use App\Utilities\Html;
class AllgemeinTabelle
{
public static function load($projekts_id)
public static function load($projekte_id)
{
$_allgemeine = Allgemeinflaechen::select('geschoss', 'raumart', 'qm')->where('projekts_id', $projekts_id)->get()->toArray();
$_allgemeine = Allgemeinflaechen::select('geschoss', 'raumart', 'flaeche')
->where('projekte_id', $projekte_id)
->orderBy('raumart')
->get()
->toArray();
$_data = array_chunk($_allgemeine, 2);
$html = '<table class="table-striped m10">';
$html = '<table class="table-striped">';
$html .= '<tr>';
$html .= '<thead>';
$html .= Html::td('Geschoß', 'head bl bt wp10');
$html .= Html::td('Typ', 'head bl bt wp25');
$html .= Html::td('Fläche', 'head bl bt br wp10');
@@ -22,6 +27,7 @@ class AllgemeinTabelle
$html .= Html::td('Geschoß', 'head bl bt wp10');
$html .= Html::td('Typ', 'head bl bt wp25');
$html .= Html::td('Fläche', 'head bl bt br wp10');
$html .= '</thead>';
$html .= '</tr>';
foreach ($_data as $value) { //
@@ -29,13 +35,13 @@ class AllgemeinTabelle
if (isset($value[0])) {
$html .= Html::td($value[0]['geschoss'], 'bl bb');
$html .= Html::td($value[0]['raumart'], 'bl bb');
$html .= Html::td($value[0]['qm'], 'bl bb br');
$html .= Html::td($value[0]['flaeche'].' m&sup2;', 'bl bb br right');
$html .= '<td style="background:white"></td>';
}
if (isset($value[1])) {
$html .= Html::td($value[1]['geschoss'], 'bl bb');
$html .= Html::td($value[1]['raumart'], 'bl bb');
$html .= Html::td($value[1]['qm'], 'bl bb br');
$html .= Html::td($value[1]['flaeche'].' m&sup2;', 'bl bb br right');
}
$html .= '</tr>';
}
+2 -2
View File
@@ -12,8 +12,8 @@ class Inhalt
{
$html = '<div class="header">INHALTSVERZEICHNIS</div>';
$html .= '<table class="inhalt">';
$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->orderBy('sort')->get();
foreach ($inhaltesverzeichnis as $inhalt) {
$inhalte = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->orderBy('sort')->get();
foreach ($inhalte as $inhalt) {
if ($inhalt->ueberschrift_anzeigen) {
$html .= '<tr>';
$html .= Html::td(Format::index($inhalt->ordnungszahl));
@@ -9,37 +9,30 @@ class Paragraph6Tabelle
{
public static function load($projekte_id)
{
// $data = DB::table('raumorientierung')
// ->join('raumalles', 'raumorientierung.id', '=', 'raumalles.raumorientierung_id')
// ->join('orientierungs', 'raumorientierung.orientierungs_id', '=', 'orientierungs.id')
// ->select('raumorientierung.top_nr', 'raumorientierung.type', 'raumalles.geschoss', 'orientierungs.name')
// ->where('raumorientierung.projekts_id', $projekts_id)
// ->whereIn('raumalles.methodes_id', [1, 5, 6, 9])
// ->groupBy('raumorientierung.id')
// ->orderBy('raumalles.methodes_id', 'ASC')
// ->orderBy('raumorientierung.top_nr', 'ASC')
// ->get();
$data = OrientierungZuAbschlaege::with('orientierung')->where('projekte_id', $projekte_id)->get();
$data = OrientierungZuAbschlaege::with('orientierung')
->where('projekte_id', $projekte_id)
->orderBy('nicht_in_orientierung')
->orderBy('top_nummer')
->get();
$html = '<table class="table-striped bl bt m20">';
$html = '<table class="table-striped bl bt">';
$html .= '<tr>';
$html .= '<thead>';
$html .= Html::td('Top', 'head center br bb');
$html .= Html::td('Geschoß', 'head center br bb');
$html .= Html::td('Orientierung', 'head center br bb');
$html .= Html::td('Typ', 'head center br bb');
$html .= '</thead>';
$html .= '</tr>';
foreach ($data as $value) {
// dd($value);
$objekt = Raeumealle::where('projekte_id', $projekte_id)->where('top_nummer', $value->top_nummer)->pluck('geschoss', 'type');
$html .= '<tr>';
$html .= Html::td($value->top_nummer, 'center br bb');
$html .= Html::td($value->geschoss, 'center br bb');
$html .= Html::td($value->orientierung->name, 'center br bb');
// $html .= Html::td($value->type, 'center br bb');
$html .= Html::td($value->orientierung->name ?? '', 'center br bb');
$html .= Html::td($value->type, 'center br bb');
$html .= '</tr>';
}
$html .= '</table>';
@@ -1,39 +0,0 @@
<?php
namespace App\Actions\Generate\Gutachten;
use App\Utilities\Html;
class Tabelle
{
public static function load($standardtext)
{
$standardtext = strip_tags($standardtext, '<br>');
$standardtext = str_replace('<br>', '§§', $standardtext);
$standardtext = str_replace('<br/>', '§§', $standardtext);
$standardtext = str_replace('<br />', '§§', $standardtext);
$arr = explode('§§', $standardtext);
$html = '<table class="table-striped bl bt m10">';
foreach ($arr as $value) {
$tmp = explode('|', $value);
$tmp[0] = $tmp[0] ?? '';
$tmp[1] = $tmp[1] ?? '';
$html .= '<tr>';
$html .= Html::td($tmp[0], 'br bb');
$html .= Html::td($tmp[1], 'br bb');
$html .= '</tr>';
}
$html .= '</table>';
return $html;
}
}