htmgo/pages/patients.index.go
2024-09-12 12:15:17 -05:00

27 lines
620 B
Go

package pages
import (
"github.com/gofiber/fiber/v2"
"mhtml/h"
"mhtml/pages/base"
"mhtml/partials/patient"
)
func PatientsIndex(ctx *fiber.Ctx) *h.Page {
return h.NewPage(base.RootPage(
h.Div(
h.Class("flex flex-col p-4 w-full"),
h.Div(
h.Div(
h.Class("flex justify-between items-center"),
h.P("Manage Patients", h.Class("text-lg font-bold")),
patient.AddPatientButton(),
),
h.View(patient.List, h.ReloadParams{
Triggers: h.CreateTriggers("load", "path-deps"),
Children: h.Children(h.Attribute("path-deps", h.GetPartialPath(patient.Create))),
}),
),
),
))
}