diff --git a/src/app/api/transactions/[id]/order/route.ts b/src/app/api/transactions/[id]/order/route.ts index ee3fc9f..844815f 100644 --- a/src/app/api/transactions/[id]/order/route.ts +++ b/src/app/api/transactions/[id]/order/route.ts @@ -26,7 +26,7 @@ export async function GET( } const row = await queryRow( - `SELECT platform, order_reference, line_items, route, subtotal, amount, + `SELECT source, platform, order_reference, line_items, route, subtotal, amount, currency, card_last4, flags, source_email_subject, transaction_date FROM expense_metadata -- A card-settled order creates no transaction of its own (I5): the diff --git a/src/components/order-details.tsx b/src/components/order-details.tsx index ee3643e..9e41890 100644 --- a/src/components/order-details.tsx +++ b/src/components/order-details.tsx @@ -81,6 +81,13 @@ export function OrderDetails({ const mine = review?.reviews.find((r) => r.participant_id === reviewer); + // Verdicts are the MEAL lane's feedback loop โ€” "loved / never again" exists + // to steer the next restaurant order, and the nudge card warns on re-order. + // Spine-bridged retail (Amazon boxes, eBay, Officeworks) has no such loop: + // rating a roller-shade motor "order again?" is noise, so the whole review + // surface stays hidden for bridge rows. + const rateable = receipt.source !== "order-bridge"; + return (
@@ -106,14 +113,16 @@ export function OrderDetails({ {it.options.join(" ยท ")} )} - + {rateable && ( + + )} {/* Spine-bridged receipts (Amazon shipment notices, eBay) often name the goods without per-item prices โ€” a null here is "the mail didn't say", and printing $0.00 would assert it did. */} @@ -152,11 +161,13 @@ export function OrderDetails({

)} - + {rateable && ( + + )}
); } diff --git a/src/lib/hooks.ts b/src/lib/hooks.ts index 6f4bad7..92c2617 100644 --- a/src/lib/hooks.ts +++ b/src/lib/hooks.ts @@ -257,7 +257,9 @@ export function useTransactionSplits(transactionId: number) { } export interface OrderReceipt { - platform: "doordash" | "ubereats" | "uber" | null; + /** 'email' | 'receipt-scan' | 'order-bridge' | ... โ€” which lane wrote the row. */ + source: string | null; + platform: string | null; order_reference: string | null; line_items: { qty: number; description: string; amount: number; options?: string[] }[]; route: { label: string; time: string | null; address: string }[];