docs: clarify unit suffix handling in DN items panel header
The 'Total {sumQty}{unitSuffix}' header line now explicitly documents
how mixed / missing units are handled: suffix is omitted when all
items have empty/null units (operator defaults to 'EA'); when units
are mixed, no suffix is shown; when all items share a non-EA unit
(e.g. BOX), the suffix is shown.
Self-review pass; no other changes.
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
b39614b4da
commit
66e2fb9856
1 changed files with 9 additions and 3 deletions
|
|
@ -117,9 +117,15 @@ A bordered panel immediately below the existing `<div
|
|||
className="flex shrink-0 flex-col items-end gap-1.5">` button column,
|
||||
inside the same outer `<div className="flex items-start gap-3 ...">`:
|
||||
|
||||
- **Header line**: "{n} items · Total {sumQty} EA" — right-aligned,
|
||||
text-xs, muted foreground. When `n === 0`, the header line is
|
||||
omitted; the empty-state takes its place.
|
||||
- **Header line**: "{n} items · Total {sumQty}{unitSuffix}" —
|
||||
right-aligned, text-xs, muted foreground. `sumQty` is the
|
||||
sum of `item.quantity` across the panel's items.
|
||||
`unitSuffix` is empty when the items' units are mixed or
|
||||
empty/null; otherwise it's a single shared unit string (e.g.
|
||||
`" EA"` or `" BOX"`). When all items have unit "EA" or empty,
|
||||
the suffix is omitted entirely (the operator's mental default
|
||||
is "EA"). When `n === 0`, the header line is omitted; the
|
||||
empty-state takes its place.
|
||||
- **Per item line** (`<div className="flex items-baseline gap-2">`):
|
||||
- Description: truncate + `title` for full text
|
||||
(`truncate`, `text-xs`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue