Drag toolkit items here. Right-click boxes for actions. Bottom pane is Supply Chain Notes.

Supply Chain Notes SupplyChain 1

Horizontal scroll enabled for long notes.Notes are stored in this browser session.
"; } async function saveWithPicker(filename, content, mime, ext){ if(window.showSaveFilePicker){ const handle = await window.showSaveFilePicker({ suggestedName: filename, types: [{description: ext.toUpperCase()+" file", accept:{[mime]:["."+ext]}}] }); const writable = await handle.createWritable(); await writable.write(content); await writable.close(); return true; } const ok = confirm("Proceed with browser download save?"); if(!ok) return false; const blob = new Blob([content],{type:mime}); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href=url; a.download=filename; document.body.appendChild(a); a.click(); a.remove(); URL.revokeObjectURL(url); return true; } window.confirmSavePOC = async function(){ const rawName = (document.getElementById("savePocName")?.value || "").trim(); if(!rawName){ alert("POC name is required."); return false; } const format = document.getElementById("savePocFormat")?.value || "json"; const p = payload(); p.name = rawName; const base = rawName.replace(/[^a-z0-9]+/gi,"_") + "_" + new Date().toISOString().replace(/[:.]/g,"-"); try{ let saved=false; if(format==="json"){ saved = await saveWithPicker(base+".json", JSON.stringify(p,null,2), "application/json", "json"); }else if(format==="doc"){ saved = await saveWithPicker(base+".doc", htmlReport(p), "application/msword", "doc"); }else{ saved = await saveWithPicker(base+".odt", htmlReport(p), "application/vnd.oasis.opendocument.text", "odt"); } if(!saved){ if(typeof toastMsg==="function") toastMsg("Save cancelled."); return false; } const versions = typeof getVersions==="function" ? getVersions() : []; versions.unshift(p); if(typeof setVersions==="function") setVersions(versions); if(typeof renderVersions==="function") renderVersions(); const meta=document.getElementById("savedMeta"); if(meta) meta.textContent = rawName + " โ€ข " + new Date().toLocaleString(); closeSavePocModal(); if(typeof toastMsg==="function") toastMsg("POC exported and saved."); return true; }catch(e){ if(e && e.name==="AbortError"){ if(typeof toastMsg==="function") toastMsg("Save cancelled."); return false; } console.error(e); alert("Save failed."); return false; } }; function bindNotesOwner(){ const t=document.getElementById("pocNotesText"); if(t && !t.__belongsToSupplyChainBound){ t.addEventListener("input", saveNotesToOwner); t.__belongsToSupplyChainBound=true; } } if(document.readyState==="loading") document.addEventListener("DOMContentLoaded", bindNotesOwner); else bindNotesOwner(); })();