added faulty owner view

This commit is contained in:
Luca Haid
2025-05-20 13:44:55 +02:00
parent 90987baec0
commit 288727f465
9 changed files with 506 additions and 4 deletions
@@ -91,6 +91,7 @@ class ConstructionConsentOwnerController extends mfBaseController
$data["constructionconsent_id"] = $cc_id;
$data["title"] = $r->title;
$data["firstname"] = $r->firstname;
$data["company"] = $r->company;
$data["lastname"] = $r->lastname;
$data["street"] = $r->street;
$data["zip"] = $r->zip;
@@ -123,7 +124,7 @@ class ConstructionConsentOwnerController extends mfBaseController
} else {
$journal = ConstructionConsentJournal::create([
"constructionconsent_id" => $cc->id,
"text" => "Eigentümer " . $item->firstname . " " . $item->lastname . " wurde hinzugefügt"
"text" => "Eigentümer " . ($item->company ? $item->company : $item->firstname . " " . $item->lastname) . " wurde hinzugefügt"
]);
$journal->save();
@@ -151,7 +152,7 @@ class ConstructionConsentOwnerController extends mfBaseController
}
foreach($owner->files as $file) {
$file->file->delete();
if ($file->file) $file->file->delete();
$file->delete();
}