{#if error}
{error}
{/if}
Manage Cards
{editingCard ? "Edit Card" : "Add New Card"}
Name:
Balance:
Currency:
{#each currencies as currency}
{`${currency.symbol} (${currency.iso_name})`}
{/each}
Last 4 digits:
Have Credit Line
{#if currentCard.have_credit_line}
Credit Line:
{/if}
{editingCard ? "Update Card" : "Add Card"}
{#if editingCard}
(editingCard = null)} class="px-4 py-2 bg-gray-300 text-gray-700 rounded-md hover:bg-gray-400" > Cancel
{/if}
Cards List
{#each cards as card}
{card.name}
{`•${card.last_digits}`}
{` ${currencies.find((curr) => curr.id == card.currency_id)?.symbol}`}
Balance: {NumberToFPA(card.balance)},
{#if card.have_credit_line} Credit Line: {NumberToFPA(card.credit_line)} {:else} No Credit Line {/if}
editCard(card)} class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600" > Edit
deleteCard(card.id)} class="px-4 py-2 bg-red-500 text-white rounded-md hover:bg-red-600" > Delete
{/each}