Skip to content

[FE-10] Create /admin/orders page with status tracking and Stellar tx links #278

Description

@Leothosine

Problem

No order history or order management page exists anywhere in the frontend. After an order is placed, there is no UI to view it, update its status, or see the associated blockchain transaction hash. The backend entities and Soroban order contract track a full order lifecycle (Pending ? Confirmed ? Preparing ? Ready ? Delivered ? Cancelled), but none of this is surfaced in the UI.

Proposed Solution

Create frontend/app/(auth)/admin/orders/page.tsx with:

Table columns: Order ID, Customer, Items summary, Total, Status badge, Created At, Stellar Tx Hash

Features:

  • Status filter tabs: All | Pending | Confirmed | Preparing | Ready | Delivered | Cancelled
  • Status advance button per row respecting the logged-in user's role
  • txHash cell links to https://stellar.expert/explorer/testnet/tx/{hash} when present
  • Pagination (20 orders per page)
  • Mobile-responsive horizontal scroll

Acceptance Criteria

  • Admin sees all orders scoped to their restaurant (no cross-restaurant data)
  • Status filter tabs update the table without a full page reload
  • Staff can advance order status; cancelled and delivered orders show no advance button
  • Delivered orders display a clickable Stellar Explorer link for the tx hash
  • Table paginates correctly at 20 records per page with next/prev controls
  • Renders correctly on mobile (375px width) with horizontal scroll

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions