This commit is contained in:
salam committed 2025-10-31 15:25:16 +01:00
1 parent c64634b3a1
commit 523e395064
36 files changed
+431 -635

No files matched your search

@@ -0,0 +1,52 @@
<?php
namespace App\Actions\Generate\Tabellen;
use App\Actions\Generate\Utilities\Html;
use App\Models\ProjektAllgemeinflaechen;
class Allgemeinflaechen
{
public static function load($projekte_id)
{
$_allgemeine = ProjektAllgemeinflaechen::select('geschoss', 'raumart', 'flaeche')
->where('projekte_id', $projekte_id)
->orderBy('raumart')
->get()
->toArray();
$_data = array_chunk($_allgemeine, 2);
$html = '<table class="table-striped bl bt">';
$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');
$html .= '<td style="background:white"></td>';
$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) { //
$html .= '<tr>';
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]['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]['flaeche'].' m&sup2;', 'bl bb br right');
}
$html .= '</tr>';
}
$html .= '</table>';
return $html;
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Actions\Generate\Tabellen;
use App\Actions\Generate\Utilities\Html;
use App\Models\ProjektObjekte;
class Paragraph6
{
public static function load($projekte_id)
{
$data = ProjektObjekte::with('orientierung')
->with('projektobjekteimdetail')
->where('projekte_id', $projekte_id)
->orderBy('nicht_in_orientierung')
->orderBy('top_nummer')
->get();
$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) {
$html .= '<tr>';
$html .= Html::td($value->top_nummer, 'center br bb');
$html .= Html::td($value->projektobjekteimdetail?->geschoss, 'center br bb');
$html .= Html::td($value->orientierung?->name, 'center br bb');
$html .= Html::td($value->type, 'center br bb');
$html .= '</tr>';
}
$html .= '</table>';
return $html;
}
}