ConstructionConsent - adding journal entry on create owner or import owner create

This commit is contained in:
Luca Haid
2025-05-20 10:51:45 +02:00
parent c9970fcb38
commit 11baca9413
2 changed files with 12 additions and 0 deletions

View File

@@ -121,6 +121,12 @@ class ConstructionConsentOwnerController extends mfBaseController
if(!$item->save()) {
$this->layout()->setFlash("Beim Speichern ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.", "error");
} else {
$journal = ConstructionConsentJournal::create([
"constructionconsent_id" => $cc->id,
"text" => "Eigentümer " . $item->firstname . " " . $item->lastname . " wurde hinzugefügt"
]);
$journal->save();
$this->layout()->setFlash("Besitzer wurde erfolgreich gespeichert.", "success");
}