Added Document upload to ConstructionConsent Owners

This commit is contained in:
Frank Schubert
2025-01-15 17:14:49 +01:00
parent 2366dc0300
commit 905a2d0ede
8 changed files with 557 additions and 44 deletions
@@ -2,10 +2,24 @@
class ConstructionConsentOwner extends mfBaseModel {
private $consent;
private $files;
private $result_file;
public function getProperty($name) {
if($this->$name == null) {
if($name == "files") {
if(!$this->id) return null;
$files = ConstructionConsentOwnerFile::search(["constructionconsentowner_id" => $this->id]);
if(count($files)) {
foreach($files as $file) {
$this->files[$file->filename] = $file;
}
}
return $this->files;
}
if($name == "consent") {
$consent = new ConstructionConsent($this->constructionconsent_id);
if($consent->id) {