This commit is contained in:
@@ -224,15 +224,9 @@ templ EditTransaction(transaction *types.Transaction, accounts []*types.Account,
|
|||||||
}
|
}
|
||||||
|
|
||||||
templ TransactionItem(transaction *types.Transaction, accounts, treasureChests map[uuid.UUID]string) {
|
templ TransactionItem(transaction *types.Transaction, accounts, treasureChests map[uuid.UUID]string) {
|
||||||
{{
|
|
||||||
background := ""
|
|
||||||
if transaction.Error != nil {
|
|
||||||
background = ""
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
<div
|
<div
|
||||||
id="transaction"
|
id="transaction"
|
||||||
class={ "grid" + background }
|
class="grid grid-cols-[1fr_auto]"
|
||||||
if transaction.Error != nil {
|
if transaction.Error != nil {
|
||||||
title={ *transaction.Error }
|
title={ *transaction.Error }
|
||||||
}
|
}
|
||||||
@@ -267,7 +261,7 @@ templ TransactionItem(transaction *types.Transaction, accounts, treasureChests m
|
|||||||
hx-get={ "/transaction/" + transaction.Id.String() + "?edit=true" }
|
hx-get={ "/transaction/" + transaction.Id.String() + "?edit=true" }
|
||||||
hx-target="closest #transaction"
|
hx-target="closest #transaction"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class=""
|
class="flex items-center gap-2"
|
||||||
>
|
>
|
||||||
@svg.Edit()
|
@svg.Edit()
|
||||||
Edit
|
Edit
|
||||||
@@ -277,7 +271,7 @@ templ TransactionItem(transaction *types.Transaction, accounts, treasureChests m
|
|||||||
hx-target="closest #transaction"
|
hx-target="closest #transaction"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
hx-confirm="Are you sure you want to delete this transaction?"
|
hx-confirm="Are you sure you want to delete this transaction?"
|
||||||
class=""
|
class="flex items-center gap-2"
|
||||||
>
|
>
|
||||||
@svg.Delete()
|
@svg.Delete()
|
||||||
Delete
|
Delete
|
||||||
|
|||||||
Reference in New Issue
Block a user