Merge branch 'ConstructionConsent/add-journal-entry-on-create' into 'master'
ConstructionConsent - adding journal entry on create owner or import owner create See merge request fronk/thetool!1370
This commit is contained in:
@@ -1137,6 +1137,12 @@ class ConstructionConsentController extends mfBaseController {
|
||||
|
||||
$ownerRecord->save();
|
||||
|
||||
$journal = ConstructionConsentJournal::create([
|
||||
"constructionconsent_id" => $consentRecord->id,
|
||||
"text" => "Import: Eigentümer $firstname $lastname wurde hinzugefügt"
|
||||
]);
|
||||
$journal->save();
|
||||
|
||||
$counts[$isNew ? "created" : "updated"]++;
|
||||
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user