From 246e6551b9e11a3970aed82feb01ee7e54f5c5ff Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Thu, 17 Jul 2025 13:57:20 +0200 Subject: [PATCH] fixed import bugs and filter --- Layout/default/ConstructionConsent/View.php | 5 +++++ application/ConstructionConsent/ConstructionConsent.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Layout/default/ConstructionConsent/View.php b/Layout/default/ConstructionConsent/View.php index 82a48fe79..28086a510 100644 --- a/Layout/default/ConstructionConsent/View.php +++ b/Layout/default/ConstructionConsent/View.php @@ -1348,6 +1348,11 @@ $pagination_entity_name = "Adressen"; background-color: #337ab7; /* Blue */ } + .ConstructionConsentOwnerResult-new { + /*red background color here for this tr*/ + background-color: #337ab7 + } + .ConstructionConsentOwnerResult-denied { /*red background color here for this tr*/ background-color: #f9a39f diff --git a/application/ConstructionConsent/ConstructionConsent.php b/application/ConstructionConsent/ConstructionConsent.php index 75857f1d9..a2ead70a6 100644 --- a/application/ConstructionConsent/ConstructionConsent.php +++ b/application/ConstructionConsent/ConstructionConsent.php @@ -428,6 +428,10 @@ class ConstructionConsent extends mfBaseModel { COUNT(cwo.id) AS total_owners, CASE WHEN ConstructionConsent.approve_override = 1 THEN 'green' + WHEN COALESCE(SUM(CASE + WHEN approve_override = 1 THEN 0 + ELSE (cwo.result = 'open' AND cwo.status = 'new') + END), 0) > 0 THEN 'blue' WHEN COALESCE(SUM(CASE WHEN approve_override = 1 THEN 0 ELSE (cwo.result = 'denied')