{#if error}
{error}
{/if}
Manage Categories
{editingExpense ? "Edit Expense" : "Add New Expense"}
Value:
Card:
{#each cards as card}
{card.name}
{/each}
Type:
{#each types as type}
{type.name}
{/each}
Date:
Time:
{editingExpense ? "Update Expense" : "Add Expense"}
{#if editingExpense}
(editingExpense = null)} class="px-4 py-2 bg-gray-300 text-gray-700 rounded-md hover:bg-gray-400" > Cancel
{/if}
Categories List
{#each expenses as expense}
{expense.value}
Card:
{getCardName(expense.card_id)}
Type:
{getTypeName(expense.type_id)}
Date:
{expense.date}
editExpense(expense)} class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600" > Edit
deleteExpense(expense.id)} class="px-4 py-2 bg-red-500 text-white rounded-md hover:bg-red-600" > Delete
{/each}