diff --git a/frontend/src/components/inventory/DetailPanel.tsx b/frontend/src/components/inventory/DetailPanel.tsx index b628e6a8..4fb535e4 100644 --- a/frontend/src/components/inventory/DetailPanel.tsx +++ b/frontend/src/components/inventory/DetailPanel.tsx @@ -21,6 +21,7 @@ export function DetailPanel({ item, onClose }: { item: InvItem; onClose: () => v {item.armor_level != null && item.armor_level > 0 && } {item.max_damage != null && item.max_damage > 0 && } + {item.od_rating != null && 0 ? `+${item.od_rating.toFixed(2)}` : item.od_rating.toFixed(2)} />} {item.condition_percent != null && } {item.item_set_name && } {(item.is_bonded || item.is_attuned) && } diff --git a/frontend/src/components/inventory/ResultsTable.tsx b/frontend/src/components/inventory/ResultsTable.tsx index 553875f6..3afdc724 100644 --- a/frontend/src/components/inventory/ResultsTable.tsx +++ b/frontend/src/components/inventory/ResultsTable.tsx @@ -23,6 +23,11 @@ function cell(item: InvItem, key: string): React.ReactNode { return item.value != null ? item.value.toLocaleString() : '—'; case 'last_updated': return item.last_updated ? item.last_updated.slice(0, 16).replace('T', ' ') : '—'; + case 'od_rating': { + const v = item.od_rating; + if (v == null) return '—'; + return v > 0 ? `+${v.toFixed(2)}` : v.toFixed(2); + } default: { const v = (item as any)[key]; return v == null || v === -1 ? '—' : String(v); diff --git a/frontend/src/components/inventory/constants.ts b/frontend/src/components/inventory/constants.ts index fb1e8610..92251f75 100644 --- a/frontend/src/components/inventory/constants.ts +++ b/frontend/src/components/inventory/constants.ts @@ -53,6 +53,7 @@ export const WEAPON_TYPES: Array<{ value: string; label: string }> = [ export interface RatingDef { param: string; label: string; common?: boolean; } export const RATING_DEFS: RatingDef[] = [ + { param: 'min_od', label: 'Weapon OD', common: true }, { param: 'min_damage_rating', label: 'Damage rating', common: true }, { param: 'min_crit_damage_rating', label: 'Crit damage', common: true }, { param: 'min_heal_boost_rating', label: 'Heal boost', common: true }, @@ -89,6 +90,7 @@ export const COLUMNS: ColumnDef[] = [ { key: 'spell_names', label: 'Spells / Cantrips', sortKey: 'spell_names', defaultVisible: true }, { key: 'armor_level', label: 'Armor', sortKey: 'armor', defaultVisible: false }, { key: 'max_damage', label: 'Max Dmg', sortKey: 'damage', defaultVisible: false }, + { key: 'od_rating', label: 'OD', sortKey: 'od', defaultVisible: false }, { key: 'workmanship', label: 'Work', sortKey: 'workmanship', defaultVisible: false }, { key: 'item_set_name', label: 'Set', sortKey: 'item_set', defaultVisible: false }, { key: 'object_class_name', label: 'Type', sortKey: 'item_type_name', defaultVisible: false }, diff --git a/frontend/src/components/inventory/types.ts b/frontend/src/components/inventory/types.ts index 2f1537c1..491bcefe 100644 --- a/frontend/src/components/inventory/types.ts +++ b/frontend/src/components/inventory/types.ts @@ -15,6 +15,7 @@ export interface InvItem { item_set_name?: string; armor_level: number | null; max_damage: number | null; + od_rating?: number | null; condition_percent: number | null; object_class_name?: string; material_name?: string;