{
  "version": 1,
  "id": "scn_order_review_blueprint",
  "slug": "order-review",
  "name": "Weekly order review",
  "icon": "tablecells",
  "tint": "#315FC5",
  "settings": {
    "description": "See what needs attention, agree on the next step, and keep the follow-up with each order.",
    "welcomeSuggestions": [
      {
        "label": "What needs attention?",
        "prompt": "Walk me through the orders that need attention in this review. Show the evidence and suggest a next step."
      },
      {
        "label": "Bring a supplier update",
        "prompt": "The supplier now expects Northstar’s remaining 28 units on Friday, 18 September 2026. Update the review and keep our decisions."
      },
      {
        "label": "Make it mine",
        "prompt": "Help me replace the sample data with my team's orders. What should I attach?"
      }
    ]
  },
  "assets": [
    {
      "id": "review",
      "type": "daslab/webview",
      "name": "Weekly order review",
      "fields": {
        "html": "<!doctype html>\n<html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n<style>\n*{box-sizing:border-box}body{margin:0;background:#faf8f3;color:#272b28;font:14px/1.5 Inter,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif;padding:26px}button,input{font:inherit}input:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid #315fc5;outline-offset:4px}.eyebrow{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:#73786f}.head{display:flex;justify-content:space-between;gap:20px;align-items:start}h1{font-size:30px;line-height:1.15;letter-spacing:-1px;font-weight:550;margin:8px 0}.sub{color:#777c72;font-size:12px;margin:0}.pill{border:1px solid #e6e1d6;border-radius:20px;padding:5px 10px;color:#77756c;font-size:11px;white-space:nowrap}.stats{display:flex;gap:34px;margin:26px 0 20px;padding-bottom:20px;border-bottom:1px solid #e6e1d6}.stat strong{font-size:28px;font-weight:500;margin-right:9px}.stat span{font-size:11px;color:#777c72}.stat:first-child strong{color:#a27635}.group{display:flex;gap:8px;align-items:center;font-size:12px;margin:21px 0 9px;font-weight:500}.avatar{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#ece7dc;color:#77756c;font-size:10px}.order{border:1px solid #e6e1d6;border-radius:8px;padding:16px;margin:8px 0}.order-top{display:flex;justify-content:space-between;align-items:start;gap:12px}.customer{font-size:15px;font-weight:550}.number{color:#91958a;font-size:11px;margin-left:9px}.issue{font-size:12px;color:#777c72;margin-top:5px}.tag{font-size:10px;background:#f8edda;color:#976d2c;padding:4px 8px;border-radius:4px;white-space:nowrap}.tag.clear{color:#617054;background:#edf0e7}.tag.risk{color:#a9533c;background:#f8e6de}details{margin-top:11px;font-size:11px;color:#77756c}summary{cursor:pointer;width:fit-content}details p{white-space:pre-line;background:#f1ede4;border-left:2px solid #e0d8c8;padding:10px 12px;line-height:1.7}.decision{border-top:1px solid #eee9df;margin-top:13px;padding-top:11px}.decision label{display:block;font-size:10px;color:#858076;letter-spacing:.05em;text-transform:uppercase}.decision input{width:100%;background:none;border:0;border-bottom:1px dashed #dcd5c5;padding:8px 0;font-size:12px;color:inherit;border-radius:0}.hint{font-size:10px;color:#858076;margin:5px 0 0}.foot{border-top:1px solid #e6e1d6;margin-top:24px;padding-top:14px;font-size:11px;color:#858076;display:flex;justify-content:space-between;gap:14px}.foot a{color:inherit;text-underline-offset:3px}.empty{padding:25px 0;color:#777c72}@media(max-width:520px){body{padding:18px}.pill{display:none}.stats{gap:18px}.stat strong{display:block}.stat span{font-size:10px}.number{display:block;margin:3px 0}.order{padding:13px}.foot{flex-direction:column;gap:6px}}\n</style></head><body>\n<div class=\"head\"><div><div class=\"eyebrow\">Operations / weekly review</div><h1>Ready for the week.</h1><p class=\"sub\">Check the evidence. Agree on the next step.</p></div><span class=\"pill\" id=\"period\"></span></div>\n<div class=\"stats\"><div class=\"stat\"><strong id=\"attention\">—</strong><span>need attention</span></div><div class=\"stat\"><strong id=\"shipped\">—</strong><span>shipped in full</span></div><div class=\"stat\"><strong id=\"owners\">—</strong><span>people to follow up</span></div></div>\n<div id=\"orders\"></div>\n<div class=\"foot\"><span>Keep this scene. Bring the next update here.</span><a href=\"https://daslab.run/replay/order-review/Orders%20%26%20stock.xlsx\" target=\"_blank\" rel=\"noopener\">Sample workbook ↗</a></div>\n<script>\n(function(){\n  // The view renders the cell's data. Jobs can update it without replacing\n  // the design; per-order decisions use Daslab's synced asset state.\n  // Update fields.data with daslab_write_data. Keep stable order IDs and\n  // asset:decision:<id> state (also readable as widget_data.state). The\n  // workbook's example dates are historical. Ask for real recipients and\n  // accounts before sending; never manufacture a sent/approved history.\n  var data=window.__DASLAB_WIDGET_DATA__||{}, orders=Array.isArray(data.orders)?data.orders:[];\n  var esc=function(v){return String(v==null?'':v).replace(/[&<>\"']/g,function(c){return {'&':'&amp;','<':'&lt;','>':'&gt;','\"':'&quot;',\"'\":'&#39;'}[c]})};\n  document.getElementById('period').textContent=data.period||'Weekly review';\n  var open=orders.filter(function(o){return o.status!=='shipped'});\n  document.getElementById('attention').textContent=String(open.length).padStart(2,'0');\n  document.getElementById('shipped').textContent=String(orders.length-open.length).padStart(2,'0');\n  document.getElementById('owners').textContent=String(new Set(open.map(function(o){return o.owner})).size).padStart(2,'0');\n  var groups=new Map();orders.forEach(function(o){var owner=o.owner||'Unassigned';if(!groups.has(owner))groups.set(owner,[]);groups.get(owner).push(o)});\n  var html='',index=0;\n  groups.forEach(function(items,owner){html+='<div class=\"group\"><span class=\"avatar\">'+esc(owner.split(' ').map(function(s){return s[0]}).slice(0,2).join(''))+'</span>'+esc(owner)+'</div>';items.forEach(function(o){\n    var id='decision-'+index++,key='asset:decision:'+o.id,decision=localStorage.getItem(key);\n    if(decision===null)decision=o.decision||'';\n    html+='<article class=\"order\"><div class=\"order-top\"><div><span class=\"customer\">'+esc(o.customer)+'</span><span class=\"number\">#'+esc(o.id)+' · '+esc(o.promised)+'</span><div class=\"issue\">'+esc(o.issue)+'</div></div><span class=\"tag '+(o.status==='shipped'?'clear':o.status==='risk'?'risk':'')+'\">'+esc(o.label)+'</span></div><details><summary>Source evidence</summary><p>'+esc(o.evidence)+'</p></details>';\n    if(o.status!=='shipped')html+='<div class=\"decision\"><label for=\"'+id+'\">Agreed next step</label><input id=\"'+id+'\" data-key=\"'+esc(key)+'\" value=\"'+esc(decision)+'\" placeholder=\"Add a decision from the meeting…\" maxlength=\"400\"><p class=\"hint\">'+(decision?'Kept with this order':'Ready for your team’s decision')+'</p></div>';\n    html+='</article>';\n  })});\n  document.getElementById('orders').innerHTML=html||'<p class=\"empty\">Add orders to this scene to begin your review.</p>';\n  document.querySelectorAll('input[data-key]').forEach(function(input){input.addEventListener('input',function(){localStorage.setItem(input.dataset.key,input.value);input.nextElementSibling.textContent='Kept with this order'})});\n})();\n</script></body></html>\n",
        "data": {
          "period": "Sample · 14 Sep 2026",
          "orders": [
            {
              "id": "1042",
              "customer": "Northstar",
              "owner": "Maya Chen",
              "promised": "Thu 17 Sep",
              "status": "open",
              "label": "Stock shortfall",
              "issue": "80 units ordered. Only 52 available. Arrival date unknown.",
              "evidence": "Orders!2 · NS-80 · 80 units · promised Thu 17 Sep\nStock!2 · NS-80 · 52 available · shortfall 28\nSupplier updates!2 · Arrival date for remaining 28 units not yet confirmed."
            },
            {
              "id": "1043",
              "customer": "Linden",
              "owner": "Jonas Lee",
              "promised": "Fri 18 Sep",
              "status": "open",
              "label": "Address needed",
              "issue": "Stock is ready. Delivery address still needs confirmation.",
              "evidence": "Orders!3 · LN-40 · 40 units · address unconfirmed\nStock!3 · LN-40 · 40 available"
            },
            {
              "id": "1044",
              "customer": "Atlas",
              "owner": "Maya Chen",
              "promised": "Mon 14 Sep",
              "status": "shipped",
              "label": "Shipped in full",
              "issue": "Nothing outstanding.",
              "evidence": "Orders!4 · 60 units · shipped in full"
            }
          ]
        }
      },
      "layout": {
        "sortOrder": 0,
        "size": "xlarge"
      }
    },
    {
      "id": "workbook",
      "type": "daslab/file",
      "name": "Orders & stock.xlsx",
      "fields": {
        "url": "https://daslab.run/replay/order-review/Orders%20%26%20stock.xlsx",
        "filename": "Orders & stock.xlsx",
        "mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        "size_bytes": 8987
      },
      "layout": {
        "sortOrder": 1,
        "size": "icon"
      }
    },
    {
      "id": "guide",
      "type": "daslab/note",
      "name": "Make this review yours",
      "fields": {
        "content": "# Make this review yours\n\nOpen the review, check the source evidence, and add a decision. It stays with the order when you come back.\n\nDrop your workbook into the chat and try:\n\n> Replace the sample orders with this workbook. Keep the review layout and our decisions.\n\nBring the next supplier update here too. Ask what changed, draft a follow-up, or reshape the review around your team.\n\nConnect email when you want to send a message. Once your data source is connected, you can also ask for a recurring review.\n"
      },
      "layout": {
        "sortOrder": 2,
        "size": "medium"
      }
    }
  ],
  "meta": {
    "author": "Daslab",
    "license": "MIT"
  }
}
