Added pipe-/linework enabled date and by
This commit is contained in:
@@ -181,6 +181,13 @@
|
|||||||
>
|
>
|
||||||
Baufreigabe
|
Baufreigabe
|
||||||
</label>
|
</label>
|
||||||
|
<?php if($term->linework_enabled): ?>
|
||||||
|
<div style="overflow-x:hidden">
|
||||||
|
<small class="text-info text-mono"
|
||||||
|
title="Geändert: <?=date("d.m.Y H:i",$term->linework_enabled_date)?> von <?=$term->linework_enabler->name?> (<?=$term->linework_enabler->address->getCompanyOrName(true)?>)"
|
||||||
|
><?=$term->linework_enabler->getAbbrName()?></small>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<button type="button" class="btn btn-primary" form="wf-termination-<?=$term->id?>" onclick="validateAndSubmit(<?=$term->id?>)">Speichern</button>
|
<button type="button" class="btn btn-primary" form="wf-termination-<?=$term->id?>" onclick="validateAndSubmit(<?=$term->id?>)">Speichern</button>
|
||||||
|
|||||||
@@ -156,6 +156,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<label <?=(!$building->pipeworker_id) ? "class='text-danger' title='Keine Tiefbaufirma ausgewählt'" : ""?>><input type="checkbox" form="wf-building-<?=$building->id?>" name="pipework_enabled" value="1" <?=($building->pipework_enabled==1) ? "checked='checked'" : ""?> <?=(!$building->pipeworker_id || !$me->is(["Admin", "pipeplanner"])) ? "disabled='disabled'" : ""?>> Baufreigabe</label>
|
<label <?=(!$building->pipeworker_id) ? "class='text-danger' title='Keine Tiefbaufirma ausgewählt'" : ""?>><input type="checkbox" form="wf-building-<?=$building->id?>" name="pipework_enabled" value="1" <?=($building->pipework_enabled==1) ? "checked='checked'" : ""?> <?=(!$building->pipeworker_id || !$me->is(["Admin", "pipeplanner"])) ? "disabled='disabled'" : ""?>> Baufreigabe</label>
|
||||||
|
<?php if($building->pipework_enabled): ?>
|
||||||
|
<div style="overflow-x:hidden">
|
||||||
|
<small class="text-info text-mono"
|
||||||
|
title="Geändert: <?=date("d.m.Y H:i",$building->pipework_enabled_date)?> von <?=$building->pipework_enabler->name?> (<?=$building->pipework_enabler->address->getCompanyOrName(true)?>)"
|
||||||
|
><?=$building->pipework_enabler->getAbbrName()?></small>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<button type="button" class="btn btn-primary" form="wf-building-<?=$building->id?>" onclick="document.getElementById(this.getAttribute('form')).submit()">Speichern</button>
|
<button type="button" class="btn btn-primary" form="wf-building-<?=$building->id?>" onclick="document.getElementById(this.getAttribute('form')).submit()">Speichern</button>
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class AddressController extends mfBaseController {
|
|||||||
if($r->billing_type == "sepa") {
|
if($r->billing_type == "sepa") {
|
||||||
foreach(['owner', 'iban', 'bic'] as $required) {
|
foreach(['owner', 'iban', 'bic'] as $required) {
|
||||||
if(!$r->{"bank_account_$required"}) {
|
if(!$r->{"bank_account_$required"}) {
|
||||||
$this->layout()->setFlash("Bitte Bankdaten für SEPA ausfüllen.");
|
$this->layout()->setFlash("Bitte Bankdaten für SEPA ausfüllen.", "warn");
|
||||||
$this->layout()->set("address", $r);
|
$this->layout()->set("address", $r);
|
||||||
return $this->add();
|
return $this->add();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class Building extends mfBaseModel {
|
|||||||
private $terminations;
|
private $terminations;
|
||||||
private $workflowitems;
|
private $workflowitems;
|
||||||
private $files;
|
private $files;
|
||||||
|
private $pipework_enabler;
|
||||||
|
|
||||||
public function getAddress($singelLine = false) {
|
public function getAddress($singelLine = false) {
|
||||||
if(!$this->id) {
|
if(!$this->id) {
|
||||||
@@ -161,6 +162,11 @@ class Building extends mfBaseModel {
|
|||||||
return $this->files;
|
return $this->files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($name == "pipework_enabler") {
|
||||||
|
$this->pipework_enabler = new User($this->pipework_enabled_by);
|
||||||
|
return $this->pipework_enabler;
|
||||||
|
}
|
||||||
|
|
||||||
$classname = ucfirst($name);
|
$classname = ucfirst($name);
|
||||||
$idfield = $name."_id";
|
$idfield = $name."_id";
|
||||||
$this->$name = new $classname($this->$idfield);
|
$this->$name = new $classname($this->$idfield);
|
||||||
|
|||||||
@@ -172,18 +172,24 @@ class LineworkController extends mfBaseController {
|
|||||||
//var_dump($r->get());exit;
|
//var_dump($r->get());exit;
|
||||||
|
|
||||||
if($this->me->is(["Admin", "netowner","pipeplanner", "lineplanner"])) {
|
if($this->me->is(["Admin", "netowner","pipeplanner", "lineplanner"])) {
|
||||||
if($r->linework_enabled == 1) {
|
if($r->linework_enabled == 1 && $termination->linework_enabled != 1) {
|
||||||
$termination->linework_enabled = 1;
|
$termination->linework_enabled = 1;
|
||||||
|
$termination->linework_enabled_date = date('U');
|
||||||
|
$termination->linework_enabled_by = $this->me->id;
|
||||||
if($termination->status_id < 3) {
|
if($termination->status_id < 3) {
|
||||||
$termination->status_id = 3;
|
$termination->status_id = 3;
|
||||||
}
|
}
|
||||||
} else {
|
$termination->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($r->linework_enabled != 1 && $termination->linework_enabled == 1) {
|
||||||
$termination->linework_enabled = 0;
|
$termination->linework_enabled = 0;
|
||||||
|
$termination->linework_enabled_date = 0;
|
||||||
if($termination->status_id == 3) {
|
if($termination->status_id == 3) {
|
||||||
$termination->status_id = 1;
|
$termination->status_id = 1;
|
||||||
}
|
}
|
||||||
|
$termination->save();
|
||||||
}
|
}
|
||||||
$termination->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($termination->workflow_comment != $r->workflow_comment) {
|
if($termination->workflow_comment != $r->workflow_comment) {
|
||||||
|
|||||||
@@ -167,15 +167,22 @@ class PipeworkController extends mfBaseController {
|
|||||||
//var_dump($r->get());exit;
|
//var_dump($r->get());exit;
|
||||||
|
|
||||||
if($this->me->is(["Admin", "netowner", "pipeplanner"])) {
|
if($this->me->is(["Admin", "netowner", "pipeplanner"])) {
|
||||||
if($r->pipework_enabled == 1) {
|
if($r->pipework_enabled == 1 && $building->pipework_enabled != 1) {
|
||||||
$building->pipework_enabled = 1;
|
$building->pipework_enabled = 1;
|
||||||
|
$building->pipework_enabled_date = date('U');
|
||||||
|
$building->pipework_enabled_by = $this->me->id;
|
||||||
if($building->status_id < 3) {
|
if($building->status_id < 3) {
|
||||||
$building->status_id = 3;
|
$building->status_id = 3;
|
||||||
}
|
}
|
||||||
} else {
|
$building->save();
|
||||||
$building->pipework_enabled = 0;
|
|
||||||
}
|
}
|
||||||
$building->save();
|
|
||||||
|
if($r->pipework_enabled != 1 && $building->pipework_enabled == 1) {
|
||||||
|
$building->pipework_enabled = 0;
|
||||||
|
$building->pipework_enabled_date = 0;
|
||||||
|
$building->save();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($building->workflow_comment != $r->workflow_comment) {
|
if($building->workflow_comment != $r->workflow_comment) {
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ class Termination extends mfBaseModel {
|
|||||||
private $cpeprovisioning;
|
private $cpeprovisioning;
|
||||||
private $files;
|
private $files;
|
||||||
private $patching;
|
private $patching;
|
||||||
|
private $linework_enabler;
|
||||||
private $creator;
|
private $creator;
|
||||||
private $editor;
|
private $editor;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getAddress($singelLine = false) {
|
public function getAddress($singelLine = false) {
|
||||||
if(!$this->id) {
|
if(!$this->id) {
|
||||||
return false;
|
return false;
|
||||||
@@ -195,6 +197,21 @@ class Termination extends mfBaseModel {
|
|||||||
return $this->cpeprovisioning;
|
return $this->cpeprovisioning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($name == "linework_enabler") {
|
||||||
|
$this->linework_enabler = new User($this->linework_enabled_by);
|
||||||
|
return $this->linework_enabler;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($name == "creator") {
|
||||||
|
$this->creator = new User($this->create_by);
|
||||||
|
return $this->creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($name == "editor") {
|
||||||
|
$this->editor = new User($this->edit_by);
|
||||||
|
return $this->editor;
|
||||||
|
}
|
||||||
|
|
||||||
$classname = ucfirst($name);
|
$classname = ucfirst($name);
|
||||||
$idfield = $name."_id";
|
$idfield = $name."_id";
|
||||||
$this->$name = new $classname($this->$idfield);
|
$this->$name = new $classname($this->$idfield);
|
||||||
|
|||||||
Reference in New Issue
Block a user