From c9e5362cf14f61821e37c8ac07a32cb4890abf33 Mon Sep 17 00:00:00 2001 From: SJCoetz Date: Wed, 29 Jul 2026 17:45:15 +0200 Subject: [PATCH] fix(types): restore ItemHistorySupplier + ItemHistoryOtherQuote (dropped during merge resolution) The merge of feature/order-sprint-item-history into main concatenated src/lib/types.ts by appending the last 50 lines of the feature branch's version. The two helper interfaces ItemHistorySupplier and ItemHistoryOtherQuote were defined earlier in the file (lines 1416-1433) and were dropped, breaking the references in ItemHistory and the import in item-history-service.ts. This commit restores them. Co-authored-by: Orca --- src/lib/types.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/lib/types.ts b/src/lib/types.ts index e876429..756ff24 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -1422,6 +1422,30 @@ export interface StockPurchaseItem extends BaseRecord { }; } +// ─── Item history popover ──────────────────────────────────────────── + +/** Per-supplier purchase history for a single item. */ +export interface ItemHistorySupplier { + supplier_id: string; + supplier_name: string; + last_cost: number; + last_bought_at: string; + times_bought: number; + last_order_id: string; +} + +/** Other quotes to the same customer / other companies for the same SKU. */ +export interface ItemHistoryOtherQuote { + quote_id: string; + quote_number: string; + company: string; + customer_name: string; + status: string; + selling_price: number; + quoted_at: string; + days_ago: number; +} + /** Last time this SKU was on a fulfilled order. */ export interface ItemHistoryLastSold { selling_price: number;