Compare commits
3 Commits
96c31d2cc7
...
3ac7cbdf5d
Author | SHA1 | Date | |
---|---|---|---|
3ac7cbdf5d | |||
3ad03226ae | |||
02c1444203 |
|
@ -28,6 +28,7 @@ export interface Category {
|
|||
id: number;
|
||||
name: string;
|
||||
parent_id: number;
|
||||
name_with_parent: string;
|
||||
}
|
||||
|
||||
export interface Expense {
|
||||
|
|
|
@ -264,23 +264,6 @@
|
|||
</label>
|
||||
</div>
|
||||
{/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}
|
||||
<div class="p-4 bg-white mb-4 rounded-lg shadow-md">
|
||||
|
@ -373,6 +356,24 @@
|
|||
</div>
|
||||
{/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">
|
||||
<button
|
||||
type="submit"
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md focus:ring focus:ring-indigo-200 focus:border-indigo-500"
|
||||
>
|
||||
{#each cards as card}
|
||||
<option value={card.id}>{card.name}</option>
|
||||
<option value={card.id}>{card.display_name}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</label>
|
||||
|
@ -221,7 +221,7 @@
|
|||
class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md focus:ring focus:ring-indigo-200 focus:border-indigo-500"
|
||||
>
|
||||
{#each categories as category}
|
||||
<option value={category.id}>{category.name}</option>
|
||||
<option value={category.id}>{category.name_with_parent}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</label>
|
||||
|
|
Loading…
Reference in New Issue
Block a user