ConstructionConsent Filter update

This commit is contained in:
Frank Schubert
2025-01-14 14:57:03 +01:00
parent fd88903963
commit ae7d565398
4 changed files with 58 additions and 20 deletions

View File

@@ -75,6 +75,13 @@ class ConstructionConsentController extends mfBaseController {
$items = ConstructionConsent::search($filter);
$this->layout->set("items", $items);
if(array_key_exists("project_id", $filter) && $filter["project_id"]) {
$project = new ConstructionConsentProject($filter["project_id"]);
if($project->id) {
$this->layout()->set("project", $project);
}
}
}
private function getPreparedFilter($filter) : array
@@ -87,6 +94,8 @@ class ConstructionConsentController extends mfBaseController {
}
}
return $new_filter;
}
@@ -110,6 +119,9 @@ class ConstructionConsentController extends mfBaseController {
protected function addAction() : void {
$this->layout()->setTemplate("ConstructionConsent/Form");
if($this->request->project_id) {
$this->layout()->set("project_id", $this->request->project_id);
}
}
protected function editAction() : void {