[object Object]

โ† back to Commercialrealestate

CRCP mls: make 'First seen' visible per admin-card rule โ€” unconditional grid-card ๐Ÿ•“ chip + default-on column (matches condos.html reference; Cody FIX-FIRST)

bc720b104c9cd042e1240a7f4a75a4814cb10cad ยท 2026-08-06 16:56:32 -0700 ยท Steve Abrams

Files touched

Diff

commit bc720b104c9cd042e1240a7f4a75a4814cb10cad
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 6 16:56:32 2026 -0700

    CRCP mls: make 'First seen' visible per admin-card rule โ€” unconditional grid-card ๐Ÿ•“ chip + default-on column (matches condos.html reference; Cody FIX-FIRST)
---
 public/mls.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/mls.html b/public/mls.html
index 511ff2e..328790d 100644
--- a/public/mls.html
+++ b/public/mls.html
@@ -200,7 +200,7 @@ function paintBody(){
     $('#tableView').classList.add('hide'); $('#gridView').classList.remove('hide');
     const bodyCols=cols.filter(c=>!['address','city','zip','type'].includes(c.k));
     $('#gridView').innerHTML=rows.map(r=>`<div class="gc prow" data-addr="${esc(r.address||'')}" data-city="${esc(r.city||'')}" style="cursor:pointer">
-      <div style="display:flex;justify-content:space-between;gap:8px"><div class="addr">${esc(r.address||'โ€”')}</div>${star(r)}</div><div class="sub">${esc(r.city||'')} ${esc(r.zip||'')} ยท ${esc(r.type||'')}</div>`
+      <div style="display:flex;justify-content:space-between;gap:8px"><div class="addr">${esc(r.address||'โ€”')}</div>${star(r)}</div><div class="sub">${esc(r.city||'')} ${esc(r.zip||'')} ยท ${esc(r.type||'')}</div>${r.first_seen?`<div class="when" title="${esc(String(r.first_seen))}" style="font-size:10px;color:var(--mut,#8b949e);margin-top:4px">๐Ÿ•“ First seen ${esc(new Date(r.first_seen).toLocaleString(undefined,{year:'numeric',month:'short',day:'numeric',hour:'numeric',minute:'2-digit'}))}</div>`:''}`
       +bodyCols.map(c=>`<div class="row"><span class="k">${esc(c.l)}</span><span class="v">${cellHTML(r,c)}</span></div>`).join('')
       +`</div>`).join('');
   }
@@ -254,7 +254,7 @@ function mapCondo(c){ return { id:c.id, address:c.address, city:c.city, zip:c.zi
 function mapSfr(s){ return { id:s.id, address:s.address, city:s.city, zip:s.zip, type:'Single-Family', price:+s.price||0, units:1, cap_rate:null, year_built:s.year_built||null, status:lifeStatus(s), first_seen:s.created_at||null, prev_price:s.prev_price?+s.prev_price:null, price_cut_at:s.price_changed_at?String(s.price_changed_at).slice(0,10):null, dom:s.days_on_market!=null?+s.days_on_market:null, listed_date:s.listed_date?String(s.listed_date).slice(0,10):null, mkt:s.market_status||null, prev:s.prev_market_status||null, off_date:s.off_market_at?String(s.off_market_at).slice(0,10):null, disposition:s.disposition||null, sold_price:s.sold_price?+s.sold_price:null, sold_date:s.sold_date?String(s.sold_date).slice(0,10):null, source:s.source, firm:s.firm_name||null, beds:s.beds, baths:s.baths, sqft:s.sqft, broker_name:s.broker_name||null }; }
 // START TIGHT (Steve rule 2026-07-31): only the essentials show on first load; the user
 // toggles the rest on from the rail. A saved pref in VISCOL always wins.
-const DEFAULT_ON=new Set(['address','city','type','price','cap_rate','status','sold_date']);
+const DEFAULT_ON=new Set(['address','city','type','price','cap_rate','status','sold_date','first_seen']);
 let VISCOL=(function(){let s={};try{s=JSON.parse(localStorage.getItem('mlsCols')||'{}');}catch(e){}return s;})();
 function colVis(k){ if(k in VISCOL) return !!VISCOL[k]; return DEFAULT_ON.has(k); }
 // Draggable column ORDER (Steve rule: move columns around). Keys in display order;

โ† 8ebbc43 CRCP mls: add opt-in 'First seen' column (datetime cell type  ยท  back to Commercialrealestate  ยท  CRCP: /api/property/:ain + /api/property/by-address enrichme 03cae43 โ†’