Skip to content

web: the Dashboard's Recent sales rows have no eggs-and-grade cell because the orders list carries no grade name #887

Description

@mforce

Amendment (2026-09-19): This scope is implemented in draft PR #912, pending review and merge. See the scope and contract amendment for the API choice, current-name semantics and remaining work.

Part of #674. Found by #829 (#883) on 2026-09-16.

The confirmed Dashboard direction (docs/designs/864-visual-language/DIRECTION.md, "Recent sales rows: customer with the order number under it, eggs and grade, peso amount, status, action") has an eggs-and-grade cell ("3,600 Large"). #883 renders every other column and leaves that one out, because the orders list the Dashboard reads carries no grade name: OrderItem in web/src/api/cluckwork.ts (~L328) has quantity, quantityBase and eggGradeId only.

Two ways to close it, for the owner to pick:

  1. API: include the grade name on each order line in the orders list response (the order aggregate already resolves the grade when it allocates), so the Dashboard renders "3,600 Large" from the row it already has. One response shape change, one field, no extra request.
  2. SPA: the Dashboard fetches listEggGrades() once and joins by eggGradeId. No API change, one more request on the morning screen, and a second place that has to agree with the grade list.

Option 1 is the smaller cost on the screen a worker opens every morning and keeps the grade name where the order was priced. Either way the cell is a single line per order (the mockup's row shows one grade per order; an order with several grades shows the first and "+N"), and the Dashboard tests pin it on text.

Recent sales row, mockup vs app on main

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions