Merge branch 'ConstructionConsent/add-street-error' into 'master'
added new street filter See merge request fronk/thetool!1401
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,11 @@ Vue.component('construction-consent-faulty-entries', {
|
||||
|
||||
<template v-slot:address_info="{ row }">
|
||||
<div>
|
||||
<div>
|
||||
<div :class="{'text-danger': row.errors.includes('street')}">
|
||||
<strong>Straße:</strong> {{ row.street || 'N/A' }}
|
||||
<span v-if="row.errors.includes('street')" class="badge badge-warning">
|
||||
Ungültige Straße
|
||||
</span>
|
||||
</div>
|
||||
<div :class="{'text-danger': row.errors.includes('zip')}">
|
||||
<strong>PLZ:</strong> {{ row.zip || '⚠️ Fehlt' }}
|
||||
|
||||
Reference in New Issue
Block a user