showing construction company in Pipe- and Linework

This commit is contained in:
Frank Schubert
2025-04-22 17:11:20 +02:00
parent d054cee094
commit 72a4353b3b
3 changed files with 30 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ class Building extends mfBaseModel {
private $type;
private $status;
private $pipeworker;
private $lineworker;
private $terminations;
private $termination_workflow_comments;
private $workflowitems;
@@ -56,6 +57,7 @@ class Building extends mfBaseModel {
$this->type = null;
$this->status = null;
$this->pipeworker = null;
$this->lineworker = null;
$this->terminations = null;
$this->workflowitems = null;
$this->files = null;
@@ -292,6 +294,17 @@ class Building extends mfBaseModel {
//$this->pipeworker = new Address($this->pipeworker_id);
return $this->pipeworker;
}
if($name == "lineworker") {
$lineworker = mfValuecache::singleton()->get("mfObjectmodel-Address-".$this->lineworker_id);
if(!$lineworker) {
$lineworker = new Address($this->lineworker_id);
mfValuecache::singleton()->set("mfObjectmodel-Address-".$this->lineworker_id, $lineworker);
}
$this->lineworker = $lineworker;
//$this->lineworker = new Address($this->lineworker_id);
return $this->lineworker;
}
if($name == "terminations") {
$this->terminations = TerminationModel::search(['building_id' => $this->id]);