Skip to main content

Overview

The OrderDetailDto provides comprehensive order details including customer information, delivery address, order items, and special instructions. This DTO is used when displaying the full details of a specific order, as opposed to the condensed OrderListDto used in list views.

Type Definition

export type OrderDetailDto = {
  customerName?: string;
  customerPhone?: string;
  deliveryAddress?: string;
  notes?: string;
  courierName?: string;

  items: {
    id: string;
    name: string;
    image: string;
    price: number;
    currency: string;
    qty: number;
  }[];
};

Fields

customerName
string
Full name of the customer who placed the order
customerPhone
string
Contact phone number for the customer
deliveryAddress
string
Full delivery address where the order should be delivered
notes
string
Special instructions or notes from the customer (e.g., dietary restrictions, delivery instructions)
courierName
string
Name of the delivery courier assigned to this order
items
OrderItem[]
required
Array of items included in the order

Difference from OrderListDto

OrderDetailDto differs from OrderListDto in several key ways:
FeatureOrderListDtoOrderDetailDto
PurposeQuick overview in listsComprehensive order information
Customer Info❌ Not included✅ Full customer details
Order Items❌ Not included✅ Complete item list with pricing
Status/Priority✅ Included❌ Not included
Display Number✅ Included❌ Not included
Use CaseQueue views, dashboardsDetail views, order fulfillment
OrderListDto is optimized for performance in list views where many orders are displayed simultaneously, while OrderDetailDto provides the rich information needed when viewing a single order’s details.

Usage

This DTO is typically used in:
  • Order detail view screens
  • Order preparation interfaces
  • Customer information displays
  • Order fulfillment workflows
  • Receipt generation

Source

dtos/OrderDetails.dto.ts

Build docs developers (and LLMs) love