diff --git a/app/services/scheduler_service.py b/app/services/scheduler_service.py index 67b620a..b8b3ec4 100644 --- a/app/services/scheduler_service.py +++ b/app/services/scheduler_service.py @@ -127,6 +127,18 @@ async def process_item_check(item_id: int): if not screenshot_path: raise Exception("Failed to capture screenshot") + # Update the main item screenshot for the UI + try: + import shutil + import os + dest_path = f"/app/screenshots/item_{item_id}.png" + # Ensure directory exists + os.makedirs(os.path.dirname(dest_path), exist_ok=True) + shutil.copy2(screenshot_path, dest_path) + logger.info(f"Updated main screenshot for item {item_id}") + except Exception as e: + logger.error(f"Failed to update main screenshot: {e}") + if not (ai_result := await AIService.analyze_image(screenshot_path, page_text=page_text)): raise Exception("AI analysis failed") diff --git a/frontend/src/components/dashboard/ItemCard.jsx b/frontend/src/components/dashboard/ItemCard.jsx index f986e53..73e9e75 100644 --- a/frontend/src/components/dashboard/ItemCard.jsx +++ b/frontend/src/components/dashboard/ItemCard.jsx @@ -245,17 +245,17 @@ export function ItemCard({ item, onEdit, onDelete, onCheck, onZoom, onCategoryUp
{onViewHistory && ( - )} - - -
diff --git a/frontend/src/components/dashboard/ItemModal.jsx b/frontend/src/components/dashboard/ItemModal.jsx index 220caca..7abbdec 100644 --- a/frontend/src/components/dashboard/ItemModal.jsx +++ b/frontend/src/components/dashboard/ItemModal.jsx @@ -138,7 +138,7 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) {
setFormData({ ...formData, category: e.target.value })} autoFocus @@ -151,7 +151,7 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) { setShowCustomInput(false); setFormData({ ...formData, category: '' }); }} - title="Select existing category" + title="Sélectionner une catégorie existante" > @@ -171,30 +171,30 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) { }} > - + - None + Aucune {categories.map(cat => ( {cat} ))} - Custom... + Autre... )}
- +