Refactor quantity input parsing to handle additional units and improve conversion logic across inventory forms and recipe pages

This commit is contained in:
Nils-Johan Gynther
2026-04-09 23:36:36 +02:00
parent 03361f7b7d
commit fd8480197c
6 changed files with 68 additions and 29 deletions
@@ -144,11 +144,11 @@ export default function CreateRecipePage() {
style={{ padding: '0.5rem' }}
>
<option value={0}>Välj produkt</option>
{products.map((product) => (
{products.length > 0 ? products.map((product) => (
<option key={product.id} value={product.id}>
{product.name}
</option>
))}
)) : <option disabled>Kunde inte ladda produkter</option>}
</select>
<input