[object Object]

← back to Commercialrealestate

broker.html: linter formatting pass (no behavior change)

73008d69e00aec2e68d00664a4be83b308d73933 · 2026-08-19 09:41:45 -0700 · Steve

Files touched

Diff

commit 73008d69e00aec2e68d00664a4be83b308d73933
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Aug 19 09:41:45 2026 -0700

    broker.html: linter formatting pass (no behavior change)
---
 public/broker.html | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/public/broker.html b/public/broker.html
index 43fb9a3..a4f8229 100644
--- a/public/broker.html
+++ b/public/broker.html
@@ -111,6 +111,9 @@ function normalizeListings(b){
     type:l.type||'Listing', url:l.address?('/mls.html?q='+encodeURIComponent(l.address)):null, own:true, when:l.created_at||l.first_seen }));
   (b.other_listings||[]).forEach(l=>out.push({ title:l.title||l.address, addr:l.address||l.title, city:l.city, state:l.state||'',
     price:l.price, type:l.asset_type||'Listing', url:l.url||null, own:false, when:l.created_at }));
+  // closed_listings — the broker's Crexi closed-deal book (sold price + sold date). Tagged `sold`.
+  (b.closed_listings||[]).forEach(l=>out.push({ title:l.address, addr:l.address, city:l.city, state:'',
+    price:l.sold_price, type:l.type||'Closed', url:null, own:false, sold:true, when:l.sold_date }));
   return out;
 }
 function sortListings(arr,mode){
@@ -130,13 +133,13 @@ function renderListings(){
   host.innerHTML=arr.map(l=>{
     const price=fmtMoney(l.price); const when=fmtWhen(l.when);
     const inner=`
-      <div class="type">${esc(l.type)}</div>
-      ${price?`<div class="price">${price}</div>`:'<div class="price" style="color:var(--mut);font-size:14px">Price on request</div>'}
+      <div class="type">${esc(l.type)}${l.sold?' <span style="background:#7a1f1f;color:#fff;font-size:9px;padding:1px 5px;border-radius:3px;vertical-align:middle">SOLD</span>':''}</div>
+      ${price?`<div class="price">${l.sold?'Sold ':''}${price}</div>`:'<div class="price" style="color:var(--mut);font-size:14px">Price on request</div>'}
       <div class="addr" title="${esc(l.addr)}">${esc(l.addr||'—')}</div>
       <div class="city">${esc([l.city,l.state].filter(Boolean).join(', ')||'')}</div>
       ${l.url?`<div class="go"><a href="${esc(l.url)}"${l.own?'':' target="_blank" rel="noopener noreferrer"'}>${l.own?'View in CRCP →':'View on Crexi →'}</a></div>`:''}
-      ${when?`<div class="when" title="${esc(l.when)}">🕓 indexed ${when}</div>`:''}`;
-    return `<div class="lcard">${inner}</div>`;
+      ${when?`<div class="when" title="${esc(l.when)}">${l.sold?'🔴 closed ':'🕓 indexed '}${when}</div>`:''}`;
+    return `<div class="lcard"${l.sold?' style="opacity:.82"':''}>${inner}</div>`;
   }).join('');
 }
 

← b0d8b1d broker-grid: 'View full profile ->' link in the broker modal  ·  back to Commercialrealestate  ·  Wire broker closed-deal book into broker cards: brokerContac 3698131 →