diff --git a/app.js b/app.js
index bb476f4..faf216f 100644
--- a/app.js
+++ b/app.js
@@ -1511,8 +1511,20 @@ document.addEventListener('DOMContentLoaded', async () => {
const last = p[state.ownerMapping.lastName] || '';
const fullName = `${first} ${last}`.trim() || "Unbekannt";
+ // Adress-Felder extrahieren (STR, HSN, PLZ, ORP)
+ const str = p.STR || '';
+ const hsn = p.HSN || '';
+ const plz = p.PLZ || '';
+ const ort = p.ORP || '';
+ const address = `${str} ${hsn}, ${plz} ${ort}`.trim().replace(/^,/, '').trim();
+
if (!owners[fullName]) {
- owners[fullName] = { count: 0, first, last };
+ owners[fullName] = {
+ count: 0,
+ first,
+ last,
+ address: address || 'Keine Adresse'
+ };
}
owners[fullName].count++;
});
@@ -1523,7 +1535,10 @@ document.addEventListener('DOMContentLoaded', async () => {
const query = ownerSearch.value.toLowerCase();
const filtered = {};
for (let name in owners) {
- if (name.toLowerCase().includes(query)) filtered[name] = owners[name];
+ const o = owners[name];
+ if (name.toLowerCase().includes(query) || (o.address && o.address.toLowerCase().includes(query))) {
+ filtered[name] = o;
+ }
}
renderOwnerRows(filtered);
};
@@ -1539,7 +1554,9 @@ document.addEventListener('DOMContentLoaded', async () => {
const row = document.createElement('tr');
row.innerHTML = `
-
${name} |
+ ${data.last} |
+ ${data.first} |
+ ${data.address} |
${data.count} Flurstücke |
|