2024-09-11 17:31:40 +00:00
|
|
|
package pages
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/gofiber/fiber/v2"
|
2024-09-13 17:26:53 +00:00
|
|
|
"github.com/maddalax/mhtml/framework/h"
|
|
|
|
|
"github.com/maddalax/mhtml/starter-template/pages/base"
|
|
|
|
|
"github.com/maddalax/mhtml/starter-template/partials/patient"
|
2024-09-11 17:31:40 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func PatientsIndex(ctx *fiber.Ctx) *h.Page {
|
|
|
|
|
return h.NewPage(base.RootPage(
|
|
|
|
|
h.Div(
|
2024-09-11 18:09:55 +00:00
|
|
|
h.Class("flex flex-col p-4 w-full"),
|
2024-09-11 17:31:40 +00:00
|
|
|
h.Div(
|
2024-09-11 18:09:55 +00:00
|
|
|
h.Div(
|
|
|
|
|
h.Class("flex justify-between items-center"),
|
2024-09-13 15:47:18 +00:00
|
|
|
h.P(h.Text("Manage Patients"), h.Class("text-lg font-bold")),
|
2024-09-11 21:08:35 +00:00
|
|
|
patient.AddPatientButton(),
|
2024-09-11 18:09:55 +00:00
|
|
|
),
|
2024-09-12 17:15:17 +00:00
|
|
|
h.View(patient.List, h.ReloadParams{
|
|
|
|
|
Triggers: h.CreateTriggers("load", "path-deps"),
|
|
|
|
|
Children: h.Children(h.Attribute("path-deps", h.GetPartialPath(patient.Create))),
|
|
|
|
|
}),
|
2024-09-11 18:09:55 +00:00
|
|
|
),
|
2024-09-11 17:31:40 +00:00
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
}
|