Move Add Item button to be on the bottom of the list of items

This commit is contained in:
qowevisa 2024-11-27 22:01:02 +02:00
parent 3ad03226ae
commit 3ac7cbdf5d

View File

@ -264,23 +264,6 @@
</label> </label>
</div> </div>
{/if} {/if}
<button
type="button"
class="mb-4 px-4 py-2 bg-green-500 text-white rounded-md hover:bg-green-600"
onclick={() => {
currentExpense.children?.push({
id: 0,
card_id: 0,
type_id: 0,
value: 0,
comment: "",
date: "",
show_value: "",
});
}}
>
+ Add Item
</button>
{#each (currentExpense.children as Partial<Expense>[]) as child, index} {#each (currentExpense.children as Partial<Expense>[]) as child, index}
<div class="p-4 bg-white mb-4 rounded-lg shadow-md"> <div class="p-4 bg-white mb-4 rounded-lg shadow-md">
@ -373,6 +356,24 @@
</div> </div>
{/each} {/each}
<button
type="button"
class="mb-4 px-4 py-2 bg-green-500 text-white rounded-md hover:bg-green-600"
onclick={() => {
currentExpense.children?.push({
id: 0,
card_id: 0,
type_id: 0,
value: 0,
comment: "",
date: "",
show_value: "",
});
}}
>
+ Add Item
</button>
<div class="flex space-x-2"> <div class="flex space-x-2">
<button <button
type="submit" type="submit"