diff --git a/frontend/components/InventoryTable.tsx b/frontend/components/InventoryTable.tsx
index 8f0d5765..41748600 100644
--- a/frontend/components/InventoryTable.tsx
+++ b/frontend/components/InventoryTable.tsx
@@ -106,7 +106,7 @@ export default function InventoryTable({
onClick={() => handleItemClick(item)}
className="flex items-center gap-3 flex-1 min-w-0 pr-4 cursor-pointer"
>
- {item.image_url ? (
+ {item.photo_path || item.image_url ? (
{
e.stopPropagation();
@@ -115,7 +115,7 @@ export default function InventoryTable({
className="w-12 h-12 rounded-xl shrink-0 border-2 border-slate-300 overflow-hidden cursor-pointer hover:border-primary transition-colors active:scale-95"
>
{item.name}
- {item.image_url ? (
+ {item.photo_path || item.image_url ? (
Tap photo for details
) : (
<>
@@ -163,9 +163,9 @@ export default function InventoryTable({
/>
)}
- {selectedPhotoItem && selectedPhotoItem.image_url && (
+ {selectedPhotoItem && (selectedPhotoItem.photo_path || selectedPhotoItem.image_url) && (
setSelectedPhotoItem(null)}
/>
diff --git a/frontend/components/ItemDetailModal.tsx b/frontend/components/ItemDetailModal.tsx
index 8d1ad145..e8c88e60 100644
--- a/frontend/components/ItemDetailModal.tsx
+++ b/frontend/components/ItemDetailModal.tsx
@@ -22,7 +22,11 @@ export default function ItemDetailModal({
}: ItemDetailModalProps) {
const [showPhotoUpload, setShowPhotoUpload] = useState(false);
const [currentPhoto, setCurrentPhoto] = useState<{ thumbnail_url: string; full_url: string } | null>(
- item.image_url ? { thumbnail_url: item.image_url, full_url: item.image_url } : null
+ item.photo_path && item.photo_thumbnail_path
+ ? { thumbnail_url: item.photo_thumbnail_path, full_url: item.photo_path }
+ : item.image_url
+ ? { thumbnail_url: item.image_url, full_url: item.image_url }
+ : null
);
const [isDeleting, setIsDeleting] = useState(false);
const photoUploadRef = useRef(null);
diff --git a/frontend/lib/db.ts b/frontend/lib/db.ts
index 1df690e6..541dfa31 100644
--- a/frontend/lib/db.ts
+++ b/frontend/lib/db.ts
@@ -19,6 +19,9 @@ export interface Item {
connector?: string;
size?: string;
ocr_text?: string;
+ photo_path?: string;
+ photo_thumbnail_path?: string;
+ photo_upload_date?: string;
}
export interface PendingOperation {