Show reasonable address when we have none

This commit is contained in:
Eli Ribble 2026-03-09 23:02:11 +00:00
parent ce6c6c1cc1
commit 873d5da2cd
No known key found for this signature in database

View file

@ -21,7 +21,15 @@
return true;
}
function formatAddress(a) {
return a.number + " " + a.street + ", " + a.locality;
if (a.number == "" && a.street == "") {
return "no address provided";
}
const result = a.number + " " + a.street + ", " + a.locality;
if (result.length > 30) {
return result.substring(0, 30) + "...";
} else {
return result;
}
}
function communicationsApp() {
return {
@ -366,7 +374,7 @@
></span>
</div>
<small
x-text="formatAddress(comm.public_report.address).substring(0, 30) + '...'"
x-text="formatAddress(comm.public_report.address)"
></small>
<template
x-if="comm.public_report.images && comm.public_report.images.length > 0"