From a2b806b2e5671fa7dd9a10b42f14ab6b055b3757 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 3 Jun 2025 11:24:39 +0200 Subject: [PATCH] added new street filter --- .../ConstructionConsentProject.php | 9 +++++---- .../ConstructionConsentFaultyEntries.js | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/application/ConstructionConsentProject/ConstructionConsentProject.php b/application/ConstructionConsentProject/ConstructionConsentProject.php index c0844a85a..200a09270 100644 --- a/application/ConstructionConsentProject/ConstructionConsentProject.php +++ b/application/ConstructionConsentProject/ConstructionConsentProject.php @@ -275,7 +275,7 @@ AND ( ) OR /* street lowercase should not be oesterreich, österreich, austria, germany, deutschland, schweiz, switzerland */ - (LOWER(cco.street) NOT REGEXP '^(österreich|austria|germany|deutschland|schweiz|switzerland)$') + (LOWER(cco.street) REGEXP '^(österreich|austria|germany|deutschland|schweiz|switzerland)$') OR /* For Germany: ZIP must be exactly 5 digits */ ( @@ -364,8 +364,8 @@ AND ( (cco.zip IS NULL OR cco.zip NOT REGEXP '^[0-9]{4}$') ) OR - /* street lowercase should not be oesterreich, österreich, austria, germany, deutschland, schweiz, switzerland */ - (LOWER(cco.street) NOT REGEXP '^(österreich|austria|germany|deutschland|schweiz|switzerland)$') + /* street lowercase should not be oesterreich, österreich, austria, germany, deutschland, schweiz, switzerland */ + (LOWER(cco.street) REGEXP '^(österreich|austria|germany|deutschland|schweiz|switzerland)$') OR /* For Germany: ZIP must be exactly 5 digits */ ( @@ -414,7 +414,8 @@ ORDER BY // Check street for specific lowercase values $streetLower = strtolower(trim($data['street'] ?? '')); - if (in_array($streetLower, ['österreich', 'austria', 'germany', 'deutschland', 'schweiz', 'switzerland'])) { + var_dump($streetLower); + if (in_array($streetLower, ['österreich', 'Österreich', 'austria', 'germany', 'deutschland', 'schweiz', 'switzerland'])) { $errors[] = 'street'; } diff --git a/public/js/pages/ConstructionConsentFaultyEntries/ConstructionConsentFaultyEntries.js b/public/js/pages/ConstructionConsentFaultyEntries/ConstructionConsentFaultyEntries.js index a4e947f22..dde158244 100644 --- a/public/js/pages/ConstructionConsentFaultyEntries/ConstructionConsentFaultyEntries.js +++ b/public/js/pages/ConstructionConsentFaultyEntries/ConstructionConsentFaultyEntries.js @@ -34,8 +34,11 @@ Vue.component('construction-consent-faulty-entries', {