From 6dc7fc58fc6d3e91399b5e41b59ef16752c43dcb Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Wed, 12 Mar 2025 14:01:55 +0000 Subject: [PATCH] Construction consent/fix event --- Layout/default/ConstructionConsent/Form.php | 24 +++++++++---------- Layout/default/ConstructionConsent/Index.php | 5 ++++ .../ConstructionConsent.php | 7 ++++++ public/index.php | 8 +++++++ 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Layout/default/ConstructionConsent/Form.php b/Layout/default/ConstructionConsent/Form.php index 9557c6c3d..2b8bfbd80 100644 --- a/Layout/default/ConstructionConsent/Form.php +++ b/Layout/default/ConstructionConsent/Form.php @@ -392,8 +392,8 @@ } - $("#kg").change(updateGstnr); - $("#gst").change(updateGstnr); + $("#kg").on("input", updateGstnr); + $("#gst").on("input", updateGstnr); async function updateGstnr() { let kg = $("#kg").val(); @@ -404,18 +404,16 @@ $("#gstnr").val(kg + gst); // update EZ - if($("#object_type").val() == "building") { - $("#ez").prop("readonly", true); - var response = await fetch(' "getEz"])?>&kg=' + kg + '&gst=' + gst); - if (!response.ok) { - return false; - } - var resp_json = await response.json(); - if (resp_json.status == "OK" && resp_json.result.ez) { - $("#ez").val(resp_json.result.ez); - } - $("#ez").prop("readonly", false); + $("#ez").prop("readonly", true); + var response = await fetch(' "getEz"])?>&kg=' + kg + '&gst=' + gst); + if (!response.ok) { + return false; } + var resp_json = await response.json(); + if (resp_json.status == "OK" && resp_json.result.ez) { + $("#ez").val(resp_json.result.ez); + } + $("#ez").prop("readonly", false); } $(window).bind("paste", (e) => { diff --git a/Layout/default/ConstructionConsent/Index.php b/Layout/default/ConstructionConsent/Index.php index 4f04678b9..d25ea17d5 100644 --- a/Layout/default/ConstructionConsent/Index.php +++ b/Layout/default/ConstructionConsent/Index.php @@ -135,6 +135,11 @@ $pagination_entity_name = "Zustimmungserklärungen"; " /> +
+ + " /> +
+ diff --git a/application/ConstructionConsent/ConstructionConsent.php b/application/ConstructionConsent/ConstructionConsent.php index d7b8ec4c1..5d72ae242 100644 --- a/application/ConstructionConsent/ConstructionConsent.php +++ b/application/ConstructionConsent/ConstructionConsent.php @@ -580,6 +580,13 @@ class ConstructionConsent extends mfBaseModel { } } + if (array_key_exists("cwo", $filter)) { + $where .= " AND EXISTS + (SELECT 1 FROM ConstructionConsentOwner co WHERE co.constructionconsent_id = ConstructionConsent.id AND + (co.firstname LIKE '%".$filter['cwo']."%' OR co.lastname LIKE '%".$filter['cwo']."%'))"; + } + + if(array_key_exists("add-where", $filter)) { diff --git a/public/index.php b/public/index.php index 3b2a245c5..7b70b5e4a 100755 --- a/public/index.php +++ b/public/index.php @@ -5,6 +5,14 @@ // phpinfo(); exit; define('mfUI',"web"); +// set max memory to 4GB +ini_set('memory_limit', '4096M'); + +//display errors +ini_set('display_errors', 1); +ini_set('display_startup_errors', 1); +ini_set('error_reporting', E_ALL); + if(file_exists("../config/config.php")) { require("../config/config.php"); } else {