[object Object]

← back to Commercialrealestate

CRCP index: ALWAYS show agent/phone/firm/broker on the list view (Steve directive)

cc28893f8518a5d757193fbbebb3558bbe69a554 · 2026-08-20 11:49:45 -0700 · Steve Abrams

Root cause: VIS was built from persisted localStorage.cre_fields, so a prior toggle-off hid
agent/phone/firm forever despite def:1. Force ['agent','phone','firm','brokerline','broker'] on at
load (override saved off-state) + re-assert in saveVis (un-hideable) + broker def:0->1. Only
public/index.html staged; crcp-agent's live data-refresh working files left untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit cc28893f8518a5d757193fbbebb3558bbe69a554
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 20 11:49:45 2026 -0700

    CRCP index: ALWAYS show agent/phone/firm/broker on the list view (Steve directive)
    
    Root cause: VIS was built from persisted localStorage.cre_fields, so a prior toggle-off hid
    agent/phone/firm forever despite def:1. Force ['agent','phone','firm','brokerline','broker'] on at
    load (override saved off-state) + re-assert in saveVis (un-hideable) + broker def:0->1. Only
    public/index.html staged; crcp-agent's live data-refresh working files left untouched.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 public/index.html | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/public/index.html b/public/index.html
index c7b971f..0bbe6f5 100644
--- a/public/index.html
+++ b/public/index.html
@@ -899,15 +899,18 @@ const FIELDS = [
   {k:'sqft',       label:'Sq Ft',              card:1, col:1, def:0},
   {k:'hoa',        label:'HOA / mo (condo)',   card:1, col:1, def:0},
   {k:'warr',       label:'Warrantability',     card:1, col:1, def:0},
-  {k:'broker',     label:'Broker (condo)',     card:1, col:1, def:0},
+  {k:'broker',     label:'Broker (condo)',     card:1, col:1, def:1},
   {k:'assessed',   label:'Assessed value ✦',   card:1, col:0, def:0, assessor:1},
   {k:'landimp',    label:'Land / Improvement ✦',card:1, col:0, def:0, assessor:1},
   {k:'usecode',    label:'Assessor use code ✦', card:1, col:0, def:0, assessor:1},
   {k:'priorsale',  label:'Prior sale ✦',        card:1, col:0, def:0, assessor:1},
 ];
-const VIS = (function(){ let s={}; try{ s=JSON.parse(localStorage.getItem('cre_fields')||'{}'); }catch(e){} const o={}; FIELDS.forEach(f=>o[f.k]=(f.k in s)?!!s[f.k]:!!f.def); return o; })();
+// Steve (2026-08-20): ALWAYS show agent · contact, phone, listing firm, current broker — never hideable,
+// override any persisted localStorage off-state (a prior toggle-off used to hide them forever despite def:1).
+const ALWAYS_ON = ['agent','phone','firm','brokerline','broker'];
+const VIS = (function(){ let s={}; try{ s=JSON.parse(localStorage.getItem('cre_fields')||'{}'); }catch(e){} const o={}; FIELDS.forEach(f=>o[f.k]=ALWAYS_ON.includes(f.k)?true:((f.k in s)?!!s[f.k]:!!f.def)); return o; })();
 function vis(k){ return !!VIS[k]; }
-function saveVis(){ try{ localStorage.setItem('cre_fields', JSON.stringify(VIS)); }catch(e){} }
+function saveVis(){ ALWAYS_ON.forEach(k=>VIS[k]=true); try{ localStorage.setItem('cre_fields', JSON.stringify(VIS)); }catch(e){} }
 let view = localStorage.getItem('cre_view') || 'list';
 let groupBy = localStorage.getItem('cre_group') || '';   // group-by-any-field; '' = off
 let colSort = null;  // {key, dir} — click-to-sort on a List column; overrides the sort dropdown when set

← 9ed857d CRCP list: click row open-space to expand consolidated detai  ·  back to Commercialrealestate  ·  CRCP index: fix overlapping UI — bar controls no longer spil 0938efc →