improve tag creation and association when adding expenses

This commit is contained in:
juancwu 2026-01-15 02:27:00 +00:00
commit d7cdb19c3e
7 changed files with 83 additions and 37 deletions

View file

@ -19,7 +19,7 @@ templ SpaceTagsPage(space *model.Space, tags []*model.Tag) {
hx-post={ "/app/spaces/" + space.ID + "/tags" }
hx-target="#tags-container"
hx-swap="beforeend"
_="on htmx:afterRequest reset() me"
_="on htmx:afterOnLoad if event.detail.xhr.status == 200 reset() me"
class="flex gap-2 items-start"
>
@csrf.Token()
@ -27,11 +27,6 @@ templ SpaceTagsPage(space *model.Space, tags []*model.Tag) {
Name: "name",
Placeholder: "New tag name...",
})
@input.Input(input.Props{
Type: "color",
Name: "color",
Class: "w-14",
})
@button.Button(button.Props{
Type: button.TypeSubmit,
}) {