nutzwert in tabelle rauemall und orientierung

This commit is contained in:
salam committed 2025-10-22 19:16:10 +02:00
1 parent fe03a71735
commit 5583bed563
24 files changed
+726 -526

No files matched your search

@@ -2,23 +2,25 @@
namespace App\Actions\Generate\Gutachten;
use App\Utilities\Html;
use Illuminate\Support\Facades\DB;
use App\Actions\Generate\Utilities\Html;
use App\Models\OrientierungZuAbschlaege;
class Paragraph6Tabelle
{
public static function load($projekts_id)
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 = 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();
$html = '<table class="table-striped bl bt m20">';
@@ -29,12 +31,15 @@ class Paragraph6Tabelle
$html .= Html::td('Typ', 'head center br bb');
$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_nr, 'center br bb');
$html .= Html::td($value->top_nummer, 'center br bb');
$html .= Html::td($value->geschoss, 'center br bb');
$html .= Html::td(($value->name == 'Ohne Zuordnung') ? '' : $value->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>';