Bisher liess sich nur die ganze Charge umlagern. Neu: POST /lots/{id}/split zweigt
eine Teilmenge (Basiseinheiten) als neue Charge mit gleichem MHD an einen anderen
Lagerort ab; der Rest bleibt. Reine Umbuchung ohne Bewegungseintrag, Gesamtbestand
unveraendert. Schutz gegen zu grosse Menge und gleichen Zielort.
Web: gemeinsamer SplitLotDialog (Menge in Artikeleinheit + Zielort, zeigt Rest),
Aufteilen-Knopf auf der Chargen-Seite und in der Chargen-Tabelle der Artikelseite.
Neues Split-Icon.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
166 lines
4.8 KiB
JavaScript
166 lines
4.8 KiB
JavaScript
// Schlankes Inline-SVG-Icon-Set (Feather-Stil). Bewusst keine Emojis.
|
|
// Verwendung: <Icon name="package" /> oder <Icon name="trash" size={16} />
|
|
|
|
const PATHS = {
|
|
food: (
|
|
<>
|
|
<path d="M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 12 5 20 8 20c1.25 0 2.5-1.06 4-1.06Z" />
|
|
<path d="M10 2c1 .5 2 2 2 5" />
|
|
</>
|
|
),
|
|
dashboard: (
|
|
<>
|
|
<rect x="3" y="3" width="7" height="9" rx="1" />
|
|
<rect x="14" y="3" width="7" height="5" rx="1" />
|
|
<rect x="14" y="12" width="7" height="9" rx="1" />
|
|
<rect x="3" y="16" width="7" height="5" rx="1" />
|
|
</>
|
|
),
|
|
checkin: (
|
|
<>
|
|
<path d="M12 3v12" />
|
|
<path d="m7 10 5 5 5-5" />
|
|
<path d="M5 21h14" />
|
|
</>
|
|
),
|
|
checkout: (
|
|
<>
|
|
<path d="M12 21V9" />
|
|
<path d="m7 14 5-5 5 5" />
|
|
<path d="M5 3h14" />
|
|
</>
|
|
),
|
|
package: (
|
|
<>
|
|
<path d="m7.5 4.27 9 5.15" />
|
|
<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" />
|
|
<path d="m3.3 7 8.7 5 8.7-5" />
|
|
<path d="M12 22V12" />
|
|
</>
|
|
),
|
|
split: (
|
|
<>
|
|
<line x1="6" y1="3" x2="6" y2="15" />
|
|
<circle cx="18" cy="6" r="3" />
|
|
<circle cx="6" cy="18" r="3" />
|
|
<path d="M18 9a9 9 0 0 1-9 9" />
|
|
</>
|
|
),
|
|
tag: (
|
|
<>
|
|
<path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" />
|
|
<circle cx="7.5" cy="7.5" r=".5" fill="currentColor" />
|
|
</>
|
|
),
|
|
location: (
|
|
<>
|
|
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" />
|
|
<circle cx="12" cy="10" r="3" />
|
|
</>
|
|
),
|
|
cart: (
|
|
<>
|
|
<circle cx="8" cy="21" r="1" />
|
|
<circle cx="19" cy="21" r="1" />
|
|
<path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12" />
|
|
</>
|
|
),
|
|
users: (
|
|
<>
|
|
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
|
|
<circle cx="9" cy="7" r="4" />
|
|
<path d="M22 21v-2a4 4 0 0 0-3-3.87" />
|
|
<path d="M16 3.13a4 4 0 0 1 0 7.75" />
|
|
</>
|
|
),
|
|
clock: (
|
|
<>
|
|
<circle cx="12" cy="12" r="9" />
|
|
<path d="M12 7v5l3 2" />
|
|
</>
|
|
),
|
|
history: (
|
|
<>
|
|
<path d="M3 12a9 9 0 1 0 3-6.7L3 8" />
|
|
<path d="M3 3v5h5" />
|
|
<path d="M12 7v5l3 2" />
|
|
</>
|
|
),
|
|
settings: (
|
|
<>
|
|
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
|
|
<circle cx="12" cy="12" r="3" />
|
|
</>
|
|
),
|
|
logout: (
|
|
<>
|
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
|
|
<path d="m16 17 5-5-5-5" />
|
|
<path d="M21 12H9" />
|
|
</>
|
|
),
|
|
search: (
|
|
<>
|
|
<circle cx="11" cy="11" r="7" />
|
|
<path d="m21 21-4.3-4.3" />
|
|
</>
|
|
),
|
|
plus: <path d="M5 12h14M12 5v14" />,
|
|
trash: (
|
|
<>
|
|
<path d="M3 6h18" />
|
|
<path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
|
|
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />
|
|
<path d="M10 11v6M14 11v6" />
|
|
</>
|
|
),
|
|
edit: (
|
|
<>
|
|
<path d="M12 20h9" />
|
|
<path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" />
|
|
</>
|
|
),
|
|
alert: (
|
|
<>
|
|
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
|
|
<path d="M12 9v4M12 17h.01" />
|
|
</>
|
|
),
|
|
check: <path d="M20 6 9 17l-5-5" />,
|
|
close: <path d="M18 6 6 18M6 6l12 12" />,
|
|
chevronRight: <path d="m9 18 6-6-6-6" />,
|
|
download: (
|
|
<>
|
|
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
|
<path d="M7 10l5 5 5-5M12 15V3" />
|
|
</>
|
|
),
|
|
box: (
|
|
<>
|
|
<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" />
|
|
</>
|
|
),
|
|
};
|
|
|
|
export default function Icon({ name, size = 18, className = "", strokeWidth = 2 }) {
|
|
const path = PATHS[name];
|
|
if (!path) return null;
|
|
return (
|
|
<svg
|
|
className={`icon ${className}`}
|
|
width={size}
|
|
height={size}
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
strokeWidth={strokeWidth}
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
aria-hidden="true"
|
|
focusable="false"
|
|
>
|
|
{path}
|
|
</svg>
|
|
);
|
|
}
|