docs(spec): match the till layout and cache bump to what shipped
The spec's till bullet described the first design, not the code that shipped: the quantity is drawn under the price on the right (the operator's own decision during the build), and the service-worker cache was bumped to `pos-v39`. - The tile bullet now points at `pos-app.js:290` and says the `.sub` line keeps `sku · brand · unit · M in cart` while the quantity sits under the price. - The cache bump reads `pos-v37` -> `pos-v39`.
This commit is contained in:
parent
728461202e
commit
0fd3d2f34e
1 changed files with 2 additions and 2 deletions
|
|
@ -210,12 +210,12 @@ It is a shortcut only. It does **not** carry the set/add intent — the operator
|
|||
Changes:
|
||||
|
||||
- **`listActiveStockCatalog`** additionally returns `min_qty`, so the tile can decide its own cue.
|
||||
- **`pos-app.js:283`** — the tile's `.sub` line becomes `sku · brand · unit · N in stock · M in cart`, where `N` is `current_qty` and `M` is the existing cart count.
|
||||
- **`pos-app.js:290`** — the quantity is drawn **under the price, on the right**: the price block reads `price / unit` with `N in stock` beneath it, where `N` is `current_qty`. The `.sub` line keeps `sku · brand · unit · M in cart` (the existing cart count) and does not carry the quantity — the operator chose this layout during the build, because the `.sub` line is `nowrap` + ellipsis and a long SKU pushed the number off the edge.
|
||||
- **The out-of-stock cue** is `current_qty <= 0`, not `current_qty <= min_qty`. Only 48 of the 4,083 sellable items have `min_qty > 0`, so a min-based rule would badge 4,035 tiles — every one of them — and mean nothing. The cue that carries information is "you have none of this".
|
||||
- **The number is shown as it is.** A tile can read `-2,581 in stock`. The tile is styled as out-of-stock so it reads as a state rather than a glitch, but the number is not clamped and not hidden. The numeric value is the signal; colour only reinforces it.
|
||||
- **Nothing is blocked.** The cue is informational. The cashier can still sell the item, and the quantity still goes into minus.
|
||||
|
||||
Because `public/pos/` is served cache-first by the service worker, the cache constant is bumped **`pos-v37` → `pos-v38`** so till devices pick up the new script. The floor asserted in `src/lib/pos-cart-quantity.test.ts:225` stays satisfied.
|
||||
Because `public/pos/` is served cache-first by the service worker, the cache constant is bumped **`pos-v37` → `pos-v39`** so till devices pick up the new script. The floor asserted in `src/lib/pos-cart-quantity.test.ts:225` stays satisfied.
|
||||
|
||||
## The conversation, end to end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue