From e470f737d994259c330fcbf0db90cd3eb9a0f56e Mon Sep 17 00:00:00 2001 From: DanMat Date: Sun, 30 Aug 2026 15:04:27 -0400 Subject: [PATCH] fix: lead the Inventory page with the stock overview, then the forms Feedback from the live demo: the page opened with a wall of forms before the operator could see any stock. Reorder so it leads with "Stock on hand" (filter + table), then "Record a movement" (the four forms), then "Recent movements". Also widen the gap between the form cards (1rem -> 1.5rem) so they read as distinct cards on mobile. Pure presentation; 43 tests still green. Co-Authored-By: Claude Opus 4.8 --- src/InventoryAdmin.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/InventoryAdmin.php b/src/InventoryAdmin.php index 1d386cd..f021704 100644 --- a/src/InventoryAdmin.php +++ b/src/InventoryAdmin.php @@ -81,14 +81,16 @@ public function render(string $csrf = '', ?string $notice = null, ?string $q = n $html = '

Inventory

' . $banner . '

Stock as an append-only ledger — on-hand, reserved and available per location. ' - . 'Receive, adjust, count or transfer below, or drive it over MCP.

' - . $this->datalists($skus, array_values($locations)) - . $this->forms($csrf); + . 'Filter it below, record a movement, or drive it all over MCP.

' + . $this->datalists($skus, array_values($locations)); + // Lead with the stock overview — the operator wants to *see* inventory + // first; the movement forms come after. + $html .= '

Stock on hand

'; $html .= $this->filterForm($q); if ($stock === []) { $html .= $q === '' - ? '

No stock yet. Receive some above, or with the inventory_receive tool.

' + ? '

No stock yet. Record a receipt below, or use the inventory_receive tool.

' : '

No stock matches “' . $this->e($q) . '”.

'; } else { $html .= '
' @@ -108,6 +110,10 @@ public function render(string $csrf = '', ?string $notice = null, ?string $q = n $html .= '
'; } + // The movement forms, after the overview. + $html .= '

Record a movement

'; + $html .= $this->forms($csrf); + $html .= '

Recent movements

'; if ($movements === []) { $html .= '

None yet.

'; @@ -155,7 +161,7 @@ private function forms(string $csrf): string { $t = ''; - return '
' + return '
' . '
' . '

Receive stock

' . $t . $this->field('SKU', 'sku', 'e.g. house-blend', 'inv-skus')