Added linwork_doku_delay
This commit is contained in:
@@ -77,17 +77,16 @@ class LineworkController extends mfBaseController {
|
||||
|
||||
$termination_search = [
|
||||
"network_id" => $my_network_ids,
|
||||
"workflow_finished" => 0
|
||||
"workflow_finished" => 0,
|
||||
"linework_doku_delay" => 0
|
||||
];
|
||||
|
||||
|
||||
if(is_array($filter) && count($filter)) {
|
||||
foreach($filter as $name => $value) {
|
||||
$termination_search[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($this->me->is("lineworker") && !$this->me->is(["Admin","pipeplanner", "lineplanner","netowner"])) {
|
||||
$this->log->debug("is lineworker");
|
||||
$termination_search["lineworker_id"] = ($this->me->address->parent_id) ? $this->me->address->parent_id : $this->me->address_id;
|
||||
@@ -196,6 +195,18 @@ class LineworkController extends mfBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
if($this->me->is(["Admin", "netowner"])) {
|
||||
if($r->linework_doku_delay == 1 && $termination->linework_doku_delay != 1) {
|
||||
$termination->linework_doku_delay = 1;
|
||||
$termination->save();
|
||||
}
|
||||
|
||||
if(!$r->linework_doku_delay && $termination->linework_doku_delay == 1) {
|
||||
$termination->linework_doku_delay = 0;
|
||||
$termination->save();
|
||||
}
|
||||
}
|
||||
|
||||
if($termination->workflow_comment != $r->workflow_comment) {
|
||||
$termination->workflow_comment = $r->workflow_comment;
|
||||
$termination->workflow_comment_changed = date('U');
|
||||
|
||||
Reference in New Issue
Block a user