From 265f07ed53732b3c32c4d3501f41afb8fde4a45a Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 6 May 2025 11:28:55 +0200 Subject: [PATCH] - --- .../ConstructionConsent/Consentform.pdf.php | 9 +++- Layout/default/ConstructionConsent/Index.php | 46 +++++++++++++++++-- Layout/default/ConstructionConsent/View.php | 16 +++++-- .../ConstructionConsent.php | 4 ++ .../ConstructionConsentController.php | 27 ++++++++--- .../ConstructionConsentOwner.php | 4 ++ 6 files changed, 91 insertions(+), 15 deletions(-) diff --git a/Layout/default/ConstructionConsent/Consentform.pdf.php b/Layout/default/ConstructionConsent/Consentform.pdf.php index c820ce0a5..71d2a7361 100644 --- a/Layout/default/ConstructionConsent/Consentform.pdf.php +++ b/Layout/default/ConstructionConsent/Consentform.pdf.php @@ -457,10 +457,15 @@ foreach ($owners as $owner):

Übersichtsplan / Planskizze

- - consent->file && $owner->consent->file->file_id && $owner->consent->file->file->fileExists()): ?> + consent->file && + $owner->consent->file->file_id && + $owner->consent->file->file !== null && // Explicitly check if $owner->consent->file->file is not null + $owner->consent->file->file->fileExists() + ): ?> +
diff --git a/Layout/default/ConstructionConsent/Index.php b/Layout/default/ConstructionConsent/Index.php index a34142885..638cfe4d7 100644 --- a/Layout/default/ConstructionConsent/Index.php +++ b/Layout/default/ConstructionConsent/Index.php @@ -170,7 +170,9 @@ $pagination_entity_name = "Zustimmungserklärungen";
- $filter])?>"> Zustimmungserklärungen herunterladen + + Zustimmungserklärungen herunterladen +
@@ -397,8 +399,11 @@ $pagination_entity_name = "Zustimmungserklärungen"; } elseif (isset($item->owner_result_counts['denied']) && $item->owner_result_counts['denied'] > 0) { $status_class = 'red'; // Red if at least one denied - } elseif ((isset($item->owner_result_counts['unresolvable']) && $item->owner_result_counts['unresolvable'] > 0) || - (isset($item->owner_result_counts['moved']) && $item->owner_result_counts['moved'] > 0)) { + } elseif ( + (isset($item->owner_result_counts['unresolvable']) && $item->owner_result_counts['unresolvable'] > 0) || + (isset($item->owner_result_counts['moved']) && $item->owner_result_counts['moved'] > 0) || + (isset($item->owner_result_counts['open']) && $item->owner_result_counts['open'] > 0) + ) { $status_class = 'yellow'; // Yellow if at least one unresolvable or moved } elseif (isset($item->owner_result_counts['accepted']) && $item->owner_result_counts['accepted'] === count($item->owners)) { @@ -431,6 +436,30 @@ $pagination_entity_name = "Zustimmungserklärungen"; + + +