← back to Commercialrealestate
detail-modal drill enrichment (index/sales/mls): index broker-line DRE#→CA DRE record + phone→tel; sales & mls modal address→Google Maps (all-data-href rule)
a06fde2541a09a9b9315966dcf9567d46be18e85 · 2026-08-03 10:46:06 -0700 · Steve Abrams
Files touched
M public/index.htmlM public/mls.htmlM public/sales.html
Diff
commit a06fde2541a09a9b9315966dcf9567d46be18e85
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Aug 3 10:46:06 2026 -0700
detail-modal drill enrichment (index/sales/mls): index broker-line DRE#→CA DRE record + phone→tel; sales & mls modal address→Google Maps (all-data-href rule)
---
public/index.html | 4 ++--
public/mls.html | 2 +-
public/sales.html | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/index.html b/public/index.html
index 03d1994..a81571c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1167,8 +1167,8 @@ function card(p){
if(!b.name && !b.firm) return '';
const nameStr = b.name ? `<strong>${esc(b.name)}</strong>` : '';
const firmStr = b.firm ? esc(b.firm) : '';
- const dreStr = b.dre ? ` · DRE ${esc(b.dre)}` : '';
- const phoneStr = b.phone ? ` · ${esc(b.phone)}` : '';
+ const dreStr = b.dre ? (function(){const L=String(b.dre).trim();return /^\d{7,8}$/.test(L)?` · DRE# <a href="https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=${encodeURIComponent(L)}" target="_blank" rel="noopener noreferrer" title="Full CA DRE license record ↗">${esc(L)} ↗</a>`:` · DRE ${esc(L)}`;})() : '';
+ const phoneStr = b.phone ? ` · <a href="tel:${esc(String(b.phone).replace(/[^0-9+]/g,''))}">${esc(b.phone)}</a>` : '';
const mlsStr = b.mls ? ` · MLS ${esc(b.mls)}` : '';
const parts = [nameStr, firmStr].filter(Boolean).join(' · ');
const tierBadge = b.tier==='A' ? ' <span style="color:var(--acc);font-size:9px">[A]</span>' : '';
diff --git a/public/mls.html b/public/mls.html
index 26c4be8..db5a034 100644
--- a/public/mls.html
+++ b/public/mls.html
@@ -443,7 +443,7 @@ async function propHistory(address,city){
const ov=$('#ov'), mb=$('#mbody'); ov.classList.add('on'); mb.innerHTML='<div class="ph-mut">loading history for '+esc(address)+'…</div>';
let d; try{ d=await (await fetch('/api/property-history?address='+encodeURIComponent(address)+'&city='+encodeURIComponent(city||''))).json(); }catch(e){ mb.innerHTML='<div class="ph-mut">error</div>'; return; }
const a=d.assessor||d.assessorArchive;
- let h='<h3>'+esc(address)+'</h3><div class="ph-sub">'+esc(city||'')+' · property history (address only — no names)</div>';
+ let h='<h3>'+(function(){const q=[address,city].filter(Boolean).join(', ');return q?'<a href="https://www.google.com/maps/search/?api=1&query='+encodeURIComponent(q)+'" target="_blank" rel="noopener noreferrer" title="Open in Google Maps">'+esc(address)+' 🗺️</a>':esc(address);})()+'</h3><div class="ph-sub">'+esc(city||'')+' · property history (address only — no names)</div>';
if(a){ h+='<div class="ph-sec"><h4>Assessor parcel'+(a.roll_year?' ('+esc(a.roll_year)+' roll)':'')+'</h4><div class="ph-ci">'
+(a.year_built?'<span>🏗 Built '+a.year_built+'</span>':'')
+(a.bedrooms!=null?'<span>🛏 '+a.bedrooms+' bd</span>':'')+(a.bathrooms!=null?'<span>🛁 '+a.bathrooms+' ba</span>':'')
diff --git a/public/sales.html b/public/sales.html
index c46a529..526cdcc 100644
--- a/public/sales.html
+++ b/public/sales.html
@@ -274,7 +274,7 @@ function openDetail(i){
const rows=render._rows||filtered(); const r=rows[i]; if(!r) return;
const ov=$('#ov'), mb=$('#mbody'); ov.classList.add('on');
const w=r.url?(/^https?:/.test(r.url)?r.url:'https://'+r.url):null;
- mb.innerHTML='<h3>'+esc(r.address||'—')+'</h3><div class="msub">'+esc([r.city,r.zip].filter(Boolean).join(' ')||'—')+'</div>'
+ mb.innerHTML='<h3>'+(function(){const q=[r.address,r.city,r.zip].filter(Boolean).join(', ');return q?'<a href="https://www.google.com/maps/search/?api=1&query='+encodeURIComponent(q)+'" target="_blank" rel="noopener noreferrer" title="Open in Google Maps">'+esc(r.address||'—')+' 🗺️</a>':esc(r.address||'—');})()+'</h3><div class="msub">'+esc([r.city,r.zip].filter(Boolean).join(' ')||'—')+'</div>'
+'<div class="ci">'
+'<span class="price" style="font-size:18px">'+money(r.sold_price)+'</span>'
+'<span class="mut">sold '+dt(r.sold_date)+'</span>'
← 5d14bae modal drill (Cody fixes): gate broker DRE link on verified d
·
back to Commercialrealestate
·
enrich-condo-brokers: record ALL license numbers per listing fcd24a8 →