Compare commits

..

1 Commits

Author SHA1 Message Date
2ba5ddd9f2 feat(transaction-recurring): #100 implement editing of recurring transactions based on treasure chests
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 4m56s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 5m2s
2025-05-25 14:35:00 +02:00
2 changed files with 7 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ import "spend-sparrow/types"
templ TransactionRecurringItems(transactionsRecurring []*types.TransactionRecurring, editId, accountId, treasureChestId string) {
<!-- Don't use table, because embedded forms are only valid for cells -->
<div id="transaction-recurring" class="max-w-full grid gap-4 mt-10 grid-cols-[auto_auto_auto_auto_auto_max-content] items-center text-xl">
<div id="transaction-recurring" class="max-w-full grid gap-4 mt-10 grid-cols-[max-content_auto_auto_auto_auto_max-content] items-center text-xl">
<span class="text-sm text-gray-500">Active</span>
<span class="text-sm text-gray-500">Party</span>
<span class="text-sm text-gray-500">Description</span>
@@ -27,25 +27,25 @@ templ TransactionRecurringItems(transactionsRecurring []*types.TransactionRecurr
}
templ TransactionRecurringItem(transactionRecurring *types.TransactionRecurring, accountId, treasureChestId string) {
<p class="text-gray-600">
<p class="text-gray-600 text-center">
if transactionRecurring.Active {
Yes
} else {
No
}
</p>
<p class="text-gray-600">
if transactionRecurring.Party != "" {
{ transactionRecurring.Party }
} else {
&nbsp;
-
}
</p>
<p class="text-gray-600">
if transactionRecurring.Description != "" {
{ transactionRecurring.Description }
} else {
&nbsp;
-
}
</p>
<p class="text-gray-500 text-sm">

View File

@@ -101,7 +101,7 @@ templ EditTreasureChest(treasureChest *types.TreasureChest, parents []*types.Tre
<h3 class="text-sm text-gray-500">Monthly Transactions</h3>
<button
hx-get={ "/transaction-recurring?id=new&treasure-chest-id=" + id }
hx-target="#transaction-recurring"
hx-target="next #transaction-recurring"
hx-swap="outerHTML"
class="button button-primary ml-auto px-2 flex items-center gap-2"
>