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

+4 -3
View File
@@ -2,17 +2,18 @@
namespace App\Actions\Generate\Gutachten;
use App\Actions\Generate\MakeGutachten;
use App\Actions\Generate\Utilities\Format;
use App\Actions\Generate\Utilities\Html;
use App\Models\ProjektInhaltsverzeichnis;
class Inhalt
{
public static function create()
public static function create($projekte_id)
{
$html = '<div class="header">INHALTSVERZEICHNIS</div>';
$html .= '<table class="inhalt">';
foreach (MakeGutachten::$inhaltesverzeichnis as $inhalt) {
$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->orderBy('sort')->get();
foreach ($inhaltesverzeichnis as $inhalt) {
if ($inhalt->ueberschrift_anzeigen) {
$html .= '<tr>';
$html .= Html::td(Format::index($inhalt->ordnungszahl));
@@ -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>';
@@ -2,12 +2,10 @@
namespace App\Actions\Generate\Gutachten;
use App\Actions\Generate\MakeGutachten;
class Platzhalter
{
public static function replace($standardtext)
public static function replace($platzhalter, $standardtext)
{
return str_replace(array_keys(MakeGutachten::$platzhalter), array_values(MakeGutachten::$platzhalter), $standardtext);
return str_replace(array_keys($platzhalter), array_values($platzhalter), $standardtext);
}
}