# F-140 — Implementer evidence

## What
F-140 build evidence: GET /orders/:id/admin enriched with customer/address/payment; admin page shows new sections. tsc 0, verify.sh verde.

## Files
- `project/migrations/050_order_detail_address_type.js` — ADD COLUMN type to users_addresses, ADD COLUMN phone to identity_users, ADD COLUMN customer_name/customer_phone to orders_orders
- `project/src/modules/orders/domain/order.ts` — OrderView extended with Address, PaymentInfo interfaces; Order extended with customerName/customerPhone
- `project/src/modules/orders/infrastructure/pg-order-repository.ts` — findById JOINs users_addresses (shipping+billing) + payments_transactions; toOrderView maps all new fields
- `project/src/modules/orders/api/orders.routes.ts` — serializeOrder includes customerName/customerPhone/phone/shippingAddress/billingAddress/payment
- `project/apps/admin/src/types/index.ts` — Order extended with Address, PaymentInfo, customerName, phone, shippingAddress, billingAddress, payment
- `project/apps/admin/src/app/(dashboard)/orders/[id]/page.tsx` — new sidebar sections: Cliente, Dirección de envío, Dirección de facturación, Pago

## Verification
- `npm run build` → 0 TypeScript errors.
- `check-module-boundaries.mjs src` → 0 NEW violations.
- `./scripts/verify.sh` → green.

## AC traceability
| AC | Estado | Evidencia |
|----|--------|-----------|
| AC1 customer data | ✅ | customerName/customerPhone/email/phone en OrderView y serialize |
| AC2 shipping address | ✅ | users_addresses WHERE user_id AND type='shipping' → serialize |
| AC3 billing address | ✅ | users_addresses WHERE user_id AND type='billing' → serialize |
| AC4 payment | ✅ | payments_transactions WHERE order_id AND status='succeeded' latest → provider/status/last4 |
| AC5 admin sections | ✅ | orders/[id]/page.tsx sidebar: Cliente + Envío + Facturación + Pago |
| AC6 read-only | ✅ | Solo renderizado, sin edits |
| AC7 tsc/verify | ✅ | tsc 0, verify verde |
