dowload wip

This commit is contained in:
salam committed 2025-10-13 07:35:09 +02:00
1 parent b004542988
commit 8971b8b948
41 files changed
+2103 -243

No files matched your search

@@ -0,0 +1,46 @@
<?php
namespace App\Actions\Generate\StandardTexte;
use App\Models\Allgemeinflaechen;
use App\Utilities\Html;
class AllgemeinTabelle
{
public static function load($projekts_id)
{
$_allgemeine = Allgemeinflaechen::select('geschoss', 'raumart', 'qm')->where('projekts_id', $projekts_id)->get()->toArray();
$_data = array_chunk($_allgemeine, 2);
$html = '<table class="table-striped m10">';
$html .= '<tr>';
$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 .= '</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]['qm'], 'bl bb br');
$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 .= '</tr>';
}
$html .= '</table>';
return $html;
}
}