feat(shopping): tags sur les articles du catalogue
- Migration 006 : colonne tags TEXT[] sur shopping.products - Modèle SQLAlchemy + schémas Pydantic mis à jour (ProductCreate/Update/Response) - Interface TypeScript Product/ProductCreate/ProductUpdate avec tags?: string[] - CatalogueModal : chip input (Entrée/virgule pour ajouter, clic pour supprimer, Backspace pour retirer le dernier) - Recherche dans le catalogue et le bottom sheet étendue aux tags (insensible aux accents) - Tags affichés en pills dans la liste du catalogue v0.4.12 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -378,7 +378,11 @@ export default function ShoppingPage() {
|
||||
|
||||
const filteredProducts = products.filter(p => {
|
||||
const term = itemSearch.trim()
|
||||
return !term || matchesSearch(p.name, term) || matchesSearch(p.brand ?? '', term)
|
||||
if (!term) return true
|
||||
if (matchesSearch(p.name, term)) return true
|
||||
if (matchesSearch(p.brand ?? '', term)) return true
|
||||
if (p.tags?.some(t => matchesSearch(t, term))) return true
|
||||
return false
|
||||
})
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user