asset-management/docs/asset-assignment-workflow.html

222 lines
16 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Asset Assignment Workflow — states and activities</title>
<style>
/* Workflow image source. Render: screenshot headless at 1600x1120 (2x for the PNG). */
html, body { margin: 0; background: #f3f5f8; overflow: hidden; }
body { width: 1600px; height: 1410px; box-sizing: border-box; padding: 34px 44px 26px; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: #0f172a; font-size: 13px; }
.mono { font-family: Consolas, 'Cascadia Mono', monospace; }
header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.sub { margin: 5px 0 0; color: #5b6b80; font-size: 14px; }
.legend { display: flex; gap: 8px; align-items: center; }
.legend .lbl { font-size: 10.5px; letter-spacing: 0.1em; color: #8a99ad; margin-right: 6px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-unassigned { background: #dcf0e2; color: #15803d; }
.p-assigned { background: #dde5fb; color: #1d4ed8; }
.p-pending { background: #fbeed4; color: #b45309; }
.p-deleted { background: #fadedd; color: #b91c1c; }
.section { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a99ad; font-weight: 600; margin: 0 0 6px; }
svg { display: block; font-family: 'Segoe UI', system-ui, sans-serif; }
/* swimlane grid */
.grid { display: grid; grid-template-columns: 150px repeat(6, 1fr); border-top: 2px solid #b7c2cf; margin-top: 16px; }
.grid > div { border-bottom: 1px solid #d5dce5; border-right: 1px solid #e3e8ee; padding: 9px 10px; min-height: 0; }
.grid > div:nth-child(7n) { border-right: 0; }
.colhead { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; padding-block: 8px !important; }
.colhead .n { width: 20px; height: 20px; border-radius: 50%; background: #111c2e; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.rowhead { font-weight: 600; font-size: 13px; }
.rowhead small { display: block; font-weight: 400; color: #8a99ad; font-size: 11px; margin-top: 2px; }
.act { background: #fff; border: 1px solid #c9d2dd; border-radius: 6px; padding: 7px 9px; font-size: 12px; line-height: 1.35; }
.act b { display: block; font-size: 12.5px; margin-bottom: 1px; }
.act .d { color: #5b6b80; }
.stack { display: grid; gap: 5px; }
.act.assign { border-color: #1d4ed8; border-left-width: 3px; }
.act.reassign { border-color: #15803d; border-left-width: 3px; }
.act.delete { border-color: #b91c1c; border-left-width: 3px; }
.act.sys { background: #eef2f6; border-color: #c9d2dd; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; margin-right: 4px; }
.tag.assign { color: #1d4ed8; } .tag.reassign { color: #15803d; } .tag.delete { color: #b91c1c; }
.none { color: #b7c2cf; font-size: 12px; font-style: italic; padding-top: 6px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1.5px solid currentColor; white-space: nowrap; }
.state .mono { font-weight: 400; font-size: 11px; opacity: .85; }
.staterow { display: grid; gap: 5px; align-content: start; }
.arrow { color: #8a99ad; font-size: 12px; }
footer { margin-top: 12px; display: flex; justify-content: space-between; font-size: 12.5px; color: #5b6b80; }
footer b { color: #0f172a; }
</style>
</head>
<body>
<header>
<div>
<h1>Asset Assignment Workflow</h1>
<p class="sub">States an Assigned Asset can be in, and the activities the Asset Manager, the System and the Employee perform to move it between them.</p>
</div>
<div class="legend">
<span class="lbl">ASSET STATE</span>
<span class="pill p-unassigned"><i></i>Unassigned</span>
<span class="pill p-assigned"><i></i>Assigned</span>
<span class="pill p-pending"><i></i>Pending acknowledgement</span>
<span class="pill p-deleted"><i></i>Deleted</span>
</div>
</header>
<p class="section">States · boxes are the four states, arrows are the activities that change state</p>
<svg viewBox="0 0 1512 330" width="1512" height="330" role="img" aria-label="Asset state machine">
<defs>
<marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M0 0 L10 5 L0 10 Z" fill="#475569"/></marker>
</defs>
<!-- start -->
<circle cx="48" cy="180" r="8" fill="#475569"/>
<line x1="56" y1="180" x2="198" y2="180" stroke="#475569" stroke-width="2" marker-end="url(#m)"/>
<text x="125" y="168" text-anchor="middle" font-size="12.5" font-weight="700" fill="#0f172a">Asset registered</text>
<text x="125" y="200" text-anchor="middle" font-size="11.5" fill="#8a99ad" font-family="Consolas, monospace">asset tag issued</text>
<!-- Unassigned -->
<rect x="200" y="142" width="200" height="76" rx="8" fill="#dcf0e2" stroke="#15803d" stroke-width="2"/>
<text x="300" y="174" text-anchor="middle" font-size="17" font-weight="700" fill="#15803d" font-family="Consolas, monospace">Unassigned</text>
<text x="300" y="198" text-anchor="middle" font-size="12" fill="#15803d" font-family="Consolas, monospace">in stock · no employee</text>
<!-- Assign -> Pending -->
<line x1="400" y1="180" x2="558" y2="180" stroke="#475569" stroke-width="2" marker-end="url(#m)"/>
<text x="480" y="166" text-anchor="middle" font-size="12.5" font-weight="700" fill="#0f172a">Assign</text>
<text x="480" y="200" text-anchor="middle" font-size="11" fill="#8a99ad" font-family="Consolas, monospace">manager picks employee</text>
<!-- Pending -->
<rect x="560" y="142" width="220" height="76" rx="8" fill="#fbeed4" stroke="#b45309" stroke-width="2"/>
<text x="670" y="174" text-anchor="middle" font-size="17" font-weight="700" fill="#b45309" font-family="Consolas, monospace">Pending ack.</text>
<text x="670" y="198" text-anchor="middle" font-size="12" fill="#b45309" font-family="Consolas, monospace">waiting for employee</text>
<!-- Pending -> Assigned -->
<line x1="780" y1="180" x2="938" y2="180" stroke="#475569" stroke-width="2" marker-end="url(#m)"/>
<text x="860" y="166" text-anchor="middle" font-size="12.5" font-weight="700" fill="#0f172a">Acknowledge</text>
<text x="860" y="200" text-anchor="middle" font-size="11" fill="#8a99ad" font-family="Consolas, monospace">employee accepts</text>
<!-- Pending -> Unassigned (declined) : inner arc above -->
<path d="M670 142 C670 90, 360 90, 360 140" fill="none" stroke="#475569" stroke-width="1.5" stroke-dasharray="5 4" marker-end="url(#m)"/>
<text x="480" y="128" text-anchor="middle" font-size="11" fill="#5b6b80" font-family="Consolas, monospace">Declined / no reply in 3 days</text>
<!-- Assigned -->
<rect x="940" y="134" width="270" height="92" rx="8" fill="#dde5fb" stroke="#1d4ed8" stroke-width="2"/>
<text x="1075" y="164" text-anchor="middle" font-size="17" font-weight="700" fill="#1d4ed8" font-family="Consolas, monospace">Assigned</text>
<text x="1075" y="186" text-anchor="middle" font-size="12" fill="#1d4ed8" font-family="Consolas, monospace">Employee Name · Employee ID</text>
<text x="1075" y="206" text-anchor="middle" font-size="12" fill="#1d4ed8" font-family="Consolas, monospace">assigned on · by Asset Manager</text>
<!-- Reassign self-loop -->
<path d="M1020 226 C1020 282, 1130 282, 1130 228" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#m)"/>
<text x="1075" y="300" text-anchor="middle" font-size="12.5" font-weight="700" fill="#0f172a">Reassign</text>
<text x="1075" y="318" text-anchor="middle" font-size="11.5" fill="#8a99ad" font-family="Consolas, monospace">new Employee Name / ID · both notified · stays Assigned</text>
<!-- Assigned -> Unassigned (Delete: returned to stock) outer arc above -->
<path d="M1075 134 C1075 40, 260 40, 260 140" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#m)"/>
<text x="668" y="40" text-anchor="middle" font-size="12.5" font-weight="700" fill="#0f172a">Delete · reason = Returned to stock</text>
<text x="668" y="56" text-anchor="middle" font-size="11.5" fill="#8a99ad" font-family="Consolas, monospace">asset removed from employee, back in pool</text>
<!-- Assigned -> Deleted -->
<line x1="1210" y1="180" x2="1370" y2="180" stroke="#475569" stroke-width="2" marker-end="url(#m)"/>
<text x="1290" y="166" text-anchor="middle" font-size="12.5" font-weight="700" fill="#0f172a">Delete</text>
<text x="1290" y="200" text-anchor="middle" font-size="11" fill="#8a99ad" font-family="Consolas, monospace">Lost · Damaged</text>
<text x="1290" y="214" text-anchor="middle" font-size="11" fill="#8a99ad" font-family="Consolas, monospace">Retired</text>
<!-- Deleted -->
<rect x="1372" y="142" width="132" height="76" rx="8" fill="#fadedd" stroke="#b91c1c" stroke-width="2"/>
<rect x="1377" y="147" width="122" height="66" rx="5" fill="none" stroke="#b91c1c" stroke-width="1"/>
<text x="1438" y="174" text-anchor="middle" font-size="17" font-weight="700" fill="#b91c1c" font-family="Consolas, monospace">Deleted</text>
<text x="1438" y="198" text-anchor="middle" font-size="11.5" fill="#b91c1c" font-family="Consolas, monospace">soft · kept in log</text>
</svg>
<p class="section" style="margin-top:14px">Activities · who does what, in order, and the asset state after each step</p>
<div class="grid">
<div class="colhead" style="color:#8a99ad;font-size:11px;letter-spacing:.08em">LANE</div>
<div class="colhead"><span class="n">1</span>Find employee</div>
<div class="colhead"><span class="n">2</span>View assigned assets</div>
<div class="colhead"><span class="n">3</span>Choose activity</div>
<div class="colhead"><span class="n">4</span>Fill details</div>
<div class="colhead"><span class="n">5</span>Confirm &amp; apply</div>
<div class="colhead"><span class="n">6</span>Close out</div>
<!-- Asset Manager -->
<div class="rowhead">Asset Manager<small>owns every decision</small></div>
<div><div class="act"><b>Search employee</b><span class="d">by Employee Name or Employee ID</span></div></div>
<div><div class="act"><b>Open profile</b><span class="d">reads Name · ID · Assigned Asset list</span></div></div>
<div><div class="stack">
<div class="act assign"><span class="tag assign">ASSIGN</span><b>Click “Assign asset”</b><span class="d">button on the profile header</span></div>
<div class="act reassign"><span class="tag reassign">REASSIGN</span><b>Click “Reassign” on an asset row</b></div>
<div class="act delete"><span class="tag delete">DELETE</span><b>Click “Delete” on an asset row</b></div>
</div></div>
<div><div class="stack">
<div class="act assign"><b>Pick asset from pool</b><span class="d">only Unassigned assets offered · assigned-on date · condition</span></div>
<div class="act reassign"><b>Pick new employee</b><span class="d">search Name / ID · must be active · transfer date</span></div>
<div class="act delete"><b>Pick a reason</b><span class="d">Returned to stock · Lost · Damaged · Retired</span></div>
</div></div>
<div><div class="stack">
<div class="act assign"><b>Confirm assignment</b><span class="d">summary: asset → employee</span></div>
<div class="act reassign"><b>Confirm transfer</b><span class="d">summary: from → to · date</span></div>
<div class="act delete"><b>Type asset tag to confirm</b><span class="d">guards against accidental delete</span></div>
</div></div>
<div><div class="act"><b>Sees refreshed profile</b><span class="d">updated Assigned Asset list + history entry</span></div></div>
<!-- System -->
<div class="rowhead">System<small>validates · writes · notifies</small></div>
<div><div class="act sys"><b>Match employee</b><span class="d">exact ID or name search</span></div></div>
<div><div class="act sys"><b>Load assigned assets</b><span class="d">type · tag · assigned on · assigned by</span></div></div>
<div><div class="act sys"><b>Show only valid actions</b><span class="d">Reassign / Delete only on assets in state Assigned</span></div></div>
<div><div class="stack">
<div class="act sys"><span class="tag assign">ASSIGN</span><b>Validate asset is Unassigned</b></div>
<div class="act sys"><span class="tag reassign">REASSIGN</span><b>Validate new employee is active</b><span class="d">and not the current holder</span></div>
<div class="act sys"><span class="tag delete">DELETE</span><b>Require reason</b></div>
</div></div>
<div><div class="stack">
<div class="act sys"><span class="tag assign">ASSIGN</span><b>Set Pending ack. · notify employee</b></div>
<div class="act sys"><span class="tag reassign">REASSIGN</span><b>Move asset to new employee</b><span class="d">never unassigned in between · notify both</span></div>
<div class="act sys"><span class="tag delete">DELETE</span><b>Remove from employee</b><span class="d">Returned → Unassigned · else → Deleted</span></div>
</div></div>
<div><div class="act sys"><b>Write history entry</b><span class="d">who · what · when · reason · from → to. Append only, never edited.</span></div></div>
<!-- Employee -->
<div class="rowhead">Employee<small>Name · ID on record</small></div>
<div class="none">—</div>
<div class="none">—</div>
<div class="none">—</div>
<div class="none">—</div>
<div><div class="stack">
<div class="act assign"><span class="tag assign">ASSIGN</span><b>Acknowledge receipt</b><span class="d">email / in-app · Pending → Assigned</span></div>
<div class="act reassign"><span class="tag reassign">REASSIGN</span><b>Old holder hands over · new holder acknowledges</b></div>
<div class="act delete"><span class="tag delete">DELETE</span><b>Gets notified</b><span class="d">nothing to do</span></div>
</div></div>
<div><div class="act"><b>Sees own asset list updated</b><span class="d">in employee view</span></div></div>
<!-- Asset state -->
<div class="rowhead">Asset state<small>after the step</small></div>
<div class="staterow"><span class="state" style="color:#1d4ed8;background:#dde5fb">Assigned <span class="mono">unchanged</span></span></div>
<div class="staterow"><span class="state" style="color:#1d4ed8;background:#dde5fb">Assigned <span class="mono">unchanged</span></span></div>
<div class="staterow"><span class="state" style="color:#1d4ed8;background:#dde5fb">Assigned <span class="mono">unchanged</span></span></div>
<div class="staterow"><span class="state" style="color:#1d4ed8;background:#dde5fb">Assigned <span class="mono">unchanged</span></span></div>
<div class="staterow">
<span class="state" style="color:#b45309;background:#fbeed4"><span class="tag assign">ASSIGN</span>Pending ack.</span>
<span class="state" style="color:#1d4ed8;background:#dde5fb"><span class="tag reassign">REASSIGN</span>Assigned <span class="mono">new holder</span></span>
<span class="state" style="color:#15803d;background:#dcf0e2"><span class="tag delete">DELETE</span>Unassigned <span class="mono">returned</span></span>
<span class="state" style="color:#b91c1c;background:#fadedd"><span class="tag delete">DELETE</span>Deleted <span class="mono">lost · damaged · retired</span></span>
</div>
<div class="staterow">
<span class="state" style="color:#1d4ed8;background:#dde5fb"><span class="tag assign">ASSIGN</span>Assigned <span class="mono">after ack.</span></span>
<span class="state" style="color:#1d4ed8;background:#dde5fb"><span class="tag reassign">REASSIGN</span>Assigned</span>
<span class="state" style="color:#15803d;background:#dcf0e2"><span class="tag delete">DELETE</span>Unassigned</span>
<span class="state" style="color:#b91c1c;background:#fadedd"><span class="tag delete">DELETE</span>Deleted <span class="mono">terminal</span></span>
</div>
</div>
<footer>
<span><b>Rule of the system:</b> an asset has exactly one state and at most one employee at a time; every state change writes exactly one history row.</span>
<span>Rev 0.2 · 16 Sep 2026 · mock data</span>
</footer>
</body>
</html>