Added pipework/linework comments to each page
This commit is contained in:
@@ -10,6 +10,7 @@ class Building extends mfBaseModel {
|
||||
private $status;
|
||||
private $pipeworker;
|
||||
private $terminations;
|
||||
private $termination_workflow_comments;
|
||||
private $workflowitems;
|
||||
private $files;
|
||||
private $pipework_enabler;
|
||||
@@ -223,6 +224,17 @@ class Building extends mfBaseModel {
|
||||
return $this->terminations;
|
||||
}
|
||||
|
||||
if($name == "termination_workflow_comments") {
|
||||
$comments = "";
|
||||
foreach($this->getProperty("terminations") as $term) {
|
||||
if($term->workflow_comment) {
|
||||
$comment .= $term->code.": ".trim($term->workflow_comment)."\n\n";
|
||||
}
|
||||
}
|
||||
$this->termination_workflow_comments = $comment;
|
||||
return $this->termination_workflow_comments;
|
||||
}
|
||||
|
||||
if($name == "workflowitems") {
|
||||
$this->loadWorkflowItems();
|
||||
foreach(WorkflowitemModel::search(["object_type" => "building", "active" => 1]) as $item) {
|
||||
|
||||
@@ -214,6 +214,13 @@ class LineworkController extends mfBaseController {
|
||||
$termination->save();
|
||||
}
|
||||
|
||||
if($termination->building->workflow_comment != $r->workflow_comment_building) {
|
||||
$termination->building->workflow_comment = $r->workflow_comment_building;
|
||||
$termination->building->workflow_comment_changed = date('U');
|
||||
$termination->building->workflow_comment_changed_by = $this->me->id;
|
||||
$termination->building->save();
|
||||
}
|
||||
|
||||
$items = [];
|
||||
|
||||
// get workflow values from request
|
||||
|
||||
Reference in New Issue
Block a user