mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-20 21:58:49 +02:00
Merge pull request #217 from R0m1k3/antigravity
feat: Add automated item checking scheduler service and new dashboard…
This commit is contained in:
3 files changed
+24
-12
No files matched your search
@@ -245,17 +245,17 @@ export function ItemCard({ item, onEdit, onDelete, onCheck, onZoom, onCategoryUp
|
||||
|
||||
<div className="flex gap-1">
|
||||
{onViewHistory && (
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6" onClick={() => onViewHistory(item)} title="Historique des prix">
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6" onClick={() => onViewHistory(item)} title={t('dashboard.history') || "Historique"}>
|
||||
<History className="h-3 w-3" />
|
||||
</Button>
|
||||
)}
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6" onClick={() => onEdit(item)}>
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6" onClick={() => onEdit(item)} title={t('common.edit') || "Modifier"}>
|
||||
<Edit2 className="h-3 w-3" />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6" onClick={() => onCheck(item.id)} disabled={item.is_refreshing}>
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6" onClick={() => onCheck(item.id)} disabled={item.is_refreshing} title={t('dashboard.refresh') || "Forcer la mise à jour"}>
|
||||
<RefreshCw className={cn("h-3 w-3", item.is_refreshing && "animate-spin text-primary")} />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6 text-destructive hover:text-destructive" onClick={() => onDelete(item)}>
|
||||
<Button variant="ghost" size="icon" className="h-6 w-6 text-destructive hover:text-destructive" onClick={() => onDelete(item)} title={t('common.delete') || "Supprimer"}>
|
||||
<Trash2 className="h-3 w-3" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -138,7 +138,7 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) {
|
||||
<div className="flex gap-2">
|
||||
<Input
|
||||
id="custom_category"
|
||||
placeholder="Enter new category"
|
||||
placeholder="Entrer une nouvelle catégorie"
|
||||
value={formData.category}
|
||||
onChange={e => 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"
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
</Button>
|
||||
@@ -171,30 +171,30 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) {
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue placeholder="Select a category" />
|
||||
<SelectValue placeholder="Sélectionner une catégorie" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="none">None</SelectItem>
|
||||
<SelectItem value="none">Aucune</SelectItem>
|
||||
{categories.map(cat => (
|
||||
<SelectItem key={cat} value={cat}>{cat}</SelectItem>
|
||||
))}
|
||||
<SelectItem value="__custom__">Custom...</SelectItem>
|
||||
<SelectItem value="__custom__">Autre...</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="channel">Notification Channel</Label>
|
||||
<Label htmlFor="channel">Canal de Notification</Label>
|
||||
<Select
|
||||
value={formData.notification_channel_id}
|
||||
onValueChange={(val) => setFormData({ ...formData, notification_channel_id: val })}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Select a channel" />
|
||||
<SelectValue placeholder="Sélectionner un canal" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="none">None</SelectItem>
|
||||
<SelectItem value="none">Aucun</SelectItem>
|
||||
{channels.map(channel => (
|
||||
<SelectItem key={channel.id} value={channel.id.toString()}>
|
||||
{channel.name} ({channel.type})
|
||||
|
||||
Reference in new issue
Block a user