[object Object]

← back to Dw Photo Capture

Add 🧵 All TWIL chip (every Fentucci/grasscloth item, not just photos-needed) via /api/twil; confirm 🌐 All Shopify gives access to every vendor's SKUs. GRS-27080 = numbering gap (never assigned)

a2e7b32937738ec347dde3a15c0c93427964e699 · 2026-06-25 09:35:51 -0700 · steve@designerwallcoverings.com

Files touched

Diff

commit a2e7b32937738ec347dde3a15c0c93427964e699
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date:   Thu Jun 25 09:35:51 2026 -0700

    Add 🧵 All TWIL chip (every Fentucci/grasscloth item, not just photos-needed) via /api/twil; confirm 🌐 All Shopify gives access to every vendor's SKUs. GRS-27080 = numbering gap (never assigned)
---
 data/build.json   |  5 +++--
 public/index.html | 19 +++++++++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/data/build.json b/data/build.json
index 723a6d3..6f69547 100644
--- a/data/build.json
+++ b/data/build.json
@@ -1,5 +1,5 @@
 {
-  "next": 31,
+  "next": 32,
   "map": {
     "63863152": 27,
     "578af86f": 2,
@@ -29,6 +29,7 @@
     "ce9df522": 26,
     "8a1a955f": 28,
     "f4a0bf6d": 29,
-    "86060b11": 30
+    "86060b11": 30,
+    "43b1741c": 31
   }
 }
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index e1db94b..7925614 100644
--- a/public/index.html
+++ b/public/index.html
@@ -150,6 +150,7 @@
       <div class="chip" data-f="live">🟢 Live</div>
       <div class="chip" data-f="done">Done</div>
       <div class="chip" data-f="new" id="chipNew">✨ New</div>
+      <div class="chip" data-f="twil" id="chipTwil">🧵 All TWIL</div>
       <div class="chip" data-f="all">All</div>
       <div class="chip" data-f="any">🔎 Any SKU</div>
       <div class="chip" data-f="shop">🌐 All Shopify</div>
@@ -254,6 +255,14 @@ async function loadNew(){
     if(filter==='new') render();
   }catch(e){}
 }
+let TWILITEMS=[];
+async function loadTwil(){
+  try{ const r=await fetch('/api/twil'); const d=await r.json();
+    TWILITEMS=d.items||[];
+    const ch=$('#chipTwil'); if(ch) ch.textContent='🧵 All TWIL ('+(d.total||0)+')';
+    if(filter==='twil') render();
+  }catch(e){}
+}
 // Favorites (starred) + Recents (auto-logged on upload) — server-stored so the
 // same lists show on phone AND office. Card-shaped, render straight into the grid.
 let FAVORITES=[], RECENTS=[];
@@ -292,7 +301,7 @@ function render(){
   }
   const q=($('#q').value||'').toLowerCase(), sort=$('#sort').value;
   const src = filter==='any' ? LOOKUP : filter==='shop' ? SHOPSEARCH : filter==='new' ? NEWITEMS
-            : filter==='fav' ? FAVORITES : filter==='recent' ? RECENTS : ITEMS;
+            : filter==='twil' ? TWILITEMS : filter==='fav' ? FAVORITES : filter==='recent' ? RECENTS : ITEMS;
   const liveSearch = filter==='any'||filter==='shop'; // server already filtered these
   const curated = filter==='fav'||filter==='recent'; // server-stored lists, local q-filter only
   let list=src.filter(x=>{
@@ -316,6 +325,11 @@ function render(){
     $('#prog').style.width='0%';
     $('#count').textContent = `${list.length} new SKU${list.length===1?'':'s'} to create`;
     $('#remain').textContent = '📷 shoot to create + go live';
+  } else if(filter==='twil'){
+    const live=list.filter(x=>x.status==='ACTIVE').length;
+    $('#prog').style.width='0%';
+    $('#count').textContent = `${list.length} TWIL items · ${live} live`;
+    $('#remain').textContent = 'all grasscloth — photo or not';
   } else if(curated){
     $('#prog').style.width='0%';
     $('#count').textContent = filter==='fav' ? `${list.length} ⭐ favorite${list.length===1?'':'s'}` : `${list.length} recently updated`;
@@ -685,6 +699,7 @@ document.querySelectorAll('.chip').forEach(c=>c.addEventListener('click',()=>{
   if(filter==='any'){ $('#q').placeholder='🔎 SKU, model #, name, or collection…'; $('#q').focus(); doLookup(); }
   else if(filter==='shop'){ $('#q').placeholder='🌐 Any Shopify SKU, name, vendor, or collection…'; $('#q').focus(); doShopSearch(); }
   else if(filter==='new'){ $('#q').placeholder='🔎 Filter the new SKUs…'; loadNew(); }
+  else if(filter==='twil'){ $('#q').placeholder='🔎 Filter TWIL items…'; loadTwil(); }
   else if(filter==='fav'){ $('#q').placeholder='🔎 Filter favorites…'; render(); loadFav(); }
   else if(filter==='recent'){ $('#q').placeholder='🔎 Filter recent…'; render(); loadRecent(); }
   else { $('#q').placeholder='🔎 Search name or model #…'; render(); }
@@ -743,7 +758,7 @@ $('#scanInput').addEventListener('change',async e=>{
     doLookup();
   }catch(err){ toast('Scan failed — check connection'); }
 });
-load(); loadNew(); loadFav(); loadRecent();
+load(); loadNew(); loadTwil(); loadFav(); loadRecent();
 setInterval(()=>{ if(filter!=='any'&&filter!=='shop'&&filter!=='fav'&&filter!=='recent') load(); }, 60000);
 </script>
 </body>

← ae60fb4 auto-save: 2026-06-25T09:33:15 (1 files) — server.js  ·  back to Dw Photo Capture  ·  Add ✂️ Crop tool to photo editor (drag corners/move, dim out f97337a →