changes linework to openable list

This commit is contained in:
Frank Schubert
2022-02-15 20:41:59 +01:00
parent a7ed80f6b9
commit 9f908e56db
17 changed files with 729 additions and 11 deletions

View File

@@ -79,9 +79,46 @@ class Building extends mfBaseModel {
return $code;
}
public function getWorkflowvalue($itemname, $type = "string") {
public function getWorkflowvalue($itemname, $type = false) {
$item = WorkflowitemModel::getFirst(['name' => $itemname]);
if(!$item->id) {
return null;
}
switch($item->type) {
case "string":
$value_type = "string";
break;
case "enum":
$value_type = "string";
break;
case "gps":
$value_type = "string";
break;
case "color":
$value_type = "string";
break;
case "date":
$value_type = "string";
break;
case "int":
$value_type = "int";
break;
case "bool":
$value_type = "int";
break;
case "file":
$value_type = "int";
break;
case "text":
$value_type = "text";
break;
default:
$value_type = "string";
}
if(array_key_exists($itemname, $this->getProperty("workflowitems"))) {
return $this->getProperty("workflowitems")[$itemname]->value->{"value_$type"};
return $this->getProperty("workflowitems")[$itemname]->value->{"value_$value_type"};
}
return null;