Added image upload to ConstructionConsent Form

This commit is contained in:
Frank Schubert
2025-01-13 19:06:50 +01:00
parent 15bfe7c734
commit f2cfefc7a2
6 changed files with 83 additions and 5 deletions
@@ -7,6 +7,7 @@ class ConstructionConsent extends mfBaseModel {
private $adb_hausnummer;
private $adb_strasse;
private $owners;
private $file;
private $creator;
private $editor;
@@ -87,6 +88,15 @@ class ConstructionConsent extends mfBaseModel {
return $this->owners;
}
if($name == "file") {
if(!$this->id) return null;
$file = ConstructionConsentFile::getFirst(["constructionconsent_id" => $this->id]);
if($file) {
$this->file = $file;
}
return $this->file;
}
if($name == "creator") {
$this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);