T8.5 - CR-013/D6: the material request is structure, not features

The OneNote comparison from the meeting was "word vomit"; the structure that
replaces it, built at the lightweight scope EXACTLY as approved Aug 14:

- Line items (qty, unit, description) added, edited, removed. Descriptions
  offer the D6 project list through a datalist - which is also precisely what
  keeps free text working when no list is loaded, the state every project is
  in today. Picking a listed material fills its unit; nothing locks.
- Needed-by date, requestor (the signed-in account), delivery location (T8.4's
  fields on this package, composed), and an explicit status set
  (Requested / Filled / Declined). The request rides on the package record
  (data.materialRequests) - server-persisted through the same upsert as
  everything else, never localStorage.
- Submitting notifies the warehouse owner named on the package (CR-010) - the
  routing that replaces the funnel through one person - through the T7.6 gate,
  with the count, the needed-by, the delivery location and the deep link, in
  the house convention. material_requested lands in the audit history.
- The dashboard grows a Material requests queue, filterable by status and by
  delivery location.
- The block lives inside #material-card, so the CR-006 materials toggle
  governs it with no special casing. The whole flow is driven at 390px -
  requests originate in the field.
- NO parts catalog, no inventory count, no warehouse integration - the probe
  greps the block for them.

One infrastructure bug fixed in passing detection (not silently): T8.5's
dashboard-panel insert matched the substring inside "async function
dashIssue", splitting the async keyword from its function - the creator
failed to parse and every boot died. Caught by the probe's first run;
anchored fixes now restore both halves.

Verification (each probe run alone): NEW tests/mreq_check.py 19/19 (request
end-to-end at 390px against the SMTP sink, dashboard filters, fences).
Regressions: frame_check 39/39, sections_check 95/95, kitting_check 26/26.

Items: CR-013, D6

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 12:33:34 -07:00
parent 190144c539
commit 898e5dab94
6 changed files with 429 additions and 0 deletions

View File

@@ -348,6 +348,28 @@
<button class="add-btn" onclick="downloadMaterialTemplate()">⤓ Download template</button>
<input type="file" id="material-import" accept=".csv,.xlsx,.xls" style="display:none" onchange="importMaterials(event)">
</div>
<!-- MATERIAL REQUESTS (CR-013 / D6, T8.5). The lightweight scope, exactly:
line items, needed-by, requestor, delivery (T8.4's fields on this
package), status. Items pick from the project material list through
the datalist when one exists and stay free text when it does not.
No catalog, no inventory, no warehouse integration. -->
<div style="margin-top:1.5rem; border-top:1px solid var(--border); padding-top:1rem;">
<div class="sub-heading">Material Requests<span class="help-tip" data-tip="Field requests for material against this package. Submitting notifies the warehouse owner named above (CR-010). Delivery uses this package's delivery location.">i</span></div>
<div id="mreq-list" class="mreq-list"></div>
<div class="mreq-new" id="mreq-new">
<div class="table-wrap"><table><thead><tr><th style="width:90px">Qty</th><th style="width:110px">Unit</th><th>Description</th><th style="width:44px"></th></tr></thead><tbody id="mreq-items"></tbody></table></div>
<datalist id="mat-datalist"></datalist>
<div class="mreq-row">
<button type="button" class="add-btn" onclick="mreqAddItem()">+ Add line</button>
<label for="mreq-needed">Needed by</label>
<input type="date" id="mreq-needed">
<button type="button" class="btn btn-generate" onclick="mreqSubmit()">Submit request</button>
</div>
<div class="field-hint" id="mreq-hint"></div>
<div class="field-error" id="mreq-err" role="alert"></div>
</div>
</div>
</div>
<!-- DRAWINGS / ATTACHMENTS -->