← back to Re Flyer Aggregator
sources dashboard: add sortable 'Latest' date column (per-source most-recent item date) so sources can be sorted by date (Steve) (TK-10708)
af78c3275b53dfebfa2fb105721201b14e524cd6 · 2026-08-19 22:39:48 -0700 · Steve Abrams
Files touched
M public/sources/index.html
Diff
commit af78c3275b53dfebfa2fb105721201b14e524cd6
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Aug 19 22:39:48 2026 -0700
sources dashboard: add sortable 'Latest' date column (per-source most-recent item date) so sources can be sorted by date (Steve) (TK-10708)
---
public/sources/index.html | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/public/sources/index.html b/public/sources/index.html
index 86a70ce..1e0da1d 100644
--- a/public/sources/index.html
+++ b/public/sources/index.html
@@ -76,7 +76,7 @@
<div class="controls"><input id="q" placeholder="search source…" size="18"><span class="clr" id="clr">clear filters</span><div class="stat" id="sstat"></div></div>
<table><thead><tr>
<th data-k="name">Source</th><th data-k="method">Method</th><th data-k="region">Market</th>
- <th data-k="pulled">Items pulled</th><th data-k="deals">Deals kept</th><th>Recent from this source</th>
+ <th data-k="pulled">Items pulled</th><th data-k="deals">Deals kept</th><th data-k="latest">Latest</th><th>Recent from this source</th>
</tr></thead><tbody id="tb"></tbody></table>
<h2>DATABASE CRAWL — brokers (ads + flyers on their sites)</h2>
<div class="card" id="crawl">Loading crawl status…</div>
@@ -139,13 +139,15 @@ function renderFlow(d){document.getElementById('flow').innerHTML=
function renderSrc(){ if(!SRC)return;
const q=document.getElementById('q').value.toLowerCase();
let f=SRC.feeds.filter(x=>x.name.toLowerCase().includes(q)&&(!F.method||x.method===F.method)&&(!F.region||(x.region||'—')===F.region));
- f.sort((a,b)=>sortK==='name'||sortK==='method'||sortK==='region'?(''+a[sortK]).localeCompare(''+b[sortK])*dir:((a[sortK]||0)-(b[sortK]||0))*dir);
+ const latestOf=x=>Math.max(0,...(x.samples||[]).map(s=>Date.parse(s.date)||0));
+ f.sort((a,b)=>sortK==='name'||sortK==='method'||sortK==='region'?(''+a[sortK]).localeCompare(''+b[sortK])*dir:sortK==='latest'?(latestOf(a)-latestOf(b))*dir:((a[sortK]||0)-(b[sortK]||0))*dir);
const max=Math.max(1,...SRC.feeds.map(x=>x.pulled));
document.getElementById('tb').innerHTML=f.map(x=>`<tr>
<td><b>${esc(x.name)}</b></td>
<td><span class="badge ${MB[x.method]}">${x.method}</span></td><td>${esc(x.region)}</td>
<td>${x.pulled}<div class="bar"><i style="width:${Math.round(x.pulled/max*100)}%"></i></div></td>
<td style="font-weight:800;color:#0E7C4A">${x.deals||'·'}</td>
+ <td style="white-space:nowrap;color:#8A5A00">${latestOf(x)?dt(new Date(latestOf(x)).toISOString()):'—'}</td>
<td class="samp">${(x.samples||[]).map(s=>`<div><span style="color:#8A5A00">${dt(s.date)}</span> ${s.price?'<b>'+esc(s.price)+'</b> ':''}<a href="${s.link}" target="_blank" rel="noopener">${esc(s.title)}</a> <span style="color:#9aa">· ${esc(s.market||'')}</span></div>`).join('')||'<span style="color:#c3c9d6">—</span>'}</td>
</tr>`).join('');
const fil=(F.method||F.region)?` · filtered ${F.method||''} ${F.region||''}`:'';
← 930736f property flyers: deep-crawl broker listing pages for real pr
·
back to Re Flyer Aggregator
·
property flyers: deep crawl found 200 real property one-shee b81a80f →