PromptBase
PromptBase SelectGet Select
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
(claude-5-5-sonnet)
Token size
856
Example input
[WHO_OPENS_IT]: Our two mechanics and whoever is on the counter. It goes on the workshop screen. [HOUSE_COLOURS]: Charcoal with a signal yellow, which is what the shop front is. [QUESTIONS_IT_MUST_ANSWER]: What is sitting in the workshop waiting on a part. Which jobs have been open more than ten days. How much work each mechanic has on. Whether we are quoting hours accurately. [DATA_ROWS]: job_no,booked_in,bike,work,mechanic,hours_quoted,hours_actual,status,waiting_on; J1041,2026-09-02,Giant Defy,full service,Dev,2.0,2.5,done,; J1042,2026-09-02,Brompton M6L,hub rebuild,Ash,3.0,4.5,done,; J1043,2026-09-04,Trek Marlin,brake bleed,Dev,0.75,0.75,done,; J1044,2026-09-05,Cannondale Topstone,wheel build rear,Ash,2.5,,waiting,rim; J1045,2026-09-08,Specialized Allez,gear index,Dev,0.5,0.5,done,; J1046,2026-09-09,Ribble CGR,bottom bracket,Ash,1.5,2.0,done,; J1047,2026-09-11,Dawes Galaxy,full service,Dev,2.0,3.25,done,; J1048,2026-09-12,Orbea Gain,motor diagnostic,Ash,1.0,,waiting,dealer response; J1049,2026-09-15,Kona Rove,tubeless setup,Dev,1.0,1.25,done,; J1050,2026-09-16,Giant Escape,full service,Dev,2.0,2.0,done,; J1051,2026-09-18,Pinnacle Laterite,fork service,Ash,2.0,,in progress,; J1052,2026-09-19,Raleigh Pioneer,wheel true front,Dev,0.5,0.5,done,; J1053,2026-09-22,Surly Disc Trucker,full build,Ash,4.0,,waiting,headset; J1054,2026-09-23,Carrera Vengeance,brake pads,Dev,0.5,0.4,done,; J1055,2026-09-25,Bianchi Via Nirone,chainset swap,Ash,1.5,1.75,done,; J1056,2026-09-26,Whyte Portobello,gear cable,Dev,0.75,1.0,done,; J1057,2026-09-29,Genesis Croix de Fer,full service,Ash,2.0,,in progress,; J1058,2026-09-30,Trek Domane,wheel build pair,Dev,5.0,,waiting,spokes; J1059,2026-10-01,Marin Nicasio,puncture,Dev,0.25,0.25,done,; J1060,2026-10-02,Cube Aim,full service,Ash,2.0,,in progress,
Example output
## 1. THE PAGE ```html <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Workshop jobs board</title> <style> :root{ color-scheme: light dark; --bg:#e9e7e1; --panel:#fbfaf6; --ink:#1f2224; --ink2:#4f545a; --rule:#cdcac1; --accent:#ffd400; --mark2:#8d939a; --markline:#1f2224; } @media (prefers-color-scheme: dark){ :root{ --bg:#16181a; --panel:#222527; --ink:#f2f1eb; --ink2:#a9adb2; --rule:#3b3f43; --mark2:#6d737a; --markline:#16181a; } } *{box-sizing:border-box} html,body{margin:0} body{background:var(--bg);color:var(--ink);font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;padding:16px 16px 60px} .wrap{max-width:1400px;margin:0 auto} h1{font-size:26px;margin:0 0 2px} h2{font-size:18px;margin:0 0 2px} .sub{color:var(--ink2);margin:0 0 12px;font-size:14px} .grid{display:grid;gap:16px;grid-template-columns:minmax(0,1fr);margin-top:16px} @media (min-width:1000px){ .grid{grid-template-columns:repeat(2,minmax(0,1fr))} .wide{grid-column:1/-1} } .panel{background:var(--panel);border:1px solid var(--rule);border-radius:8px;padding:16px;min-width:0} .controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;align-items:end} .controls label{display:block;font-size:13px;color:var(--ink2);margin-bottom:4px} select,input,button{font:inherit;color:var(--ink);background:var(--bg);border:1px solid var(--rule);border-radius:6px;padding:8px;width:100%;min-height:40px;min-width:0} button{cursor:pointer;font-weight:600} :focus-visible{outline:3px solid var(--ink);outline-offset:2px} .countline{margin:12px 0 0;font-size:17px} .countline .ex{color:var(--ink2);margin-left:12px} .kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px} .kpi{background:var(--panel);border:1px solid var(--rule);border-radius:8px;padding:12px} .kpi b{display:block;font-size:34px;line-height:1.1} .kpi span{font-size:13px;color:var(--ink2)} .scroll{overflow-x:auto} table{border-collapse:collapse;width:100%;font-size:15px} th,td{text-align:left;padding:6px 10px;border-bottom:1px solid var(--rule);white-space:nowrap} th{font-size:13px;color:var(--ink2);font-weight:600} .nis{color:var(--ink2);font-size:11px;letter-spacing:.03em} .empty,.note{color:var(--ink2);font-size:14px;margin:8px 0 0} .legend{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:13px;color:var(--ink2);margin:6px 0 8px} .sw{display:inline-block;width:12px;height:12px;border:1.5px solid var(--markline);border-radius:50%;vertical-align:-1px;margin-right:5px} .sw.a{background:var(--accent)} .sw.b{background:var(--mark2)} svg{display:block;max-width:100%} svg text{fill:var(--ink);font-size:13px;font-family:inherit} svg .s{fill:var(--ink2);font-size:12px} svg .b{font-weight:700} svg .rule{stroke:var(--rule);stroke-width:2} svg .axis{stroke:var(--ink2);stroke-width:1} footer{position:fixed;left:0;right:0;bottom:0;background:var(--panel);border-top:1px solid var(--rule);padding:8px 16px;font-size:13px;color:var(--ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} </style> </head> <body> <div class="wrap"> <h1>Workshop jobs board</h1> <p class="sub" id="period"></p> <section class="panel" aria-label="Filters"> <div class="controls"> <div><label for="fMech">Mechanic</label><select id="fMech"><option value="">All</option></select></div> <div><label for="fStatus">Status</label><select id="fStatus"><option value="">All</option></select></div> <div><label for="fFrom">Booked in from</label><input type="date" id="fFrom"></div> <div><label for="fTo">Booked in to</label><input type="date" id="fTo"></div> <div><label for="fSort">Sort by</label> <select id="fSort"> <option value="booked_in">booked_in</option> <option value="job_no">job_no</option> <option value="mechanic">mechanic</option> <option value="status">status</option> <option value="hours_quoted">hours_quoted</option> <option value="hours_actual">hours_actual</option> </select></div> <div><label for="fDir">Order</label> <select id="fDir"><option value="asc">Low to high / A to Z</option><option value="desc">High to low / Z to A</option></select></div> <div><button type="button" id="fReset">Reset filters</button></div> </div> <p class="countline" id="count" aria-live="polite"></p> </section> <div class="kpis" id="kpis" style="margin-top:16px"></div> <div class="grid"> <section class="panel wide"> <h2>Waiting <span id="waitCount"></span></h2> <p class="sub">Every job whose status is waiting, with the waiting_on text exactly as entered.</p> <div class="scroll" id="waitList"></div> </section> <section class="panel"> <h2>Open jobs by booking date</h2> <p class="sub">Open means status is not done. One lane per mechanic, placed by booked_in. Days open cannot be worked out from these rows.</p> <div class="legend"><span><i class="sw a"></i>waiting</span><span><i class="sw b"></i>any other open status</span></div> <div id="timeline"></div> </section> <section class="panel"> <h2>Work on, by mechanic</h2> <p class="sub">Hours quoted on each mechanic's open jobs. This is quoted time, not time left.</p> <div class="legend"><span><i class="sw a"></i>waiting</span><span><i class="sw b"></i>any other open status</span></div> <div id="workload"></div> <p class="note" id="workNote"></p> </section> <section class="panel wide"> <h2>Quoting: actual against quoted</h2> <p class="sub">Each bar is hours_actual minus hours_quoted for one job. Yellow means it ran over the quote.</p> <div id="quoteSummary"></div> <div class="scroll" id="quoteMech" style="margin:8px 0"></div> <div id="quoteChart"></div> <p class="note" id="quoteNote"></p> </section> <section class="panel wide"> <h2>All rows in the current filter</h2> <p class="sub">Empty cells read NOT IN THE SUPPLIED DATA.</p> <div class="scroll" id="tbl"></div> </section> </div> </div> <footer>Data source: SOURCE NOT STATED</footer> <script> const ROWS = [ {job_no:"J1041",booked_in:"2026-09-02",bike:"Giant Defy",work:"full service",mechanic:"Dev",hours_quoted:"2.0",hours_actual:"2.5",status:"done",waiting_on:""}, {job_no:"J1042",booked_in:"2026-09-02",bike:"Brompton M6L",work:"hub rebuild",mechanic:"Ash",hours_quoted:"3.0",hours_actual:"4.5",status:"done",waiting_on:""}, {job_no:"J1043",booked_in:"2026-09-04",bike:"Trek Marlin",work:"brake bleed",mechanic:"Dev",hours_quoted:"0.75",hours_actual:"0.75",status:"done",waiting_on:""}, {job_no:"J1044",booked_in:"2026-09-05",bike:"Cannondale Topstone",work:"wheel build rear",mechanic:"Ash",hours_quoted:"2.5",hours_actual:"",status:"waiting",waiting_on:"rim"}, {job_no:"J1045",booked_in:"2026-09-08",bike:"Specialized Allez",work:"gear index",mechanic:"Dev",hours_quoted:"0.5",hours_actual:"0.5",status:"done",waiting_on:""}, {job_no:"J1046",booked_in:"2026-09-09",bike:"Ribble CGR",work:"bottom bracket",mechanic:"Ash",hours_quoted:"1.5",hours_actual:"2.0",status:"done",waiting_on:""}, {job_no:"J1047",booked_in:"2026-09-11",bike:"Dawes Galaxy",work:"full service",mechanic:"Dev",hours_quoted:"2.0",hours_actual:"3.25",status:"done",waiting_on:""}, {job_no:"J1048",booked_in:"2026-09-12",bike:"Orbea Gain",work:"motor diagnostic",mechanic:"Ash",hours_quoted:"1.0",hours_actual:"",status:"waiting",waiting_on:"dealer response"}, {job_no:"J1049",booked_in:"2026-09-15",bike:"Kona Rove",work:"tubeless setup",mechanic:"Dev",hours_quoted:"1.0",hours_actual:"1.25",status:"done",waiting_on:""}, {job_no:"J1050",booked_in:"2026-09-16",bike:"Giant Escape",work:"full service",mechanic:"Dev",hours_quoted:"2.0",hours_actual:"2.0",status:"done",waiting_on:""}, {job_no:"J1051",booked_in:"2026-09-18",bike:"Pinnacle Laterite",work:"fork service",mechanic:"Ash",hours_quoted:"2.0",hours_actual:"",status:"in progress",waiting_on:""}, {job_no:"J1052",booked_in:"2026-09-19",bike:"Raleigh Pioneer",work:"wheel true front",mechanic:"Dev",hours_quoted:"0.5",hours_actual:"0.5",status:"done",waiting_on:""}, {job_no:"J1053",booked_in:"2026-09-22",bike:"Surly Disc Trucker",work:"full build",mechanic:"Ash",hours_quoted:"4.0",hours_actual:"",status:"waiting",waiting_on:"headset"}, {job_no:"J1054",booked_in:"2026-09-23",bike:"Carrera Vengeance",work:"brake pads",mechanic:"Dev",hours_quoted:"0.5",hours_actual:"0.4",status:"done",waiting_on:""}, {job_no:"J1055",booked_in:"2026-09-25",bike:"Bianchi Via Nirone",work:"chainset swap",mechanic:"Ash",hours_quoted:"1.5",hours_actual:"1.75",status:"done",waiting_on:""}, {job_no:"J1056",booked_in:"2026-09-26",bike:"Whyte Portobello",work:"gear cable",mechanic:"Dev",hours_quoted:"0.75",hours_actual:"1.0",status:"done",waiting_on:""}, {job_no:"J1057",booked_in:"2026-09-29",bike:"Genesis Croix de Fer",work:"full service",mechanic:"Ash",hours_quoted:"2.0",hours_actual:"",status:"in progress",waiting_on:""}, {job_no:"J1058",booked_in:"2026-09-30",bike:"Trek Domane",work:"wheel build pair",mechanic:"Dev",hours_quoted:"5.0",hours_actual:"",status:"waiting",waiting_on:"spokes"}, {job_no:"J1059",booked_in:"2026-10-01",bike:"Marin Nicasio",work:"puncture",mechanic:"Dev",hours_quoted:"0.25",hours_actual:"0.25",status:"done",waiting_on:""}, {job_no:"J1060",booked_in:"2026-10-02",bike:"Cube Aim",work:"full service",mechanic:"Ash",hours_quoted:"2.0",hours_actual:"",status:"in progress",waiting_on:""} ]; const NIS = "NOT IN THE SUPPLIED DATA"; const COLS = ["job_no","booked_in","bike","work","mechanic","hours_quoted","hours_actual","status","waiting_on"]; const $ = id => document.getElementById(id); const num = v => v === "" ? null : Number(v); const fmt = n => String(Math.round(n * 100) / 100); const esc = s => String(s).replace(/[&<>"]/g, c => ({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[c])); const cell = v => v === "" ? '<span class="nis">' + NIS + '</span>' : esc(v); const isOpen = r => r.status !== "done"; const dayNo = s => Date.UTC(+s.slice(0,4), +s.slice(5,7) - 1, +s.slice(8,10)) / 864e5; const uniq = a => [...new Set(a)].sort(); const state = {mech:"", status:"", from:"", to:"", sort:"booked_in", dir:"asc"}; function getRows(){ const r = ROWS.filter(x => (!state.mech || x.mechanic === state.mech) && (!state.status || x.status === state.status) && (!state.from || x.booked_in >= state.from) && (!state.to || x.booked_in <= state.to)); const k = state.sort, s = state.dir === "asc" ? 1 : -1; const numeric = k === "hours_quoted" || k === "hours_actual"; r.sort((a, b) => { if (numeric){ const x = num(a[k]), y = num(b[k]); if (x === null && y === null) return a.job_no.localeCompare(b.job_no); if (x === null) return 1; if (y === null) return -1; return (x - y) * s || a.job_no.localeCompare(b.job_no); } return a[k].localeCompare(b[k]) * s || a.job_no.localeCompare(b.job_no); }); return r; } function head(rows){ const ex = ROWS.length - rows.length; $("count").innerHTML = '<strong>Showing ' + rows.length + ' of ' + ROWS.length + ' rows</strong><span class="ex">' + ex + ' excluded by the current filters</span>'; const d = rows.map(r => r.booked_in).sort(); $("period").textContent = d.length ? "Jobs booked in " + d[0] + " to " + d[d.length - 1] : "No rows in the current filters"; const open = rows.filter(isOpen).length; const waiting = rows.filter(r => r.status === "waiting").length; const done = rows.filter(r => r.status === "done").length; const tile = (n, l) => '<div class="kpi"><b>' + n + '</b><span>' + l + '</span></div>'; $("kpis").innerHTML = tile(rows.length, "rows shown") + tile(ex, "rows excluded") + tile(open, "open (status not done)") + tile(waiting, "waiting") + tile(done, "done"); } function waitingPanel(rows){ const w = rows.filter(r => r.status === "waiting"); $("waitCount").textContent = "(" + w.length + ")"; if (!w.length){ $("waitList").innerHTML = '<p class="empty">No waiting jobs in the current filters.</p>'; return; } $("waitList").innerHTML = '<table><thead><tr><th>job_no</th><th>bike</th><th>work</th><th>mechanic</th><th>booked_in</th><th>waiting_on</th></tr></thead><tbody>' + w.map(r => '<tr><td>' + cell(r.job_no) + '</td><td>' + cell(r.bike) + '</td><td>' + cell(r.work) + '</td><td>' + cell(r.mechanic) + '</td><td>' + cell(r.booked_in) + '</td><td><strong>' + cell(r.waiting_on) + '</strong></td></tr>').join("") + '</tbody></table>'; } function timeline(rows){ const box = $("timeline"), open = rows.filter(isOpen), W = box.clientWidth || 320; if (!open.length){ box.innerHTML = '<p class="empty">No open jobs in the current filters.</p>'; return; } const mechs = uniq(open.map(r => r.mechanic)); const ds = open.map(r => dayNo(r.booked_in)), lo = Math.min(...ds), hi = Math.max(...ds); const dates = open.map(r => r.booked_in).sort(); const padL = 52, padR = 30, laneH = 84, top = 8, H = top + mechs.length * laneH + 22; const x = d => hi === lo ? (padL + W - padR) / 2 : padL + (d - lo) / (hi - lo) * (W - padL - padR); let s = '<svg viewBox="0 0 ' + W + ' ' + H + '" width="' + W + '" height="' + H + '" role="img" aria-label="Open jobs placed by booking date, one lane per mechanic">'; mechs.forEach((m, i) => { const cy = top + i * laneH + laneH / 2; s += '<text x="0" y="' + (cy + 4) + '" class="b">' + esc(m) + '</text><line class="rule" x1="' + padL + '" x2="' + (W - padR) + '" y1="' + cy + '" y2="' + cy + '"/>'; open.filter(r => r.mechanic === m).sort((a, b) => a.booked_in.localeCompare(b.booked_in)).forEach((r, j) => { const cx = x(dayNo(r.booked_in)), ty = j % 2 === 0 ? cy - 30 : cy + 22; const fill = r.status === "waiting" ? "var(--accent)" : "var(--mark2)"; s += '<g><title>' + esc(r.job_no + " " + r.bike + ", " + r.work + ", booked_in " + r.booked_in + ", " + r.status) + '</title>' + '<circle cx="' + cx + '" cy="' + cy + '" r="8" fill="' + fill + '" stroke="var(--markline)" stroke-width="1.5"/>' + '<text x="' + cx + '" y="' + ty + '" text-anchor="middle">' + esc(r.job_no) + '</text>' + '<text x="' + cx + '" y="' + (ty + 14) + '" text-anchor="middle" class="s">' + esc(r.booked_in.slice(5)) + '</text></g>'; }); }); s += '<text x="' + padL + '" y="' + (H - 4) + '" class="s">' + esc(dates[0]) + '</text><text x="' + (W - padR) + '" y="' + (H - 4) + '" text-anchor="end" class="s">' + esc(dates[dates.length - 1]) + '</text></svg>'; box.innerHTML = s; } function workload(rows){ const box = $("workload"), W = box.clientWidth || 320; if (!rows.length){ box.innerHTML = '<p class="empty">No rows in the current filters.</p>'; $("workNote").textContent = ""; return; } const mechs = uniq(rows.map(r => r.mechanic)); const data = mechs.map(m => { const o = rows.filter(r => r.mechanic === m && isOpen(r)); const q = o.filter(r => num(r.hours_quoted) !== null); const w = q.filter(r => r.status === "waiting").reduce((a, r) => a + num(r.hours_quoted), 0); const p = q.filter(r => r.status !== "waiting").reduce((a, r) => a + num(r.hours_quoted), 0); return {m, jobs:o.length, skip:o.length - q.length, w, p}; }); const max = Math.max(...data.map(d => d.w + d.p), 0.0001), bw = W - 4, rowH = 58; let s = '<svg viewBox="0 0 ' + W + ' ' + (data.length * rowH) + '" width="' + W + '" height="' + (data.length * rowH) + '" role="img" aria-label="Hours quoted on open jobs for each mechanic">'; data.forEach((d, i) => { const y = i * rowH, ww = d.w / max * bw, pw = d.p / max * bw; s += '<text x="2" y="' + (y + 16) + '"><tspan class="b">' + esc(d.m) + '</tspan> · ' + fmt(d.w + d.p) + ' h quoted · ' + d.jobs + ' open job' + (d.jobs === 1 ? '' : 's') + '</text>'; if (ww > 0) s += '<rect x="2" y="' + (y + 24) + '" width="' + ww + '" height="22" fill="var(--accent)" stroke="var(--markline)" stroke-width="1.5"><title>' + esc(d.m) + ' waiting: ' + fmt(d.w) + ' h quoted</title></rect>'; if (pw > 0) s += '<rect x="' + (2 + ww) + '" y="' + (y + 24) + '" width="' + pw + '" height="22" fill="var(--mark2)" stroke="var(--markline)" stroke-width="1.5"><title>' + esc(d.m) + ' other open: ' + fmt(d.p) + ' h quoted</title></rect>'; if (ww + pw === 0) s += '<line class="axis" x1="2" x2="2" y1="' + (y + 24) + '" y2="' + (y + 46) + '"/>'; }); box.innerHTML = s + '</svg>'; const skip = data.reduce((a, d) => a + d.skip, 0); $("workNote").textContent = "Skipped " + skip + " open row" + (skip === 1 ? "" : "s") + " with no hours_quoted. Scale runs from 0 to " + fmt(max) + " h."; } function quoting(rows){ const q = rows.filter(r => num(r.hours_quoted) !== null && num(r.hours_actual) !== null); const skipped = rows.length - q.length; $("quoteNote").textContent = "Skipped " + skipped + " of " + rows.length + " rows in the current filters: no hours_actual (or no hours_quoted)."; if (!q.length){ $("quoteSummary").innerHTML = '<p class="empty">No rows in the current filters have both hours_quoted and hours_actual.</p>'; $("quoteMech").innerHTML = ""; $("quoteChart").innerHTML = ""; return; } const v = r => num(r.hours_actual) - num(r.hours_quoted); const tq = q.reduce((a, r) => a + num(r.hours_quoted), 0), ta = q.reduce((a, r) => a + num(r.hours_actual), 0); const over = q.filter(r => v(r) > 1e-9).length, under = q.filter(r => v(r) < -1e-9).length, eq = q.length - over - under; $("quoteSummary").innerHTML = '<p style="margin:0;font-size:17px"><strong>' + q.length + ' jobs compared:</strong> ' + fmt(tq) + ' h quoted, ' + fmt(ta) + ' h actual, actual is ' + Math.round(ta / tq * 100) + '% of quoted. ' + over + ' ran over, ' + eq + ' on quote, ' + under + ' under.</p>'; const mechs = uniq(q.map(r => r.mechanic)); $("quoteMech").innerHTML = '<table><thead><tr><th>mechanic</th><th>jobs compared</th><th>hours_quoted</th><th>hours_actual</th><th>actual as % of quoted</th></tr></thead><tbody>' + mechs.map(m => { const g = q.filter(r => r.mechanic === m), a = g.reduce((x, r) => x + num(r.hours_quoted), 0), b = g.reduce((x, r) => x + num(r.hours_actual), 0); return '<tr><td>' + esc(m) + '</td><td>' + g.length + '</td><td>' + fmt(a) + '</td><td>' + fmt(b) + '</td><td>' + Math.round(b / a * 100) + '%</td></tr>'; }).join("") + '</tbody></table>'; const box = $("quoteChart"), W = box.clientWidth || 320, padL = 72, padR = 52, rowH = 40, H = 22 + q.length * rowH + 4; const vs = q.map(v), mn = Math.min(0, ...vs), mx = Math.max(0, ...vs), span = (mx - mn) || 1; const x = val => padL + (val - mn) / span * (W - padL - padR), x0 = x(0); let s = '<svg viewBox="0 0 ' + W + ' ' + H + '" width="' + W + '" height="' + H + '" role="img" aria-label="Hours actual minus hours quoted for each job">'; s += '<text x="' + (x0 - 4) + '" y="12" text-anchor="end" class="s">under quote</text><text x="' + (x0 + 4) + '" y="12" class="s">over quote</text>'; q.forEach((r, i) => { const d = v(r), y = 22 + i * rowH, xv = x(d), w = Math.max(Math.abs(xv - x0), 2); const fill = d > 1e-9 ? "var(--accent)" : "var(--mark2)"; const lbl = d > 1e-9 ? "+" + fmt(d) + " h" : d < -1e-9 ? fmt(d) + " h" : "0 h"; s += '<text x="' + Math.min(x0, 6) + '" y="' + (y + 12) + '" class="s">' + esc(r.job_no + " · " + r.bike + " · " + r.work) + '</text>'; s += '<rect x="' + Math.min(x0, xv) + '" y="' + (y + 18) + '" width="' + w + '" height="14" fill="' + fill + '" stroke="var(--markline)" stroke-width="1.5"><title>' + esc(r.job_no + ": quoted " + r.hours_quoted + " h, actual " + r.hours_actual + " h") + '</title></rect>'; if (d < -1e-9) s += '<text x="' + (xv - 4) + '" y="' + (y + 30) + '" text-anchor="end">' + lbl + '</text>'; else s += '<text x="' + ((d > 1e-9 ? xv : x0 + 2) + 4) + '" y="' + (y + 30) + '">' + lbl + '</text>'; }); s += '<line class="axis" x1="' + x0 + '" x2="' + x0 + '" y1="18" y2="' + H + '"/></svg>'; box.innerHTML = s; } function table(rows){ if (!rows.length){ $("tbl").innerHTML = '<p class="empty">No rows in the current filters.</p>'; return; } $("tbl").innerHTML = '<table><thead><tr>' + COLS.map(c => '<th>' + c + '</th>').join("") + '</tr></thead><tbody>' + rows.map(r => '<tr>' + COLS.map(c => '<td>' + cell(r[c]) + '</td>').join("") + '</tr>').join("") + '</tbody></table>'; } function render(){ const rows = getRows(); head(rows); waitingPanel(rows); timeline(rows); workload(rows); quoting(rows); table(rows); } (function init(){ uniq(ROWS.map(r => r.mechanic)).forEach(m => $("fMech").insertAdjacentHTML("beforeend", '<option value="' + esc(m) + '">' + esc(m) + '</option>')); uniq(ROWS.map(r => r.status)).forEach(m => $("fStatus").insertAdjacentHTML("beforeend", '<option value="' + esc(m) + '">' + esc(m) + '</option>')); const d = ROWS.map(r => r.booked_in).sort(); ["fFrom","fTo"].forEach(id => { $(id).min = d[0]; $(id).max = d[d.length - 1]; }); const bind = (id, key) => { const f = () => { state[key] = $(id).value; render(); }; $(id).addEventListener("input", f); $(id).addEventListener("change", f); }; bind("fMech","mech"); bind("fStatus","status"); bind("fFrom","from"); bind("fTo","to"); bind("fSort","sort"); bind("fDir","dir"); $("fReset").addEventListener("click", () => { Object.assign(state, {mech:"", status:"", from:"", to:"", sort:"booked_in", dir:"asc"}); ["fMech","fStatus","fFrom","fTo"].forEach(id => { $(id).value = ""; }); $("fSort").value = "booked_in"; $("fDir").value = "asc"; render(); }); let t; window.addEventListener("resize", () => { clearTimeout(t); t = setTimeout(render, 80); }); render(); })(); </script> </body> </html> ``` ## 2. HOW TO READ IT The row at the top says how many jobs you are looking at and how many the filters are hiding. Mechanic, status, the two booking dates and the sort change every panel at once. **Waiting** lists each waiting job with what it is waiting on, word for word. **Open jobs by booking date** puts each unfinished job on its mechanic's line by the day it was booked in, yellow for waiting and grey for in progress. **Work on, by mechanic** adds up the hours quoted on each person's unfinished jobs. **Quoting** compares hours actually taken with hours quoted on jobs that have both numbers, and a yellow bar means it ran over. Anything blank in the sheet shows as NOT IN THE SUPPLIED DATA, and the quoting and workload panels say how many rows they had to skip. ## 3. THE ARITHMETIC, WRITTEN OUT | Panel | What it counts | The expression used | Rows it skips and why | |---|---|---|---| | Rows shown | Rows passing every filter | `rows.length` after filtering on mechanic, status, `booked_in >= from`, `booked_in <= to` | None | | Rows excluded | Rows the filters hide | `20 − rows.length` | None | | Period line | Earliest and latest booking among rows shown | min and max of `booked_in` (ISO text) | None | | Open | Unfinished jobs | count of rows where `status !== "done"` (waiting and in progress) | None | | Waiting | Jobs waiting | count of rows where `status === "waiting"` | None | | Done | Finished jobs | count of rows where `status === "done"` | None | | Waiting list | Each waiting job and its `waiting_on` text | rows where `status === "waiting"`, shown as entered | None. An empty `waiting_on` would show NOT IN THE SUPPLIED DATA, and all 4 waiting rows have one. | | Open jobs by booking date | Position of each open job | x position from `booked_in` as a day number; axis ends are the earliest and latest open `booked_in` | None. It does not compute days open. | | Work on, by mechanic | Hours quoted on open jobs | per mechanic: sum of `hours_quoted` where `status !== "done"`, split into `status === "waiting"` and all other open statuses; job count is the number of open rows | Open rows with empty `hours_quoted`; none in these 20 rows. The count is shown under the chart. | | Quoting, headline | Jobs compared, hours, ratio | jobs = rows with both `hours_quoted` and `hours_actual`; totals = sums of each; ratio = `sum actual / sum quoted × 100`; over, on, under = count of `actual − quoted` greater than, equal to, less than 0 | Rows with empty `hours_actual` (or `hours_quoted`). With no filters that is 7 rows: J1044, J1048, J1051, J1053, J1057, J1058, J1060, all unfinished. The count is shown under the panel. | | Quoting, per mechanic table | Same figures per mechanic | same sums and ratio, grouped by `mechanic` | Same rows as above | | Quoting bars | One bar per compared job | `hours_actual − hours_quoted` | Same rows as above | | All rows table | Every row shown, in the chosen sort | rows after filtering and sorting; empty cells printed as NOT IN THE SUPPLIED DATA | None skipped. With no filters, `waiting_on` is empty in 16 rows and `hours_actual` in 7. | ## 4. WHAT THESE ROWS CANNOT TELL YOU - **What is sitting in the workshop waiting on a part.** The page only partly answers this. `waiting_on` is filled for all 4 waiting jobs, but it is free text: "dealer response" on J1048 is not a part. No column says whether a part has been ordered, when it is due or whether a wait is a part at all. It would need a part-or-not flag and an ordered or expected-date column. - **Which jobs have been open more than ten days.** The page cannot answer this. It has no current date, and it has no completed or collected date, so it cannot count days open. It would need either a date to count to or a `completed_on` column. The page lists open jobs by `booked_in` only. "Open" means a status other than done. - **How much work each mechanic has on.** The page answers this in hours quoted on open jobs only. There is no hours-spent figure for open jobs, because `hours_actual` is empty on all 7 of them. It therefore cannot show hours remaining. There is also no capacity or shift-hours column, so it cannot say whether a load is too much. - **Whether we are quoting hours accurately.** The page answers this for the 13 jobs that have both numbers. There is no column saying why a job ran over, and the 7 unfinished jobs are not covered. Columns present but too sparse to plot: - `waiting_on` has 4 of 20 cells filled. It is listed as text and not charted. - `hours_actual` has 13 of 20 cells filled. It is plotted for those 13 rows only. ## 5. BEFORE YOU FINISH I re-read the array against the paste cell by cell, with all 9 cells matching in each of the 20 rows. Every empty cell is an empty string, and the hours are kept as text exactly as pasted. - **Row count in the array:** 20. - **Column names in the array:** job_no, booked_in, bike, work, mechanic, hours_quoted, hours_actual, status, waiting_on. - **Forbidden items:** no script src, link href or fetch appears in the file.
Claude

Single File Dashboard From Your Csv

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-5-SONNET
Tested icon
Guide icon
4 examples icon
Free credits icon
Your numbers live in a CSV export and nobody opens it. Paste the rows and you get one self-contained HTML file: it opens by double-clicking, with no server, no build step and no internet. Filters, sorting and inline SVG charts, every figure computed in the page from your own rows. You also get a plain reading of each panel, a table of the arithmetic behind every number, and a list of the questions your columns cannot answer.
...more
Added 2 weeks ago
Report
Browse Marketplace