[object Object]

← back to Fabricut Internal

Internal admin cards: add created date+time chip (Steve standing rule for admin surfaces)

dba7a177225b10689e24369140fbaa3f01f308ad · 2026-08-20 11:03:43 -0700 · Steve Abrams

Files touched

Diff

commit dba7a177225b10689e24369140fbaa3f01f308ad
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 20 11:03:43 2026 -0700

    Internal admin cards: add created date+time chip (Steve standing rule for admin surfaces)
---
 public/index.html | 1 +
 server.js         | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/public/index.html b/public/index.html
index 5858e0b..176b0c0 100644
--- a/public/index.html
+++ b/public/index.html
@@ -269,6 +269,7 @@ function card(p){
       ${p.color_bucket?`<span class="chip cl"><span class="dot" style="background:${dot}"></span>${drill('color_bucket',p.color_bucket,p.color_bucket)}</span>`:''}
       ${p.japan_sku?`<a class="chip jp ${p.japan_conf==='possible'?'poss':'hi'}" href="${esc(p.japan_img_url||('https://japan.designerwallcoverings.com/?q='+encodeURIComponent(p.japan_sku)))}" target="_blank" rel="noopener noreferrer" onclick="event.stopPropagation()" title="Open the exact ${esc(p.japan_vendor)} ${esc(p.japan_sku)} image on japan.designerwallcoverings.com (visual match — ${esc(p.japan_conf)})">${p.japan_thumb?`<img class="jt" loading="lazy" src="${esc(p.japan_thumb)}" alt="" onerror="this.style.display='none'">`:''}≈ ${esc(p.japan_vendor)} ${esc(p.japan_sku)} ↗</a>`:''}
       <span class="chip toggle" onclick="event.stopPropagation();this.closest('.card').classList.toggle('info-open')">ⓘ details</span>
+      ${p.published_at?`<span class="chip when" title="${esc(p.published_at)}">🕓 ${new Date(p.published_at).toLocaleString(undefined,{year:'numeric',month:'short',day:'numeric',hour:'numeric',minute:'2-digit'})}</span>`:''}
     </div>
     <span class="lsku" title="Vendor SKU">${esc(p.sku||'')}</span>
     <span class="ldw" title="DW SKU">${esc(p.dw_sku||'')}</span>
diff --git a/server.js b/server.js
index 1cdcc37..b5a5775 100644
--- a/server.js
+++ b/server.js
@@ -41,7 +41,8 @@ const REFRESH_INTERVAL_SEC = Number(process.env.REFRESH_INTERVAL_SEC || 900); //
 function load() {
   SNAP = JSON.parse(fs.readFileSync(DATA, 'utf8'));
   // the index grid never renders body_html / images[] / eyebrow — keep those PDP-only
-  LIGHT = SNAP.products.map(({ body_html, images, display_eyebrow, published_at, ...p }) => p);
+  // keep published_at (created date) in the grid payload — admin cards must show created date+time (Steve rule)
+  LIGHT = SNAP.products.map(({ body_html, images, display_eyebrow, ...p }) => p);
   try { LAST_REFRESH = fs.statSync(DATA).mtime.toISOString(); } catch { LAST_REFRESH = new Date().toISOString(); }
   console.log(`[fabricut] loaded ${SNAP.products.length} products (data mtime ${LAST_REFRESH})`);
 }

← e200a18 SEO: dynamic sitemap on public + noindex robots on internal  ·  back to Fabricut Internal  ·  chore: v1.0.0 — go-live (session close) 1668d6d →