Artikelbild: nur noch an einer Stelle, hochkant, und beim Import beruecksichtigt
Das alte Bild in der Chargen-Karte entfaellt - seit dem neuen Bild neben den Kennfeldern stand es doppelt auf der Seite. Der Rahmen ist jetzt hochkant (3:4) statt quadratisch. Lebensmittelverpackungen sind fast immer hoeher als breit; im Quadrat blieben links und rechts leere Streifen. Beim Import wurde image_url komplett verworfen, obwohl das JSON-Backup sie enthaelt - eingelesene Artikel blieben deshalb dauerhaft ohne Bild. Die Adresse wird jetzt uebernommen (bei bestehenden Artikeln nur ergaenzend, nie ueberschreibend); die lokale Kopie holt der Bildabruf beim ersten Ansehen. Bewusst nicht waehrend des Imports: Ein Backup mit 200 Artikeln wuerde sonst 200 Downloads in einer Anfrage abarbeiten. Ausserdem holen jetzt auch Artikelliste, Ein- und Auslagern ihr Vorschaubild aus der eigenen Datenbank statt direkt von Open Food Facts. Einzige Ausnahme bleibt der OFF-Vorschlag beim Scannen: Dort existiert der Artikel noch nicht. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -400,7 +400,6 @@ export default function ProductForm() {
|
||||
baseShort={baseShort}
|
||||
warnDays={warnDays}
|
||||
isAdmin={isAdmin}
|
||||
imageUrl={form.image_url}
|
||||
onChanged={async () => {
|
||||
setLots(await api.listLots(id));
|
||||
setProduct(await api.getProduct(id));
|
||||
@@ -438,7 +437,7 @@ export default function ProductForm() {
|
||||
}
|
||||
|
||||
/** Chargen-Karte mit Bearbeiten/Löschen. Bearbeitet wird in der Produkteinheit. */
|
||||
function LotsCard({ product, lots, baseShort, warnDays, isAdmin, imageUrl, onChanged, onError }) {
|
||||
function LotsCard({ product, lots, baseShort, warnDays, isAdmin, onChanged, onError }) {
|
||||
const confirm = useConfirm();
|
||||
const toast = useToast();
|
||||
const { formatBestBefore } = useSettings();
|
||||
@@ -532,7 +531,6 @@ function LotsCard({ product, lots, baseShort, warnDays, isAdmin, imageUrl, onCha
|
||||
Dieses Produkt hat abgelaufene Chargen im Bestand.
|
||||
</div>
|
||||
)}
|
||||
{imageUrl && <img className="product-img" src={imageUrl} alt="" />}
|
||||
<div className="table-wrap">
|
||||
<table className="table">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user