mirror of https://github.com/kcal-app/kcal.git
Make ingredient input first
This commit is contained in:
parent
bb3f1a2e1d
commit
0829b69e14
|
@ -1,5 +1,14 @@
|
|||
<div x-data class="flex items-center space-x-2">
|
||||
<div class="flex flex-col space-y-4 w-full">
|
||||
<div class="w-full">
|
||||
<!-- Ingredient -->
|
||||
<div class="w-full">
|
||||
<x-inputs.label for="ingredients[id][]" value="Food or Recipe" class="md:hidden"/>
|
||||
<x-ingredient-picker :default-id="$id ?? null"
|
||||
:default-type="$type ?? null"
|
||||
:default-name="$name ?? null" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0 w-full">
|
||||
<!-- Date -->
|
||||
<div class="w-full">
|
||||
|
@ -45,15 +54,6 @@
|
|||
</x-inputs.select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<!-- Ingredient -->
|
||||
<div class="w-full">
|
||||
<x-inputs.label for="ingredients[id][]" value="Food or Recipe" class="md:hidden"/>
|
||||
<x-ingredient-picker :default-id="$id ?? null"
|
||||
:default-type="$type ?? null"
|
||||
:default-name="$name ?? null" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<hr class="my-2"/>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
<x-inputs.input type="hidden" name="ingredients[original_key][]" :value="$original_key ?? null" />
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0 w-full">
|
||||
<div class="w-full">
|
||||
<x-ingredient-picker :default-id="$ingredient_id ?? null"
|
||||
:default-type="$ingredient_type ?? null"
|
||||
:default-name="$ingredient_name ?? null" />
|
||||
</div>
|
||||
<x-inputs.input name="ingredients[amount][]"
|
||||
type="text"
|
||||
size="5"
|
||||
|
@ -14,11 +19,6 @@
|
|||
:selectedValue="$unit ?? null">
|
||||
<option value="" selected>Unit</option>
|
||||
</x-inputs.select>
|
||||
<div class="w-full">
|
||||
<x-ingredient-picker :default-id="$ingredient_id ?? null"
|
||||
:default-type="$ingredient_type ?? null"
|
||||
:default-name="$ingredient_name ?? null" />
|
||||
</div>
|
||||
<x-inputs.input name="ingredients[detail][]"
|
||||
type="text"
|
||||
class="block"
|
||||
|
|
Loading…
Reference in New Issue