Add Micron asset picker to work package creator
Adds an optional read-only Micron asset catalog lookup for the WP creator, with searchable asset IDs, CSV import, and graceful fallback to manual asset entry when the catalog is absent or unreachable. This includes the backend /api/assets endpoint, SQL Server connector configuration, Docker network changes for outbound access, and UI updates/documentation to make the catalog read-only and clearly distinguish Micron-vetted assets from manual entries.
This commit is contained in:
@@ -645,6 +645,38 @@
|
||||
border:1px solid var(--border); border-radius:3px; }
|
||||
.pp-free .field-hint { margin-top:4px; }
|
||||
|
||||
/* ── asset picker (Micron asset catalog) ────────────────────────────────────
|
||||
A search box over a read-only catalog. Results drop below the input and are
|
||||
added to the table as rows; the catalog itself is never written to. */
|
||||
.asset-pick { position:relative; margin-bottom:10px; }
|
||||
.asset-search { width:100%; padding:8px 10px; font:inherit; font-size:13px;
|
||||
border:1px solid var(--border-strong); border-radius:4px; background:var(--surface);
|
||||
box-sizing:border-box; }
|
||||
.asset-search:focus { outline:2px solid var(--accent); outline-offset:-2px; }
|
||||
.asset-search:disabled { background:var(--surface2); color:var(--text-dim); cursor:not-allowed; }
|
||||
.asset-results { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:60;
|
||||
max-height:320px; overflow-y:auto; background:var(--surface);
|
||||
border:1px solid var(--border-strong); border-radius:4px; padding:4px 0;
|
||||
box-shadow:0 8px 24px rgba(20,30,50,.18); }
|
||||
.asset-results[hidden] { display:none; }
|
||||
.asset-result { display:flex; align-items:baseline; justify-content:space-between; gap:10px;
|
||||
width:100%; text-align:left; background:none; border:0;
|
||||
font:inherit; font-size:13px; padding:7px 12px; cursor:pointer; color:var(--text); }
|
||||
.asset-result:hover:not(:disabled) { background:var(--surface2); }
|
||||
.asset-result:disabled { cursor:default; opacity:.55; }
|
||||
.asset-result-tag { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
||||
.asset-result-add { color:var(--accent); font-size:11.5px; font-weight:700; white-space:nowrap; }
|
||||
.asset-result.is-added .asset-result-add { color:var(--text-dim); font-weight:400; }
|
||||
.asset-result-note { padding:9px 12px; font-size:12.5px; color:var(--text-muted); }
|
||||
/* Marks rows the catalog vouches for, so a manually typed asset is never
|
||||
mistaken for a looked-up one. */
|
||||
.asset-badge { display:inline-block; margin-left:6px; padding:1px 7px; border-radius:10px;
|
||||
font-size:10px; font-weight:700; letter-spacing:.02em; text-transform:uppercase;
|
||||
color:var(--accent); background:var(--accent-dim); vertical-align:middle;
|
||||
white-space:nowrap; } /* two words now — must not wrap under the asset ID */
|
||||
.asset-tag { font-weight:600; }
|
||||
.asset-empty { color:var(--text-dim); font-size:12.5px; font-style:italic; }
|
||||
|
||||
/* Critical constraint marker (from the SOP) */
|
||||
.crit-tag { display:inline-block; margin-left:6px; padding:1px 7px; border-radius:10px; font-size:10px;
|
||||
font-weight:700; letter-spacing:.02em; color:var(--red); background:var(--red-dim);
|
||||
|
||||
Reference in New Issue
Block a user