feat: add direct link from account and treasurechest to the related transactions
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled
This commit is contained in:
@@ -85,6 +85,16 @@ templ AccountItem(account *types.Account) {
|
||||
} else {
|
||||
<p class="mr-20 text-green-700">{ displayBalance(account.CurrentBalance) }</p>
|
||||
}
|
||||
<a
|
||||
href={ templ.URL("/transaction?account-id=" + account.Id.String()) }
|
||||
class="button button-neglect px-1 flex items-center gap-2"
|
||||
title="View transactions"
|
||||
>
|
||||
@svg.Eye()
|
||||
<span>
|
||||
View
|
||||
</span>
|
||||
</a>
|
||||
<button
|
||||
hx-get={ "/account/" + account.Id.String() + "?edit=true" }
|
||||
hx-target="closest #account"
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package treasurechest
|
||||
|
||||
import "fmt"
|
||||
|
||||
import "spend-sparrow/template/svg"
|
||||
import "spend-sparrow/types"
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
templ TreasureChest(treasureChests []*types.TreasureChest) {
|
||||
@@ -109,6 +107,16 @@ templ TreasureChestItem(treasureChest *types.TreasureChest) {
|
||||
} else {
|
||||
<p class="mr-20 text-green-700">{ displayBalance(treasureChest.CurrentBalance) }</p>
|
||||
}
|
||||
<a
|
||||
href={ templ.URL("/transaction?treasure-chest-id=" + treasureChest.Id.String()) }
|
||||
class="button button-neglect px-1 flex items-center gap-2"
|
||||
title="View transactions"
|
||||
>
|
||||
@svg.Eye()
|
||||
<span>
|
||||
View
|
||||
</span>
|
||||
</a>
|
||||
<button
|
||||
hx-get={ "/treasurechest/" + treasureChest.Id.String() + "?edit=true" }
|
||||
hx-target="closest #treasurechest"
|
||||
|
||||
Reference in New Issue
Block a user